From 404f0f2ba317edfc9cbe6e815d752e94aa9550f6 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Thu, 5 Jul 2018 11:55:02 +0300 Subject: [PATCH] [test] Enforce some linter rules for JS --- .eslintrc.json | 86 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) 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" } } -- 2.39.5