Skip to content

Check eslint-plugin-unicorn rules to enable/configure/disable #2439

@ST-DDT

Description

@ST-DDT

Followup on #2418

Currently all the following rules are disabled because they cause issues in the code:

Undecided

Rule Count Status/PR
unicorn/prevent-abbreviations 232 🤔 - #3320

Last updated: 2023-10-07

Rejected

Rule Count Status/PR
unicorn/import-style 8 🔴 - #2901 - doesn't do anything for us
unicorn/no-nested-ternary N/A 🔴 - incompatible with prettier
unicorn/no-null N/A 🔴 - incompatible with TypeScript
unicorn/no-object-as-default-parameter 6 🔴 - Unicorn-Issue
unicorn/no-zero-fractions 17 🔴 - #2453
unicorn/numeric-separators-style 131 🔴 - #2815
unicorn/number-literal-case N/A 🔴 - incompatible with prettier
unicorn/prefer-string-slice 75 🔴 - string.subtring is sometimes easier to understand - #3247 #2814
unicorn/prefer-ternary 8 🔴 - #2464

Accepted

Rule Count Status/PR
unicorn/catch-error-name 3 🟢 - #2471
unicorn/consistent-destructuring 4 🟢 - #2462
unicorn/consistent-function-scoping 12 🟢 - #3255 - Related: #2667
unicorn/escape-case 3 🟢 - #2469
unicorn/explicit-length-check 4 🟢 - #2455
unicorn/filename-case 1203 🟢 - #2492
unicorn/no-array-callback-reference 6 🟢 - #2722
unicorn/no-array-for-each 28 🟢 - #2461
unicorn/no-array-reduce 8 🟢 - #2479
unicorn/no-array-push-push 4 🟢 - #2454
unicorn/no-await-expression-member 6 🟢 - #2812
unicorn/no-console-spaces 2 🟢 - #2447
unicorn/no-for-loop 2 🟢 - #2490
unicorn/no-hex-escape 1 🟢 - #2440
unicorn/no-instanceof-array 1 🟢 - #2459
unicorn/no-negated-condition 2 🟢 - #2507
unicorn/no-new-array 1 🟢 - #2441
unicorn/no-process-exit 1 🟢 - #2448
unicorn/no-useless-switch-case 4 🟢 - #2508
unicorn/prefer-array-flat-map 2 🟢 - #2446
unicorn/prefer-array-some 1 🟢 - #2451
unicorn/prefer-at N/A 🟢 - #2654
unicorn/prefer-code-point 14 🟢 - #2509
unicorn/prefer-date-now N/A 🟢 - #2419
unicorn/prefer-export-from 74 🟢 - #3272
unicorn/prefer-includes 3 🟢 - #2463
unicorn/prefer-module 10 🟢 - #2510
unicorn/prefer-native-coercion-functions 1 🟢 - #2445
unicorn/prefer-negative-index 1 🟢 - #2512
unicorn/prefer-node-protocol N/A 🟢 - #2420
unicorn/prefer-number-properties 23 🟢 - #2452
unicorn/prefer-object-from-entries 3 🟢 - #2443
unicorn/prefer-optional-catch-binding 1 🟢 - #2491
unicorn/prefer-string-replace-all N/A 🟢 - #2653
unicorn/prefer-spread 51 🟢 - #2421
unicorn/prefer-string-starts-ends-with 1 🟢 - #2442
unicorn/prefer-top-level-await 4 🟢 - #2680
unicorn/require-array-join-separator N/A 🟢 - #2813
unicorn/switch-case-braces 51 🟢 - #2721
unicorn/text-encoding-identifier-case 3 🟢 - #2465

Please leave a comment if you wish to tackle any of these.


Legend:

  • 🤔 : This needs a decision whether we want to enable this.
  • 🔴 : We will not enable this rule.
  • 🟡 : We probably want to enable this rule, but maybe with additional configuration.
  • 🟢 : We want to enable this rule. Contributions welcome.
  • #1234 : Reference to the related PR.

The above list can be updated using the following command:

pnpm run lint | grep 'unicorn/' | sed 's/.*unicorn/unicorn/' | sort | uniq -c | sed -E 's/ *(.*) unicorn\/(.*)/\| [`unicorn\/\2`](https:\/\/github.com\/sindresorhus\/eslint-plugin-unicorn\/blob\/main\/docs\/rules\/\2.md) \| \1 \| 🤔 \|/'

Metadata

Metadata

Assignees

Labels

c: infraChanges to our infrastructure or project setupp: 1-normalNothing urgent

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions