@binur95/eslint-config

1.1.1 • Public • Published

@binur95/eslint-config

Version Dependency Status devDependency Status

Anvilabs' base ESLint config. Intended to be used together with prettier.

Usage

This config relies dangerously on npm@3/yarn flatter tree for its dependencies (because of eslint/issues/3458), so installation may be as simple as:

$ yarn add eslint prettier @binur95/eslint-config --dev
# or
$ npm install eslint prettier @binur95/eslint-config --save-dev

Then add the extends to your .eslintrc.js:

module.exports = {
  extends: '@binur95/eslint-config',
  rules: {
    // your overrides
  },
};

Other configs

This config also exposes a few other configs that we use often and pull in as needed.

You can use them standalone:

module.exports = {
  extends: '@binur95/eslint-config/<config-name>',
};

Or in combination with the base config (recommended):

module.exports = {
  extends: ['@binur95/eslint-config', '@binur95/eslint-config/<config-name>'],
};

You can also use ESLint@4 overrides to apply a config only to certain files. For example:

module.exports = {
  ...
  overrides: [
    Object.assign(
      {
        files: ['**/__tests__/*-test.js', '**/__mocks__/*.js'],
      },
      require('@binur95/eslint-config/jest')
    ),
  ],
};

Available configs include:

  • '@binur95/eslint-config/jest' for Jest related rules
  • '@binur95/eslint-config/lodash' for Lodash related rules
  • '@binur95/eslint-config/ramda' for Ramda related rules
  • '@binur95/eslint-config/script' for usage with config files or scripts

License

MIT License © Anvilabs LLC

Dependents (0)

Package Sidebar

Install

npm i @binur95/eslint-config

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

11.6 kB

Total Files

7

Last publish

Collaborators

  • binchik