Enable plugin:unicorn/recommended ruleset (#15559)
This commit is contained in:
1 parent
f852b8010e
commit
9d37f6229c
1 file changed
+34
-35
+34
-35
@@ -12,7 +12,12 @@ module.exports = {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
},
|
||||
extends: ["eslint:recommended", "prettier", "plugin:regexp/recommended"],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"prettier",
|
||||
"plugin:regexp/recommended",
|
||||
"plugin:unicorn/recommended",
|
||||
],
|
||||
plugins: [
|
||||
"prettier-internal-rules",
|
||||
"import",
|
||||
@@ -183,59 +188,53 @@ module.exports = {
|
||||
"regexp/no-super-linear-backtracking": "off",
|
||||
|
||||
// eslint-plugin-unicorn
|
||||
"unicorn/better-regex": "error",
|
||||
"unicorn/explicit-length-check": "error",
|
||||
"unicorn/filename-case": "error",
|
||||
"unicorn/new-for-builtins": "error",
|
||||
"unicorn/no-array-for-each": "error",
|
||||
"unicorn/no-array-push-push": "error",
|
||||
"unicorn/no-lonely-if": "error",
|
||||
"unicorn/no-new-array": "error",
|
||||
"unicorn/no-typeof-undefined": "error",
|
||||
"unicorn/no-unreadable-iife": "error",
|
||||
"unicorn/no-useless-length-check": "error",
|
||||
"unicorn/no-useless-promise-resolve-reject": "error",
|
||||
"unicorn/no-useless-undefined": "error",
|
||||
"unicorn/escape-case": "off",
|
||||
"unicorn/catch-error-name": "off",
|
||||
"unicorn/consistent-destructuring": "off",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/import-style": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-method-this-argument": "off",
|
||||
"unicorn/no-array-reduce": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-hex-escape": "off",
|
||||
"unicorn/no-negated-condition": "off",
|
||||
"unicorn/no-nested-ternary": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-process-exit": "off",
|
||||
"unicorn/no-thenable": "off",
|
||||
"unicorn/no-unreadable-array-destructuring": "off",
|
||||
"unicorn/no-useless-switch-case": "off",
|
||||
"unicorn/number-literal-case": "off",
|
||||
"unicorn/numeric-separators-style": "off",
|
||||
"unicorn/prefer-array-flat": [
|
||||
"error",
|
||||
{
|
||||
functions: ["flat", "flatten"],
|
||||
},
|
||||
],
|
||||
"unicorn/prefer-array-flat-map": "error",
|
||||
"unicorn/prefer-array-some": "error",
|
||||
"unicorn/prefer-add-event-listener": "off",
|
||||
"unicorn/prefer-at": [
|
||||
"error",
|
||||
{
|
||||
getLastElementFunctions: ["getLast"],
|
||||
},
|
||||
],
|
||||
"unicorn/prefer-code-point": "off",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-dom-node-remove": "off",
|
||||
"unicorn/prefer-export-from": [
|
||||
"error",
|
||||
{
|
||||
ignoreUsedVariables: true,
|
||||
},
|
||||
],
|
||||
"unicorn/prefer-includes": "error",
|
||||
"unicorn/prefer-json-parse-buffer": "error",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "error",
|
||||
"unicorn/prefer-module": "error",
|
||||
"unicorn/prefer-native-coercion-functions": "error",
|
||||
"unicorn/prefer-node-protocol": "error",
|
||||
"unicorn/prefer-number-properties": "error",
|
||||
"unicorn/prefer-optional-catch-binding": "error",
|
||||
"unicorn/prefer-regexp-test": "error",
|
||||
"unicorn/prefer-set-has": "error",
|
||||
"unicorn/prefer-set-size": "error",
|
||||
"unicorn/prefer-spread": "error",
|
||||
"unicorn/prefer-string-replace-all": "error",
|
||||
"unicorn/prefer-string-slice": "error",
|
||||
"unicorn/prefer-string-starts-ends-with": "error",
|
||||
"unicorn/prefer-switch": "error",
|
||||
"unicorn/prefer-type-error": "error",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-ternary": "off",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/relative-url-style": "off",
|
||||
"unicorn/switch-case-braces": ["error", "avoid"],
|
||||
"unicorn/template-indent": "error",
|
||||
"unicorn/text-encoding-identifier-case": "error",
|
||||
},
|
||||
overrides: [
|
||||
// CommonJS modules
|
||||
|
||||
Reference in new issue
Block a user