diff options
author | isaacs <i@izs.me> | 2020-10-23 21:15:35 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-10-23 21:23:15 +0300 |
commit | 47640eb2c3cd9891e904e3f6bc705b6618096103 (patch) | |
tree | 8b1b635135a5672ed0da4d8e6feade0f9d8fa60d /.eslintrc.json | |
parent | b737ee99961364827bacf210a3e5ca5d2b7edad2 (diff) |
update lint rules to match @npmcli/arborist
Diffstat (limited to '.eslintrc.json')
-rw-r--r-- | .eslintrc.json | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 7253bed6a..6232a8f82 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,10 +1,8 @@ { "parserOptions": { - "ecmaVersion": 2020, - "ecmaFeatures": { - "jsx": true - }, - "sourceType": "module" + "ecmaVersion": 2018, + "ecmaFeatures": {}, + "sourceType": "script" }, "env": { @@ -30,20 +28,20 @@ "array-bracket-spacing": ["error", "never"], "arrow-spacing": ["error", { "before": true, "after": true }], "block-spacing": ["error", "always"], - "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "brace-style": ["error", "1tbs", { "allowSingleLine": false }], "camelcase": ["error", { "properties": "never" }], "comma-dangle": ["error", { - "arrays": "never", - "objects": "never", - "imports": "never", - "exports": "never", + "arrays": "always-multiline", + "objects": "always-multiline", + "imports": "always-multiline", + "exports": "always-multiline", "functions": "never" }], "comma-spacing": ["error", { "before": false, "after": true }], "comma-style": ["error", "last"], "computed-property-spacing": ["error", "never"], "constructor-super": "error", - "curly": ["error", "multi-line"], + "curly": ["error", "multi-or-nest"], "dot-location": ["error", "property"], "dot-notation": ["error", { "allowKeywords": true }], "eol-last": "error", @@ -77,7 +75,7 @@ "no-case-declarations": "error", "no-class-assign": "error", "no-compare-neg-zero": "error", - "no-cond-assign": "error", + "no-cond-assign": "off", "no-const-assign": "error", "no-constant-condition": ["error", { "checkLoops": false }], "no-control-regex": "error", @@ -104,25 +102,18 @@ "no-invalid-regexp": "error", "no-irregular-whitespace": "error", "no-iterator": "error", - "no-labels": ["error", { "allowLoop": false, "allowSwitch": false }], + "no-labels": ["error", { "allowLoop": true, "allowSwitch": false }], "no-lone-blocks": "error", "no-misleading-character-class": "error", "no-prototype-builtins": "error", "no-useless-catch": "error", - "no-mixed-operators": ["error", { - "groups": [ - ["==", "!=", "===", "!==", ">", ">=", "<", "<="], - ["&&", "||"], - ["in", "instanceof"] - ], - "allowSamePrecedence": true - }], + "no-mixed-operators": "off", "no-mixed-spaces-and-tabs": "error", "no-multi-spaces": "error", "no-multi-str": "error", "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }], "no-negated-in-lhs": "error", - "no-new": "error", + "no-new": "off", "no-new-func": "error", "no-new-object": "error", "no-new-require": "error", @@ -135,8 +126,8 @@ "no-proto": "error", "no-redeclare": ["error", { "builtinGlobals": false }], "no-regex-spaces": "error", - "no-return-assign": ["error", "except-parens"], - "no-self-assign": ["error", { "props": true }], + "no-return-assign": "off", + "no-self-assign": "off", "no-self-compare": "error", "no-sequences": "error", "no-shadow-restricted-names": "error", @@ -166,16 +157,17 @@ "no-void": "error", "no-whitespace-before-property": "error", "no-with": "error", - "object-curly-newline": ["error", { "multiline": true, "consistent": true }], - "object-curly-spacing": ["error", "always"], + "nonblock-statement-body-position": [2, "below"], + "object-curly-newline": "off", + "object-curly-spacing": "off", "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }], "one-var": ["error", { "initialized": "never" }], - "operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before", "|>": "before" } }], + "operator-linebreak": "off", "padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }], "prefer-const": ["error", {"destructuring": "all"}], "prefer-promise-reject-errors": "error", "quote-props": ["error", "as-needed"], - "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }], + "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], "rest-spread-spacing": ["error", "never"], "semi": ["error", "never"], "semi-spacing": ["error", { "before": false, "after": true }], |