mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 10:00:08 +00:00
[Dev] Reverse unicorn lint config - on by default (#633)
Sets unicorn linter recommended rules on by default, with individual rules disabled. - Issue to track removal of these rules: #629
This commit is contained in:
@@ -19,10 +19,6 @@ const antfuLint = {
|
||||
|
||||
const unicornRecommended = eslintPluginUnicorn.configs.recommended
|
||||
|
||||
for (const id of Object.keys(unicornRecommended.rules)) {
|
||||
unicornRecommended.rules[id] = "off"
|
||||
}
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: [".*/**", "dist/**", "scripts/**"] },
|
||||
{ files: ["**/*.{js,mjs,ts,mts}"] },
|
||||
@@ -61,18 +57,53 @@ export default tseslint.config(
|
||||
unicornRecommended,
|
||||
{
|
||||
rules: {
|
||||
"unicorn/better-regex": "error",
|
||||
"unicorn/prefer-dom-node-append": "error",
|
||||
"unicorn/prefer-dom-node-remove": "error",
|
||||
"unicorn/no-array-for-each": "error",
|
||||
"unicorn/empty-brace-spaces": "error",
|
||||
"unicorn/no-nested-ternary": "error",
|
||||
"unicorn/prefer-string-replace-all": "error",
|
||||
"unicorn/prefer-dom-node-text-content": "error",
|
||||
// Temporarily disabled
|
||||
// See https://github.com/Comfy-Org/litegraph.js/issues/629
|
||||
"unicorn/prefer-export-from": "off",
|
||||
"unicorn/catch-error-name": "off",
|
||||
"unicorn/consistent-existence-index-check": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-push-push": "off",
|
||||
"unicorn/no-console-spaces": "off",
|
||||
"unicorn/no-lonely-if": "off",
|
||||
"unicorn/no-this-assignment": "off",
|
||||
"unicorn/no-typeof-undefined": "off",
|
||||
"unicorn/no-useless-switch-case": "off",
|
||||
"unicorn/no-zero-fractions": "off",
|
||||
"unicorn/numeric-separators-style": "off",
|
||||
"unicorn/prefer-add-event-listener": "off",
|
||||
"unicorn/prefer-blob-reading-methods": "off",
|
||||
"unicorn/prefer-date-now": "off",
|
||||
"unicorn/prefer-default-parameters": "off",
|
||||
"unicorn/prefer-keyboard-event-key": "off",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "off",
|
||||
"unicorn/prefer-math-min-max": "off",
|
||||
"unicorn/prefer-native-coercion-functions": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-spread": "off",
|
||||
"unicorn/prefer-structured-clone": "off",
|
||||
"unicorn/prefer-switch": "off",
|
||||
"unicorn/prefer-ternary": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
|
||||
// Disable rules
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/explicit-length-check": "off",
|
||||
"unicorn/filename-case": "off",
|
||||
"unicorn/no-negated-condition": "off",
|
||||
"unicorn/no-new-array": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/prefer-global-this": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-string-raw": "off",
|
||||
"unicorn/prefer-string-slice": "off",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/require-number-to-fixed-digits-argument": "off",
|
||||
"unicorn/switch-case-braces": "off",
|
||||
|
||||
// Node rules: dev dependency config, etc.
|
||||
"unicorn/prefer-node-protocol": "error",
|
||||
"unicorn/prefer-module": "error",
|
||||
"unicorn/prefer-node-protocol": "error",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user