Enable unicorn/no-useless-template-literals rule (#19383)
This commit is contained in:
1 parent
d1da0de0f6
commit
a42e063d5c
7 files changed
+25
-31
No files matched your search
+19
-24
@@ -43,8 +43,8 @@ vendors/**
|
||||
const configs = [
|
||||
{ files: ["**/*.{js,mjs,cjs,jsx}"] },
|
||||
eslintPluginJs.configs.recommended,
|
||||
eslintPluginRegexp.configs["flat/recommended"],
|
||||
eslintPluginUnicorn.configs["flat/recommended"],
|
||||
eslintPluginRegexp.configs.recommended,
|
||||
eslintPluginUnicorn.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
eslintConfigNodeStyleText,
|
||||
{
|
||||
@@ -58,7 +58,6 @@ const configs = [
|
||||
"prettier-internal-rules": eslintPluginPrettierInternalRules,
|
||||
"simple-import-sort": eslintPluginSimpleImportSort,
|
||||
},
|
||||
|
||||
rules: {
|
||||
"arrow-body-style": ["error", "as-needed"],
|
||||
curly: "error",
|
||||
@@ -250,26 +249,38 @@ const configs = [
|
||||
"unicorn/escape-case": "off",
|
||||
"unicorn/filename-case": ["error", { checkDirectories: false }],
|
||||
"unicorn/import-style": "off",
|
||||
"unicorn/max-nested-calls": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-method-this-argument": "off",
|
||||
"unicorn/no-array-reduce": "off",
|
||||
"unicorn/no-array-reverse": "off",
|
||||
"unicorn/no-array-sort": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/no-break-in-nested-loop": "off",
|
||||
"unicorn/no-computed-property-existence-check": "off",
|
||||
// Disabled due to false positives
|
||||
"unicorn/no-declarations-before-early-exit": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-global-object-property-assignment": "off",
|
||||
"unicorn/no-hex-escape": "off",
|
||||
// Bug on `"\u{3000}"`
|
||||
"unicorn/no-incorrect-template-string-interpolation": "off",
|
||||
"unicorn/no-invalid-argument-count": "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-this-outside-of-class": "off",
|
||||
"unicorn/no-top-level-side-effects": "off",
|
||||
"unicorn/no-undeclared-class-members": "off",
|
||||
"unicorn/no-unreadable-array-destructuring": "off",
|
||||
"unicorn/no-unreadable-new-expression": "off",
|
||||
"unicorn/no-unreadable-object-destructuring": "off",
|
||||
"unicorn/no-unsafe-string-replacement": "off",
|
||||
"unicorn/no-useless-concat": "off",
|
||||
"unicorn/no-useless-fallback-in-spread": "off",
|
||||
"unicorn/no-useless-recursion": "off",
|
||||
"unicorn/no-useless-switch-case": "off",
|
||||
"unicorn/no-useless-undefined": [
|
||||
"error",
|
||||
@@ -292,9 +303,11 @@ const configs = [
|
||||
getLastElementFunctions: ["getLast"],
|
||||
},
|
||||
],
|
||||
"unicorn/prefer-await": "off",
|
||||
"unicorn/prefer-code-point": "off",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-dom-node-remove": "off",
|
||||
"unicorn/prefer-early-return": "off",
|
||||
"unicorn/prefer-export-from": [
|
||||
"error",
|
||||
{
|
||||
@@ -305,35 +318,17 @@ const configs = [
|
||||
"unicorn/prefer-global-this": "off",
|
||||
"unicorn/prefer-https": "off",
|
||||
"unicorn/prefer-includes-over-repeated-comparisons": "off",
|
||||
"unicorn/prefer-minimal-ternary": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-short-arrow-method": "off",
|
||||
"unicorn/prefer-ternary": "off",
|
||||
"unicorn/prefer-unicode-code-point-escapes": "off",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/relative-url-style": "off",
|
||||
"unicorn/require-array-sort-compare": "off",
|
||||
"unicorn/switch-case-braces": ["error", "avoid"],
|
||||
"unicorn/template-indent": "error",
|
||||
|
||||
// TODO: Enable the followings
|
||||
"unicorn/prefer-short-arrow-method": "off",
|
||||
"unicorn/no-useless-concat": "off",
|
||||
"unicorn/no-computed-property-existence-check": "off",
|
||||
"unicorn/no-useless-recursion": "off",
|
||||
"unicorn/prefer-minimal-ternary": "off",
|
||||
"unicorn/max-nested-calls": "off",
|
||||
"unicorn/no-invalid-argument-count": "off",
|
||||
"unicorn/no-unreadable-object-destructuring": "off",
|
||||
"unicorn/no-unreadable-new-expression": "off",
|
||||
"unicorn/prefer-unicode-code-point-escapes": "off",
|
||||
"unicorn/no-break-in-nested-loop": "off",
|
||||
"unicorn/prefer-early-return": "off",
|
||||
"unicorn/no-undeclared-class-members": "off",
|
||||
"unicorn/no-useless-fallback-in-spread": "off",
|
||||
"unicorn/no-useless-template-literals": "off",
|
||||
"unicorn/no-global-object-property-assignment": "off",
|
||||
"unicorn/prefer-await": "off",
|
||||
"unicorn/no-top-level-side-effects": "off",
|
||||
},
|
||||
|
||||
linterOptions: {
|
||||
reportUnusedDisableDirectives: "error",
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user