From f577ea55fe8599983e1066e8381317d35ec542c5 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 13 Feb 2020 17:46:22 +0400 Subject: feat(eslint): Renamed the configuration file Signed-off-by: Valentin Popov --- src/javascript.ts | 4 +- src/rules/default.json | 258 +++++++++++++++++++++++++++++++++++++++++++++++++ src/rules/eslint.json | 258 ------------------------------------------------- 3 files changed, 260 insertions(+), 260 deletions(-) create mode 100644 src/rules/default.json delete mode 100644 src/rules/eslint.json diff --git a/src/javascript.ts b/src/javascript.ts index f5775d4..27abcbd 100644 --- a/src/javascript.ts +++ b/src/javascript.ts @@ -1,6 +1,6 @@ -import eslint from "./rules/eslint.json"; +import rules from "./rules/default.json"; module.exports = { "extends": ["eslint:all"], - "rules": { ...eslint }, + "rules": { ...rules }, }; diff --git a/src/rules/default.json b/src/rules/default.json new file mode 100644 index 0000000..8661d4d --- /dev/null +++ b/src/rules/default.json @@ -0,0 +1,258 @@ +{ + "arrow-parens": [ + "error", + "always" + ], + "arrow-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": false + } + ], + "comma-dangle": [ + "error", + "always-multiline" + ], + "eol-last": [ + "error", + "always" + ], + "eqeqeq": [ + "error", + "always" + ], + "id-length": [ + "warn", + { + "max": 32, + "min": 2, + "properties": "always" + } + ], + "indent": [ + "error", + "tab", + { + "ArrayExpression": 1, + "CallExpression": { + "arguments": 1 + }, + "FunctionDeclaration": { + "body": 1, + "parameters": 1 + }, + "FunctionExpression": { + "body": 1, + "parameters": 1 + }, + "ImportDeclaration": 1, + "MemberExpression": 1, + "ObjectExpression": 1, + "SwitchCase": 1, + "VariableDeclarator": "first", + "flatTernaryExpressions": true, + "ignoreComments": false, + "ignoredNodes": [], + "outerIIFEBody": 1 + } + ], + "indent-legacy": [ + "off" + ], + "key-spacing": [ + "error", + { + "afterColon": true, + "beforeColon": false, + "mode": "strict" + } + ], + "keyword-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "linebreak-style": [ + "error", + "unix" + ], + "lines-around-directive": [ + "off" + ], + "newline-after-var": [ + "off" + ], + "newline-before-return": [ + "off" + ], + "no-alert": [ + "error" + ], + "no-catch-shadow": [ + "off" + ], + "no-console": [ + "warn" + ], + "no-debugger": [ + "error" + ], + "no-eval": [ + "error", + { + "allowIndirect": false + } + ], + "no-multi-spaces": [ + "error", + { + "exceptions": {}, + "ignoreEOLComments": false + } + ], + "no-native-reassign": [ + "off" + ], + "no-negated-in-lhs": [ + "off" + ], + "no-spaced-func": [ + "off" + ], + "no-tabs": [ + "error", + { + "allowIndentationTabs": true + } + ], + "no-unused-vars": [ + "error", + { + "args": "after-used", + "caughtErrors": "all", + "ignoreRestSiblings": false, + "vars": "all" + } + ], + "object-curly-newline": [ + "error", + { + "consistent": true, + "minProperties": 2, + "multiline": true + } + ], + "object-curly-spacing": [ + "error", + "always", + { + "arraysInObjects": false, + "objectsInObjects": false + } + ], + "one-var": [ + "error", + "never" + ], + "prefer-reflect": [ + "off" + ], + "quote-props": [ + "error", + "consistent-as-needed", + { + "keywords": true, + "numbers": true, + "unnecessary": true + } + ], + "quotes": [ + "error", + "double", + { + "allowTemplateLiterals": false, + "avoidEscape": false + } + ], + "require-jsdoc": [ + "off" + ], + "semi": [ + "error", + "always", + { + "omitLastInOneLineBlock": false + } + ], + "semi-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "semi-style": [ + "error", + "last" + ], + "sort-imports": [ + "error", + { + "ignoreCase": false, + "ignoreDeclarationSort": true, + "ignoreMemberSort": false, + "memberSyntaxSortOrder": [ + "all", + "multiple", + "single", + "none" + ] + } + ], + "sort-keys": [ + "warn", + "asc", + { + "caseSensitive": true, + "minKeys": 2, + "natural": true + } + ], + "sort-vars": [ + "error", + { + "ignoreCase": false + } + ], + "space-before-blocks": [ + "error", + "always" + ], + "space-before-function-paren": [ + "error", + { + "anonymous": "always", + "asyncArrow": "always", + "named": "never" + } + ], + "valid-jsdoc": [ + "off" + ], + "valid-typeof": [ + "error", + { + "requireStringLiterals": true + } + ] +} diff --git a/src/rules/eslint.json b/src/rules/eslint.json deleted file mode 100644 index 8661d4d..0000000 --- a/src/rules/eslint.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "arrow-parens": [ - "error", - "always" - ], - "arrow-spacing": [ - "error", - { - "after": true, - "before": true - } - ], - "brace-style": [ - "error", - "1tbs", - { - "allowSingleLine": false - } - ], - "comma-dangle": [ - "error", - "always-multiline" - ], - "eol-last": [ - "error", - "always" - ], - "eqeqeq": [ - "error", - "always" - ], - "id-length": [ - "warn", - { - "max": 32, - "min": 2, - "properties": "always" - } - ], - "indent": [ - "error", - "tab", - { - "ArrayExpression": 1, - "CallExpression": { - "arguments": 1 - }, - "FunctionDeclaration": { - "body": 1, - "parameters": 1 - }, - "FunctionExpression": { - "body": 1, - "parameters": 1 - }, - "ImportDeclaration": 1, - "MemberExpression": 1, - "ObjectExpression": 1, - "SwitchCase": 1, - "VariableDeclarator": "first", - "flatTernaryExpressions": true, - "ignoreComments": false, - "ignoredNodes": [], - "outerIIFEBody": 1 - } - ], - "indent-legacy": [ - "off" - ], - "key-spacing": [ - "error", - { - "afterColon": true, - "beforeColon": false, - "mode": "strict" - } - ], - "keyword-spacing": [ - "error", - { - "after": true, - "before": true - } - ], - "linebreak-style": [ - "error", - "unix" - ], - "lines-around-directive": [ - "off" - ], - "newline-after-var": [ - "off" - ], - "newline-before-return": [ - "off" - ], - "no-alert": [ - "error" - ], - "no-catch-shadow": [ - "off" - ], - "no-console": [ - "warn" - ], - "no-debugger": [ - "error" - ], - "no-eval": [ - "error", - { - "allowIndirect": false - } - ], - "no-multi-spaces": [ - "error", - { - "exceptions": {}, - "ignoreEOLComments": false - } - ], - "no-native-reassign": [ - "off" - ], - "no-negated-in-lhs": [ - "off" - ], - "no-spaced-func": [ - "off" - ], - "no-tabs": [ - "error", - { - "allowIndentationTabs": true - } - ], - "no-unused-vars": [ - "error", - { - "args": "after-used", - "caughtErrors": "all", - "ignoreRestSiblings": false, - "vars": "all" - } - ], - "object-curly-newline": [ - "error", - { - "consistent": true, - "minProperties": 2, - "multiline": true - } - ], - "object-curly-spacing": [ - "error", - "always", - { - "arraysInObjects": false, - "objectsInObjects": false - } - ], - "one-var": [ - "error", - "never" - ], - "prefer-reflect": [ - "off" - ], - "quote-props": [ - "error", - "consistent-as-needed", - { - "keywords": true, - "numbers": true, - "unnecessary": true - } - ], - "quotes": [ - "error", - "double", - { - "allowTemplateLiterals": false, - "avoidEscape": false - } - ], - "require-jsdoc": [ - "off" - ], - "semi": [ - "error", - "always", - { - "omitLastInOneLineBlock": false - } - ], - "semi-spacing": [ - "error", - { - "after": true, - "before": false - } - ], - "semi-style": [ - "error", - "last" - ], - "sort-imports": [ - "error", - { - "ignoreCase": false, - "ignoreDeclarationSort": true, - "ignoreMemberSort": false, - "memberSyntaxSortOrder": [ - "all", - "multiple", - "single", - "none" - ] - } - ], - "sort-keys": [ - "warn", - "asc", - { - "caseSensitive": true, - "minKeys": 2, - "natural": true - } - ], - "sort-vars": [ - "error", - { - "ignoreCase": false - } - ], - "space-before-blocks": [ - "error", - "always" - ], - "space-before-function-paren": [ - "error", - { - "anonymous": "always", - "asyncArrow": "always", - "named": "never" - } - ], - "valid-jsdoc": [ - "off" - ], - "valid-typeof": [ - "error", - { - "requireStringLiterals": true - } - ] -} -- cgit v1.2.3