Shareable ESLint config for the Ely.by's projects
Go to file
2019-05-24 19:00:41 +03:00
docs/rules Init commit 2019-05-24 18:38:25 +03:00
src Init commit 2019-05-24 18:38:25 +03:00
tests/lib/rules Init commit 2019-05-24 18:38:25 +03:00
.gitignore Init commit 2019-05-24 18:38:25 +03:00
.npmignore Add travis config and prepare package to be published on npm 2019-05-24 18:51:41 +03:00
.travis.yml Fix travis config 2019-05-24 19:00:41 +03:00
babel.config.js Init commit 2019-05-24 18:38:25 +03:00
jest.config.js Init commit 2019-05-24 18:38:25 +03:00
LICENSE.md Init commit 2019-05-24 18:38:25 +03:00
package.json Add travis config and prepare package to be published on npm 2019-05-24 18:51:41 +03:00
README.md Init commit 2019-05-24 18:38:25 +03:00
tsconfig.json Init commit 2019-05-24 18:38:25 +03:00
yarn.lock Init commit 2019-05-24 18:38:25 +03:00

Ely.by ESLint rules

Set of ESLint rules used in development of Ely.by JS projects. Contains rules for pure JS, JSX, ReactJS and TS.

Installation

First of all install Ely.by ESLint plugin and eslint peer dependency via preferred package manager:

# NPM users:
npm install @elyby/eslint-plugin eslint --save-dev
# Yarn users:
yarn add -D @elyby/eslint-plugin eslint

Then add the following configuration to your .eslintrc.js file:

module.exports = {
    extends: [
        'plugin:@elyby/config',
    ],
}

And that's it!

You may still wish to override some of our rules, as well as the rest of our eslint configuration settings. For example, you can specify the preferred env for eslint:

module.exports = {
    // ...rest of the configuration
    env: {
        browser: true,
        es6: true,
    },
};

Using our custom fixers

First of all, you must install Ely.by's ESLint plugin as described in the installation chapter. After that you can enable our custom rules with defining our plugin in plugins section:

module.exports = {
    // ...rest of the configuration
    plugins: [
        '@elyby',
    ],
};

After that all custom rules will be available for use.

List of supported rules

License

Ely.by ESLint plugin is licensed under the MIT License.