From 8c20f4b687daff37d60581e05c7d8cf7f0e4920e Mon Sep 17 00:00:00 2001 From: Psilon Date: Wed, 16 Feb 2022 23:44:04 +0300 Subject: [PATCH] fix eslintrc --- .editorconfig | 2 +- .eslintrc | 127 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 94 insertions(+), 35 deletions(-) diff --git a/.editorconfig b/.editorconfig index a3ebc2b7..bcec85bc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,5 @@ indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true -[*.{json,csproj,xml,yaml,hs}] +[*.{json,csproj,xml,yaml,hs,eslintrc}] indent_size = 2 diff --git a/.eslintrc b/.eslintrc index b5e938c8..2cf38a0d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,55 +1,114 @@ { - "root": true, - "extends" : [ + "root": true, + "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "plugins": [ + ], + "parser": "@typescript-eslint/parser", + "plugins": [ "@typescript-eslint" - ], - "env": { - "browser" : true, - "node" : true, - "mocha" : true, - "jest" : true - }, - "globals" : { + ], + "env": { + "browser": true, + "node": true, + "mocha": true, + "jest": true + }, + "globals": { "artifacts": false, "contract": false, "assert": false, "web3": false - }, - "rules": { + }, + "rules": { // TS "@typescript-eslint/no-non-null-assertion": "off", - // Strict mode - "strict": [2, "global"], - + "strict": [ + 2, + "global" + ], // Code style - "indent": [2, 4], - "quotes": [2, "single"], - "semi": ["error", "always"], - "space-before-function-paren": ["error", "always"], + "indent": [ + 2, + 4 + ], + "quotes": [ + 2, + "single" + ], + "semi": [ + "error", + "always" + ], + "space-before-function-paren": [ + "error", + "always" + ], "no-use-before-define": 0, "no-unused-expressions": "off", - "eqeqeq": [2, "smart"], - "dot-notation": [2, {"allowKeywords": true, "allowPattern": ""}], - "no-redeclare": [2, {"builtinGlobals": true}], - "no-trailing-spaces": [2, { "skipBlankLines": true }], + "eqeqeq": [ + 2, + "smart" + ], + "dot-notation": [ + 2, + { + "allowKeywords": true, + "allowPattern": "" + } + ], + "no-redeclare": [ + 2, + { + "builtinGlobals": true + } + ], + "no-trailing-spaces": [ + 2, + { + "skipBlankLines": true + } + ], "eol-last": 1, - "comma-spacing": [2, {"before": false, "after": true}], - "camelcase": [2, {"properties": "always"}], - "no-mixed-spaces-and-tabs": [2, "smart-tabs"], - "comma-dangle": [1, "always-multiline"], + "comma-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "camelcase": [ + 2, + { + "properties": "always" + } + ], + "no-mixed-spaces-and-tabs": [ + 2, + "smart-tabs" + ], + "comma-dangle": [ + 1, + "always-multiline" + ], "no-dupe-args": 2, "no-dupe-keys": 2, "no-debugger": 0, - "object-curly-spacing": [2, "always"], - "max-len": [2, 200, 2], - "generator-star-spacing": ["error", "before"], + "object-curly-spacing": [ + 2, + "always" + ], + "max-len": [ + 2, + 200, + 2 + ], + "generator-star-spacing": [ + "error", + "before" + ], "promise/avoid-new": 0, "promise/always-return": 0 - } } +}