mirror of https://github.com/zulip/zulip.git
eslint: Convert 2 to error in config.
This commit is contained in:
parent
9f916f78da
commit
71caf114fb
182
.eslintrc.json
182
.eslintrc.json
|
@ -223,7 +223,7 @@
|
|||
"array-callback-return": "error",
|
||||
"array-bracket-spacing": "error",
|
||||
"arrow-spacing": [ "error", { "before": true, "after": true } ],
|
||||
"block-scoped-var": 2,
|
||||
"block-scoped-var": "error",
|
||||
"brace-style": [ "error", "1tbs", { "allowSingleLine": true } ],
|
||||
"camelcase": 0,
|
||||
"comma-dangle": [ "error",
|
||||
|
@ -242,13 +242,13 @@
|
|||
}
|
||||
],
|
||||
"complexity": [ 0, 4 ],
|
||||
"curly": 2,
|
||||
"curly": "error",
|
||||
"dot-notation": [ "error", { "allowKeywords": true } ],
|
||||
"empty-returns/main": "error",
|
||||
"eol-last": [ "error", "always" ],
|
||||
"eqeqeq": 2,
|
||||
"eqeqeq": "error",
|
||||
"func-style": [ "off", "expression" ],
|
||||
"guard-for-in": 2,
|
||||
"guard-for-in": "error",
|
||||
"indent": ["error", 4, {
|
||||
"ArrayExpression": "first",
|
||||
"outerIIFEBody": 0,
|
||||
|
@ -293,68 +293,68 @@
|
|||
"capIsNew": false
|
||||
}
|
||||
],
|
||||
"new-parens": 2,
|
||||
"new-parens": "error",
|
||||
"newline-per-chained-call": 0,
|
||||
"no-alert": 2,
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": 2,
|
||||
"no-caller": 2,
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-case-declarations": "error",
|
||||
"no-catch-shadow": 2,
|
||||
"no-catch-shadow": "error",
|
||||
"no-console": 0,
|
||||
"no-const-assign": "error",
|
||||
"no-control-regex": 2,
|
||||
"no-debugger": 2,
|
||||
"no-delete-var": 2,
|
||||
"no-div-regex": 2,
|
||||
"no-control-regex": "error",
|
||||
"no-debugger": "error",
|
||||
"no-delete-var": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-dupe-class-members": "error",
|
||||
"no-dupe-keys": 2,
|
||||
"no-dupe-keys": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": 2,
|
||||
"no-empty": 2,
|
||||
"no-empty-character-class": 2,
|
||||
"no-eq-null": 2,
|
||||
"no-eval": 2,
|
||||
"no-ex-assign": 2,
|
||||
"no-else-return": "error",
|
||||
"no-empty": "error",
|
||||
"no-empty-character-class": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-ex-assign": "error",
|
||||
"no-extra-parens": ["error", "all"],
|
||||
"no-extra-semi": 2,
|
||||
"no-fallthrough": 2,
|
||||
"no-floating-decimal": 2,
|
||||
"no-func-assign": 2,
|
||||
"no-implied-eval": 2,
|
||||
"no-extra-semi": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-func-assign": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": 2,
|
||||
"no-labels": 2,
|
||||
"no-loop-func": 2,
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-mixed-requires": [ 0, false ],
|
||||
"no-multi-str": 2,
|
||||
"no-native-reassign": 2,
|
||||
"no-multi-str": "error",
|
||||
"no-native-reassign": "error",
|
||||
"no-nested-ternary": 0,
|
||||
"no-new-func": "error",
|
||||
"no-new-object": 2,
|
||||
"no-new-wrappers": 2,
|
||||
"no-obj-calls": 2,
|
||||
"no-octal": 2,
|
||||
"no-octal-escape": 2,
|
||||
"no-new-object": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-octal": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": 0,
|
||||
"no-plusplus": 2,
|
||||
"no-proto": 2,
|
||||
"no-redeclare": 2,
|
||||
"no-regex-spaces": 2,
|
||||
"no-plusplus": "error",
|
||||
"no-proto": "error",
|
||||
"no-redeclare": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-restricted-syntax": 0,
|
||||
"no-return-assign": 2,
|
||||
"no-script-url": 2,
|
||||
"no-self-compare": 2,
|
||||
"no-return-assign": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-shadow": 0,
|
||||
"no-sync": 2,
|
||||
"no-sync": "error",
|
||||
"no-ternary": 0,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef": "error",
|
||||
"no-undef-init": 2,
|
||||
"no-undef-init": "error",
|
||||
"no-underscore-dangle": 0,
|
||||
"no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
|
||||
"no-unreachable": 2,
|
||||
"no-unused-expressions": 2,
|
||||
"no-unreachable": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": [ "error",
|
||||
{
|
||||
"vars": "local",
|
||||
|
@ -362,16 +362,16 @@
|
|||
"varsIgnorePattern": "print_elapsed_time|check_duplicate_ids"
|
||||
}
|
||||
],
|
||||
"no-use-before-define": 2,
|
||||
"no-use-before-define": "error",
|
||||
"no-useless-constructor": "error",
|
||||
// The Zulip codebase complies partially with the "no-useless-escape"
|
||||
// rule; only regex expressions haven't been updated yet.
|
||||
// Updated regex expressions are currently being tested in casper
|
||||
// files and will decide about a potential future enforcement of this rule.
|
||||
"no-useless-escape": 0,
|
||||
"space-unary-ops": 2,
|
||||
"no-whitespace-before-property": 2,
|
||||
"no-with": 2,
|
||||
"space-unary-ops": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"one-var": [ "error", "never" ],
|
||||
"padded-blocks": 0,
|
||||
"prefer-const": [ "error",
|
||||
|
@ -388,10 +388,10 @@
|
|||
}
|
||||
],
|
||||
"quotes": [ 0, "single" ],
|
||||
"radix": 2,
|
||||
"semi": 2,
|
||||
"semi-spacing": [2, {"before": false, "after": true}],
|
||||
"space-before-blocks": 2,
|
||||
"radix": "error",
|
||||
"semi": "error",
|
||||
"semi-spacing": ["error", {"before": false, "after": true}],
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": [ "error",
|
||||
{
|
||||
"anonymous": "always",
|
||||
|
@ -399,17 +399,17 @@
|
|||
"asyncArrow": "always"
|
||||
}
|
||||
],
|
||||
"space-in-parens": 2,
|
||||
"space-infix-ops": 2,
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"spaced-comment": 0,
|
||||
"strict": 0,
|
||||
"template-curly-spacing": "error",
|
||||
"unnecessary-strict": 0,
|
||||
"use-isnan": 2,
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": [ "error", { "requireStringLiterals": true } ],
|
||||
"wrap-iife": [ "error", "outside", { "functionPrototypeMethods": false } ],
|
||||
"wrap-regex": 0,
|
||||
"yoda": 2
|
||||
"yoda": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
@ -428,58 +428,58 @@
|
|||
"semi": 0,
|
||||
"no-unused-vars": 0,
|
||||
|
||||
"@typescript-eslint/adjacent-overload-signatures": 2,
|
||||
"@typescript-eslint/array-type": 2,
|
||||
"@typescript-eslint/await-thenable": 2,
|
||||
"@typescript-eslint/ban-types": 2,
|
||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||
"@typescript-eslint/array-type": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"@typescript-eslint/ban-types": "error",
|
||||
"@typescript-eslint/ban-ts-ignore": 0,
|
||||
"@typescript-eslint/camelcase": 0,
|
||||
"@typescript-eslint/class-name-casing": 2,
|
||||
"@typescript-eslint/class-name-casing": "error",
|
||||
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
|
||||
"@typescript-eslint/explicit-member-accessibility": 0,
|
||||
"@typescript-eslint/func-call-spacing": 2,
|
||||
"@typescript-eslint/func-call-spacing": "error",
|
||||
"@typescript-eslint/generic-type-naming": 0,
|
||||
"@typescript-eslint/indent": 2,
|
||||
"@typescript-eslint/indent": "error",
|
||||
"@typescript-eslint/interface-name-prefix": 0,
|
||||
"@typescript-eslint/member-delimiter-style": 2,
|
||||
"@typescript-eslint/member-delimiter-style": "error",
|
||||
"@typescript-eslint/member-naming": ["error", { "private": "^_" } ],
|
||||
"@typescript-eslint/member-ordering": 2,
|
||||
"@typescript-eslint/no-angle-bracket-type-assertion": 2,
|
||||
"@typescript-eslint/no-array-constructor": 2,
|
||||
"@typescript-eslint/no-empty-interface": 2,
|
||||
"@typescript-eslint/member-ordering": "error",
|
||||
"@typescript-eslint/no-angle-bracket-type-assertion": "error",
|
||||
"@typescript-eslint/no-array-constructor": "error",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-extraneous-class": 2,
|
||||
"@typescript-eslint/no-extraneous-class": "error",
|
||||
"@typescript-eslint/no-for-in-array": 0,
|
||||
"@typescript-eslint/no-inferrable-types": 2,
|
||||
"@typescript-eslint/no-magic-numbers": 2,
|
||||
"@typescript-eslint/no-misused-new": 2,
|
||||
"@typescript-eslint/no-namespace": 2,
|
||||
"@typescript-eslint/no-inferrable-types": "error",
|
||||
"@typescript-eslint/no-magic-numbers": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": 0,
|
||||
"@typescript-eslint/no-object-literal-type-assertion": 2,
|
||||
"@typescript-eslint/no-parameter-properties": 2,
|
||||
"@typescript-eslint/no-object-literal-type-assertion": "error",
|
||||
"@typescript-eslint/no-parameter-properties": "error",
|
||||
"@typescript-eslint/no-require-imports": 0,
|
||||
"@typescript-eslint/no-this-alias": 0,
|
||||
"@typescript-eslint/no-triple-slash-reference": 2,
|
||||
"@typescript-eslint/no-triple-slash-reference": "error",
|
||||
"@typescript-eslint/no-type-alias": 0,
|
||||
"@typescript-eslint/no-unnecessary-qualifier": 2,
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": 2,
|
||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" } ],
|
||||
"@typescript-eslint/no-use-before-define": 2,
|
||||
"@typescript-eslint/no-useless-constructor": 2,
|
||||
"@typescript-eslint/no-use-before-define": "error",
|
||||
"@typescript-eslint/no-useless-constructor": "error",
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/prefer-for-of": 0,
|
||||
"@typescript-eslint/prefer-function-type": 0,
|
||||
"@typescript-eslint/prefer-includes": 2,
|
||||
"@typescript-eslint/prefer-includes": "error",
|
||||
"@typescript-eslint/prefer-interface": 0,
|
||||
"@typescript-eslint/prefer-namespace-keyword": 2,
|
||||
"@typescript-eslint/prefer-regexp-exec": 2,
|
||||
"@typescript-eslint/prefer-string-starts-ends-with": 2,
|
||||
"@typescript-eslint/promise-function-async": 2,
|
||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
||||
"@typescript-eslint/prefer-regexp-exec": "error",
|
||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||
"@typescript-eslint/promise-function-async": "error",
|
||||
"@typescript-eslint/restrict-plus-operands": 0,
|
||||
"@typescript-eslint/semi": 2,
|
||||
"@typescript-eslint/type-annotation-spacing": 2,
|
||||
"@typescript-eslint/semi": "error",
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unbound-method": 0,
|
||||
"@typescript-eslint/unified-signatures": 2
|
||||
"@typescript-eslint/unified-signatures": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue