@anvilabs/eslint-config

Anvilabs' base ESLint config

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
110Feb 21, 2019Oct 8, 2016Minified + gzip package size for @anvilabs/eslint-config in KB

Readme

@anvilabs/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 @anvilabs/eslint-config --dev
# or
$ npm install eslint prettier @anvilabs/eslint-config --save-dev

Then add the extends to your .eslintrc.js:

module.exports = {
  extends: '@anvilabs/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: '@anvilabs/eslint-config/<config-name>',
};

Or in combination with the base config (recommended):

module.exports = {
  extends: ['@anvilabs/eslint-config', '@anvilabs/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('@anvilabs/eslint-config/jest')
    ),
  ],
};

Available configs include:

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

License

MIT License © Anvilabs LLC

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.