Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
18 lines
502 B
Plaintext
18 lines
502 B
Plaintext
{
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true
|
|
},
|
|
"parserOptions": {
|
|
"sourceType": "module"
|
|
},
|
|
"extends": "eslint:recommended",
|
|
"rules": {
|
|
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }],
|
|
"no-constant-condition": ["error", { "checkLoops": false }],
|
|
"no-var": "error",
|
|
"no-useless-constructor": "error",
|
|
"object-shorthand": ["error", "methods", { "avoidQuotes": true }],
|
|
}
|
|
}
|