Skip to content

miirinjej/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@miirinjej/eslint-config

npm version

Sharable eslint config for JavaScript

Installation

npm install --save-dev @miirinjej/eslint-config eslint

Or (if Babel isn't set up):

npm install --save-dev @babel/core @babel/preset-env @miirinjej/eslint-config eslint

In addition, when options "useBuiltIns": "entry"|"usage" are used in Babel config:

npm install core-js@latest

Usage

Add this config to package.json:

"eslintConfig": {
  "extends": [
    "@miirinjej/eslint-config"
  ]
}

See also: https://eslint.org/docs/user-guide/configuring

Extending the config

You can extend the current configuration by extending (or overriding) rules or an array of existing configurations:

{
  "extends": ["@miirinjej/eslint-config", "./eslint.config.js"],
  "rules": {
    "no-console": "off"
  }
}

See also: https://eslint.org/docs/user-guide/configuring#extending-configuration-files

Included features

@babel/eslint-parser allows you to lint all valid Babel code with eslint.

Note: @babel/eslint-parser requires @babel/core and a valid Babel configuration file to run. If you do not have this already set up, please see the Babel usage guide.

@babel/preset-env allows you to use the latest JavaScript based on your target environment(s).

Extensions

Rules

See config itself.

Rules are grouped and sorted by default as in the original lists: