1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
// This config file is used by eslint
// See package.json scripts: lint*
// Rules documentation: https://eslint.org/docs/rules/
{
"root": true,
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2018
},
"extends": [
// See https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json
"standard"
],
"plugins": [
"prefer-arrow"
],
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"arrow-parens": [ "error", "as-needed" ],
"comma-dangle": [ "error", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "never"
}],
"eqeqeq": [ "error", "smart" ],
"implicit-arrow-linebreak": [ "error", "beside" ],
"indent": [ "error", 2, { "MemberExpression": "off" } ],
"no-var": [ "error" ],
"nonblock-statement-body-position": [ "error", "beside" ],
"object-curly-spacing": [ "error", "always" ],
"object-shorthand": [ "error", "properties" ],
"prefer-arrow/prefer-arrow-functions": [ "error" ],
"prefer-arrow-callback": [ "error" ],
"prefer-const": [ "error" ]
},
"globals": {
// Mocha globals
"it": "readonly",
"xit": "readonly",
"describe": "readonly",
"xdescribe": "readonly",
"before": "readonly",
"beforeEach": "readonly",
}
}
|