eslint-config-goolyuyi-node
v1.0.2
Published
goolyuyi's eslint and seamless with happiness in jetbrain ide(such as webstorm)
Downloads
2
Readme
goolyuyi の Eslint :heart:
goolyuyi's eslint and seamless in jetbrain IDE(such as webstorm) :lizard:
Installation
yarn add -D eslint eslint-config-goolyuyi-node eslint-plugin-import eslint-plugin-mocha eslint-plugin-node eslint-plugin-promise
Useage
add this to your .eslint.rc
{
"extends": "myconfig/my-special-config"
}
Some happy tips :pig:
Define Global Vars
/* global var1, var2 */
/* global var1:writable, var2:writable */
.eslintrc
{
// ...
"plugins": [
"jquery", // eslint-plugin-jquery
"@foo/foo", // @foo/eslint-plugin-foo
"@bar" // @bar/eslint-plugin
],
"extends": [
"plugin:@foo/foo/recommended",
"plugin:@bar/recommended"
],
"rules": {
"jquery/a-rule": "error",
"@foo/foo/some-rule": "error",
"@bar/another-rule": "error"
},
"env": {
"jquery/jquery": true,
"@foo/foo/env-foo": true,
"@bar/env-bar": true,
}
// ...
}
Config in code's comments
/* eslint eqeqeq: "off", curly: "error" */
Disable/Enable
/* eslint-disable */
alert('foo');
/* eslint-enable */
parseInt(10); // eslint-disable-line rule-name
// eslint disable-next-line rule-name
x = parseInt(10);