2016-12-14 16:39:17 +00:00
|
|
|
{
|
|
|
|
"parserOptions": {
|
2018-04-02 16:10:51 +00:00
|
|
|
"ecmaVersion": 9,
|
2016-12-14 16:39:17 +00:00
|
|
|
"ecmaFeatures": {
|
|
|
|
"impliedStrict": true
|
2017-03-23 17:52:20 +00:00
|
|
|
},
|
|
|
|
"sourceType": "module"
|
2016-12-14 16:39:17 +00:00
|
|
|
},
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"es6": true,
|
2017-03-06 12:45:51 +00:00
|
|
|
"node": true
|
2016-12-14 16:39:17 +00:00
|
|
|
},
|
|
|
|
"extends": "eslint:recommended",
|
|
|
|
"rules": {
|
|
|
|
// enable additional rules
|
|
|
|
"no-eval": "error",
|
|
|
|
"no-implied-eval": "error",
|
|
|
|
"dot-notation": "error",
|
|
|
|
"eqeqeq": ["error", "smart"],
|
|
|
|
"no-caller": "error",
|
|
|
|
"no-extra-bind": "error",
|
|
|
|
"no-unused-expressions": "error",
|
|
|
|
"no-useless-call": "error",
|
|
|
|
"no-useless-return": "error",
|
|
|
|
"radix": "warn",
|
|
|
|
|
|
|
|
// modify rules from base configurations
|
|
|
|
"no-unused-vars": ["error", {
|
|
|
|
"args": "none",
|
2017-10-04 21:35:44 +00:00
|
|
|
"vars": "all"
|
2016-12-14 16:39:17 +00:00
|
|
|
}],
|
|
|
|
"no-empty": ["error", {
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
}],
|
|
|
|
|
|
|
|
// disable rules from base configurations
|
|
|
|
"no-control-regex": "off",
|
|
|
|
|
|
|
|
// stylistic conventions
|
|
|
|
"brace-style": ["error", "1tbs"],
|
|
|
|
"block-spacing": "error",
|
|
|
|
"array-bracket-spacing": "error",
|
|
|
|
"comma-spacing": "error",
|
|
|
|
"comma-style": "error",
|
|
|
|
"computed-property-spacing": "error",
|
2017-02-09 15:09:33 +00:00
|
|
|
"no-trailing-spaces": "warn",
|
2016-12-14 16:39:17 +00:00
|
|
|
"eol-last": "error",
|
|
|
|
"func-call-spacing": "error",
|
2017-07-24 14:55:48 +00:00
|
|
|
"key-spacing": ["warn", {
|
|
|
|
"mode": "minimum"
|
|
|
|
}],
|
2016-12-14 16:39:17 +00:00
|
|
|
"indent": ["error", 4, {
|
2018-02-13 15:05:55 +00:00
|
|
|
"ignoreComments": true,
|
2016-12-14 16:39:17 +00:00
|
|
|
"ArrayExpression": "first",
|
|
|
|
"SwitchCase": 1
|
|
|
|
}],
|
|
|
|
"linebreak-style": ["error", "unix"],
|
|
|
|
"quotes": ["error", "double", {
|
|
|
|
"avoidEscape": true
|
|
|
|
}],
|
2017-01-31 18:24:56 +00:00
|
|
|
"camelcase": ["error", {
|
|
|
|
"properties": "always"
|
|
|
|
}],
|
2016-12-14 16:39:17 +00:00
|
|
|
"semi": ["error", "always"],
|
2017-02-07 20:31:15 +00:00
|
|
|
"unicode-bom": "error",
|
|
|
|
"require-jsdoc": ["error", {
|
|
|
|
"require": {
|
|
|
|
"FunctionDeclaration": true,
|
|
|
|
"MethodDefinition": true,
|
|
|
|
"ClassDeclaration": true,
|
|
|
|
"ArrowFunctionExpression": true
|
|
|
|
}
|
2017-02-09 15:09:33 +00:00
|
|
|
}],
|
|
|
|
"keyword-spacing": ["error", {
|
|
|
|
"before": true,
|
|
|
|
"after": true
|
|
|
|
}],
|
|
|
|
"no-multiple-empty-lines": ["warn", {
|
|
|
|
"max": 2,
|
|
|
|
"maxEOF": 1,
|
|
|
|
"maxBOF": 0
|
|
|
|
}],
|
|
|
|
"no-whitespace-before-property": "error",
|
|
|
|
"operator-linebreak": ["error", "after"],
|
2017-04-13 17:08:50 +00:00
|
|
|
"space-in-parens": "error",
|
2018-04-02 16:10:51 +00:00
|
|
|
"no-var": "error",
|
|
|
|
"prefer-const": "error"
|
2016-12-14 16:39:17 +00:00
|
|
|
},
|
2018-12-29 02:58:05 +00:00
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": "tests/**/*",
|
|
|
|
"rules": {
|
|
|
|
"no-unused-expressions": "off",
|
|
|
|
"no-console": "off"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2016-12-14 16:39:17 +00:00
|
|
|
"globals": {
|
2017-03-21 22:41:44 +00:00
|
|
|
"$": false,
|
|
|
|
"jQuery": false,
|
2017-12-28 18:17:38 +00:00
|
|
|
"log": false,
|
2017-03-21 22:41:44 +00:00
|
|
|
|
2017-03-22 16:55:21 +00:00
|
|
|
"COMPILE_TIME": false,
|
2017-06-16 15:36:42 +00:00
|
|
|
"COMPILE_MSG": false,
|
2017-09-19 23:37:57 +00:00
|
|
|
"PKG_VERSION": false,
|
|
|
|
"ENVIRONMENT_IS_WORKER": false,
|
|
|
|
"ENVIRONMENT_IS_NODE": false,
|
|
|
|
"ENVIRONMENT_IS_WEB": false
|
2016-12-14 16:39:17 +00:00
|
|
|
}
|
2017-02-23 18:59:58 +00:00
|
|
|
}
|