Skip to content

Commit

Permalink
Enable recommended unicorn rules that doesn't error
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Feb 19, 2025
1 parent 6d0d43e commit 6ef467a
Showing 1 changed file with 78 additions and 1 deletion.
79 changes: 78 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,84 @@ export default [
name: 'semver',
message: 'Please use semifies instead.'
}
]]
]],

...eslintPluginUnicorn.configs.recommended.rules,

// Overriding recommended unicorn rules
'unicorn/catch-error-name': ['off', { name: 'err' }], // 166 errors
'unicorn/consistent-existence-index-check': 'off', // 4 errors
'unicorn/consistent-function-scoping': 'off', // 21 errors
'unicorn/empty-brace-spaces': 'off', // 15 errors
'unicorn/error-message': 'off', // 1 error
'unicorn/escape-case': 'off', // 8 errors
'unicorn/expiring-todo-comments': 'off',
'unicorn/explicit-length-check': 'off', // 68 errors
'unicorn/filename-case': ['off', { case: 'kebabCase' }], // 59 errors
'unicorn/import-style': 'off', // 9 errors - controversial
'unicorn/new-for-builtins': 'off', // 5 errors
'unicorn/no-abusive-eslint-disable': 'off', // 10 errors
'unicorn/no-anonymous-default-export': 'off', // only makes a difference for ESM
'unicorn/no-array-callback-reference': 'off', // too strict
'unicorn/no-array-for-each': 'off', // 122 errors
'unicorn/no-array-push-push': 'off', // 6 errors
'unicorn/no-array-reduce': 'off', // too strict
'unicorn/no-for-loop': 'off', // 15 errors
'unicorn/no-hex-escape': 'off', // too strict
'unicorn/no-instanceof-array': 'off', // 5 errors
'unicorn/no-instanceof-builtins': 'off', // 10 errors
'unicorn/no-lonely-if': 'off', // 19 errors
'unicorn/no-negated-condition': 'off', // too strict
'unicorn/no-nested-ternary': 'off', // too strict
'unicorn/no-new-array': 'off', // 6 errors
'unicorn/no-null': 'off', // too strict
'unicorn/no-object-as-default-parameter': 'off', // too strict
'unicorn/no-static-only-class': 'off', // 1 error
'unicorn/no-this-assignment': 'off', // too strict
'unicorn/no-typeof-undefined': 'off', // 1 error
'unicorn/no-unreadable-array-destructuring': 'off', // TODO: undecided
'unicorn/no-unreadable-iife': 'off', // too strict
'unicorn/no-useless-promise-resolve-reject': 'off', // 3 errors
'unicorn/no-useless-undefined': 'off', // 59 errors
'unicorn/no-zero-fractions': 'off', // 5 errors
'unicorn/number-literal-case': 'off', // 44 errors
'unicorn/numeric-separators-style': 'off', // 35 errors
'unicorn/prefer-array-flat-map': 'off', // 1 error
'unicorn/prefer-array-flat': 'off', // 9 errors
'unicorn/prefer-array-some': 'off', // 2 errors
'unicorn/prefer-at': 'off', // 47 errors
'unicorn/prefer-code-point': 'off', // 3 errors
'unicorn/prefer-default-parameters': 'off', // 1 error
'unicorn/prefer-event-target': 'off', // TODO: undecided (2 errors)
'unicorn/prefer-export-from': 'off', // 1 error
'unicorn/prefer-global-this': 'off', // 23 errors
'unicorn/prefer-includes': 'off', // 19 errors
'unicorn/prefer-logical-operator-over-ternary': 'off', // 15 errors
'unicorn/prefer-math-min-max': 'off', // 1 error
'unicorn/prefer-math-trunc': 'off', // 8 errors
'unicorn/prefer-module': 'off', // too strict
'unicorn/prefer-native-coercion-functions': 'off', // 18 errors
'unicorn/prefer-negative-index': 'off', // 1 error
'unicorn/prefer-node-protocol': 'off', // 148 errors
'unicorn/prefer-number-properties': 'off', // 56 errors
'unicorn/prefer-object-from-entries': 'off', // 3 errors
'unicorn/prefer-optional-catch-binding': 'off', // 62 errors
'unicorn/prefer-reflect-apply': 'off', // too strict
'unicorn/prefer-regexp-test': 'off', // 6 errors
'unicorn/prefer-set-has': 'off', // 18 errors
'unicorn/prefer-spread': 'off', // 36 errors
'unicorn/prefer-string-raw': 'off', // 22 errors
'unicorn/prefer-string-replace-all': 'off', // 33 errors
'unicorn/prefer-string-slice': 'off', // 53 errors
'unicorn/prefer-switch': 'off', // 8 errors
'unicorn/prefer-ternary': 'off', // 48 errors
'unicorn/prefer-top-level-await': 'off', // too strict
'unicorn/prefer-type-error': 'off', // 5 errors
'unicorn/prevent-abbreviations': 'off', // too strict
'unicorn/relative-url-style': 'off', // 1 error
'unicorn/switch-case-braces': 'off', // too strict
'unicorn/text-encoding-identifier-case': 'off', // 4 errors
'unicorn/throw-new-error': 'off' // 5 errors
}
},
{
Expand Down

0 comments on commit 6ef467a

Please sign in to comment.