]> source.dussan.org Git - rspamd.git/commitdiff
[test] Enforce some linter rules for JS
authorAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 5 Jul 2018 08:55:02 +0000 (11:55 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 5 Jul 2018 08:58:04 +0000 (11:58 +0300)
.eslintrc.json

index 64c25a22cbedf54d877c81b0c5468e6466605cb6..1805d192c904f5bb5830d767d69dcacd33448d0b 100644 (file)
@@ -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"
     }
 }