summaryrefslogtreecommitdiffstats
path: root/.eslintrc.json
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-05 11:55:02 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-05 11:58:04 +0300
commit404f0f2ba317edfc9cbe6e815d752e94aa9550f6 (patch)
tree9c0d720cbb04aa9ccb6b45b36cbbf99f37af85fc /.eslintrc.json
parent61308eaca28987bcfb0e924ff0509d86b4e7efda (diff)
downloadrspamd-404f0f2ba317edfc9cbe6e815d752e94aa9550f6.tar.gz
rspamd-404f0f2ba317edfc9cbe6e815d752e94aa9550f6.zip
[test] Enforce some linter rules for JS
Diffstat (limited to '.eslintrc.json')
-rw-r--r--.eslintrc.json86
1 files changed, 85 insertions, 1 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 64c25a22c..1805d192c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -2,7 +2,91 @@
"env": {
"browser": true
},
+ "extends": "eslint:all",
"rules": {
- "newline-per-chained-call": "off"
+ "array-bracket-newline": ["error", "consistent"],
+ "camelcase": "off",
+ "capitalized-comments": "off",
+ "comma-dangle": ["error", "only-multiline"],
+ "curly": ["error", "multi-line"],
+ "dot-location": ["error", "property"],
+ "func-names": "off",
+ // "func-style": ["error", "declaration"],
+ "id-length": ["error", { "min": 1 }],
+ // "max-len": ["error", { "code": 120 }],
+ "max-params": ["warn", 9],
+ "max-statements": ["warn", 25],
+ "multiline-comment-style": "off",
+ "multiline-ternary": ["error", "always-multiline"],
+ "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
+ "no-extra-parens": ["error", "functions"],
+ "no-implicit-globals": "off",
+ "no-magic-numbers": "off",
+ "no-plusplus": "off",
+ "no-ternary": "off",
+ // "no-use-before-define": ["error", { "functions": false }],
+ "no-var": "off",
+ "object-curly-newline": ["error", { "consistent": true }],
+ "object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
+ "object-shorthand": "off",
+ "one-var": "off",
+ "padded-blocks": "off",
+ "prefer-arrow-callback": "off",
+ "prefer-destructuring": "off",
+ "prefer-template": "off",
+ // "quote-props" : ["error", "consistent-as-needed"],
+ "require-jsdoc": "off",
+ "space-before-function-paren": ["error", {
+ "anonymous": "always",
+ "named": "never"
+ }],
+ "vars-on-top": "off",
+
+
+ // Temporarily disabled rules
+ "array-callback-return": "off",
+ "array-element-newline": "off",
+ "block-scoped-var": "off",
+ "brace-style": "off",
+ "callback-return": "off",
+ "consistent-return": "off",
+ "consistent-this": "off",
+ "default-case": "off",
+ "eqeqeq": "off",
+ "func-style": "off",
+ "function-paren-newline": "off",
+ "global-require": "off",
+ "guard-for-in": "off",
+ "init-declarations": "off",
+ "key-spacing": "off",
+ "line-comment-position": "off",
+ "max-len": "off",
+ "max-lines": "off",
+ "max-lines-per-function": "off",
+ "max-statements-per-line": "off",
+ "new-cap": "off",
+ "no-else-return": "off",
+ "no-empty": "off",
+ "no-empty-function": "off",
+ "no-eq-null": "off",
+ "no-implicit-coercion": "off",
+ "no-inline-comments": "off",
+ "no-loop-func": "off",
+ "no-multi-assign": "off",
+ "no-negated-condition": "off",
+ "no-param-reassign": "off",
+ "no-redeclare": "off",
+ "no-shadow": "off",
+ "no-undef": "off",
+ "no-undefined": "off",
+ "no-underscore-dangle": "off",
+ "no-unused-vars": "off",
+ "no-use-before-define": "off",
+ "one-var-declaration-per-line": "off",
+ "prefer-spread": "off",
+ "quote-props": "off",
+ "sort-keys": "off",
+ "sort-vars": "off",
+ "strict": "off"
}
}