4.0.1 • Published 24 days ago

@studiometa/eslint-config v4.0.1

Weekly downloads
28
License
MIT
Repository
github
Last release
24 days ago

Studio Meta ESLint Configurations

NPM Version Dependency Status devDependency Status

Set of ESLint configurations for multiple usages.

Installation

Install the package with NPM:

npm install --save-dev eslint prettier @studiometa/eslint-config

Usage

To use the basic configuration, you just have to install this package and reference it in your ESLint configuration file:

module.exports = {
  extends: '@studiometa/eslint-config',
};

If you have a legacy project with ES5 code, you can use the legacy configuration:

module.exports = {
  extends: '@studiometa/eslint-config/src/legacy',
};

Rules documentation

Find below some documentation on the rules this configuration extends. Some are best practices, some are more opinionated choices.

eslint:recommended

These rules report common problems we can encounter in JavaScript. The full list can be found in the ESLint documentation.

eslint-config-airbnb-base

People at Airbnb have written a detailed documentation of their JavaScript style guide and have published ESLint configurations to enforce it.

Custom rules configurations

Below are some rules specific to this configuration.

Best practices

Some rules considered as best practices.

RuleConfiguration
curly['error', 'all']
dot-notation'warn'
eqeqeq['warn', 'always']
no-alert'error'
no-empty-function'error'
no-eval'error'
no-implicit-coercion['error', { allow: ['!!'] }]
no-implicit-globals'error'
no-multi-spaces'warn'
no-param-reassign['warn', { props: false }]
no-useless-concat'warn'
no-useless-return'warn'
strict['error', 'function']
vars-on-top'error'
wrap-iife['error', 'any']
yoda['error', 'never']

Possible errors

These rules help developpers avoir some possible errors.

RuleConfiguration
no-consoleprocess.env.NODE_ENV !== 'production' ? 'off' : 'error'
no-debuggerprocess.env.NODE_ENV !== 'production' ? 'off' : 'error'

Stylistic issues

ES6

RuleConfiguration
arrow-spacing['warn', { before: true, after: true }]
no-var'error'
object-shorthand'error'
prefer-const'error'
prefer-template'error'
rest-spread-spacing['warn', 'never']
template-curly-spacing['warn', 'never']

Overrides

Overrides are used to define specific configuration for sets of limited file globs.

Build files

Used for: webpack.config.js, gulpfile.js, nuxt.config.js, webpack.mix.js

RuleConfiguration
global-requireoff

Prettier

Used for: *.js

The plugin:prettier/recommended plugin turns off all ESLint stylistic rules that might conflict with Prettier. You can find out more on the project's repository. |

Vue

Used for: *.vue

For all *.vue files, we use the official ESLint plugin created by Vue.js. The following rules are also specified:

4.0.1

24 days ago

4.0.0

24 days ago

3.1.3

11 months ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

2 years ago

3.0.5

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.0.0-beta.1

2 years ago

3.0.0-beta.0

2 years ago

3.0.0-beta.3

2 years ago

3.0.0-beta.2

2 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.0

3 years ago

3.0.0-alpha.2

3 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.0-beta.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-beta.1

4 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago