2016-12-14 17:39:17 +01:00
|
|
|
{
|
|
|
|
"parserOptions": {
|
|
|
|
"ecmaVersion": 6,
|
|
|
|
"ecmaFeatures": {
|
|
|
|
"impliedStrict": true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"es6": true,
|
2017-03-06 13:45:51 +01:00
|
|
|
"commonjs": true,
|
|
|
|
"node": true
|
2016-12-14 17:39:17 +01: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-03-07 12:27:36 +01:00
|
|
|
"vars": "local",
|
|
|
|
// Allow vars that start with a capital letter to be unused.
|
|
|
|
// This is mainly for exported module names which are useful to indicate
|
|
|
|
// the name of the module and may be used to refer to itself in future.
|
|
|
|
"varsIgnorePattern": "^[A-Z]"
|
2016-12-14 17:39:17 +01:00
|
|
|
}],
|
|
|
|
"no-empty": ["error", {
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
}],
|
|
|
|
|
|
|
|
// disable rules from base configurations
|
|
|
|
"no-console": "off",
|
|
|
|
"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 16:09:33 +01:00
|
|
|
"no-trailing-spaces": "warn",
|
2016-12-14 17:39:17 +01:00
|
|
|
"eol-last": "error",
|
|
|
|
"func-call-spacing": "error",
|
|
|
|
"indent": ["error", 4, {
|
|
|
|
"ArrayExpression": "first",
|
|
|
|
"SwitchCase": 1
|
|
|
|
}],
|
|
|
|
"linebreak-style": ["error", "unix"],
|
|
|
|
"quotes": ["error", "double", {
|
|
|
|
"avoidEscape": true
|
|
|
|
}],
|
2017-01-31 19:24:56 +01:00
|
|
|
"camelcase": ["error", {
|
|
|
|
"properties": "always"
|
|
|
|
}],
|
2016-12-14 17:39:17 +01:00
|
|
|
"semi": ["error", "always"],
|
2017-02-07 21:31:15 +01:00
|
|
|
"unicode-bom": "error",
|
|
|
|
"require-jsdoc": ["error", {
|
|
|
|
"require": {
|
|
|
|
"FunctionDeclaration": true,
|
|
|
|
"MethodDefinition": true,
|
|
|
|
"ClassDeclaration": true,
|
|
|
|
"ArrowFunctionExpression": true
|
|
|
|
}
|
2017-02-09 16:09:33 +01: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"],
|
|
|
|
"space-in-parens": "error"
|
2016-12-14 17:39:17 +01:00
|
|
|
},
|
|
|
|
"globals": {
|
2017-03-21 23:41:44 +01:00
|
|
|
"$": false,
|
|
|
|
"jQuery": false,
|
|
|
|
"moment": false,
|
|
|
|
|
2017-03-22 17:55:21 +01:00
|
|
|
"COMPILE_TIME": false,
|
|
|
|
"COMPILE_MSG": false
|
2016-12-14 17:39:17 +01:00
|
|
|
}
|
2017-02-23 19:59:58 +01:00
|
|
|
}
|