@shinnn/eslint-config
shinnn's ESLint sharable config
Features
Installation
Install eslint
and this package with npm.
npm install --save-dev eslint @shinnn/eslint-config
Then add the following configuration to your project's package.json
.
"eslintConfig": {
"extends": "@shinnn"
}
Optional setups
When babel-eslint
is installed, this config automatically uses it as a parser. There is no need to add "parser": "babel-eslint"
to the package.json
explicitly.
npm install --save-dev babel-eslint
babel-eslint
lets ESLint parse experimental ECMAScript syntax the default parser doesn't support, for example class fields and BigInt
.
When eslint-plugin-svelte3
is installed, this config also makes ESLint validate .svelte
files.
npm install --save-dev eslint-plugin-svelte3
CLI
$ eslint .
API
const {CLIEngine} = require('eslint');
const cli = new CLIEngine({
});
cli.executeOnText('var foo=true;');
License
ISC License © 2017 - 2019 Watanabe Shinnosuke