eslint-config-reforis

2.1.1 • Public • Published

eslint-config-reforis

npm version code style: prettier License: GPL v3

ESLint shareable configuration for reForis and its plugins. It lints javascript with ease, based on the popular javascript code style from Airbnb.

The config is built upon Airbnb's ESLint rules with additional rules and optimizations.

Features

Installation

Install the package with

npm install eslint-config-reforis --save-dev

eslint-config-reforis requires you to take care of it's peerDependencies. Install the correct version of each peerDependencies package, which are listed with the following command:

npm info "eslint-config-reforis@latest" peerDependencies

If using npm 5+, use this shortcut:

npx install-peerdeps --dev eslint-config-reforis

Usage

Now add eslint-config-reforis to either your package.json:

{
    "eslintConfig": {
        "extends": "eslint-config-reforis"
    }
}

to your .eslintrc:

{
    "extends": "eslint-config-reforis"
}

or .eslintrc.js:

module.exports = {
    extends: "eslint-config-reforis",
};

Prettier Config

This is how you can use or extend the eslint-config-reforis prettier config in your app:

// prettier.config.js
module.exports = require("eslint-config-reforis/prettier.config");

Development

Shareable configs are simply npm packages that export a configuration object.

You can also test your shareable config on your computer before publishing by installing or linking your module globally. Type:

Linking module

Go to the local module directory (package you want to install) and enter this command.

npm link

Then, in your project that wants to use your shareable config, type:

npm link eslint-config-reforis

Installing module

In the project where you want to use your shareable config, type:

npm install /path-to-eslint-config-reforis

Using a Shareable Config

Shareable configs are designed to work with the extends feature of .eslintrc files. Instead of using a file path for the value of extends, use your module name. For example, in your project that wants to use your shareable config:

{
    "extends": "eslint-config-myconfig"
}

LICENSE

GPL-3.0-or-later

Readme

Keywords

Package Sidebar

Install

npm i eslint-config-reforis

Weekly Downloads

26

Version

2.1.1

License

GPL-3.0-or-later

Unpacked Size

44.1 kB

Total Files

6

Last publish

Collaborators

  • turris