-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add in recommended unicorn rules
This was probably an intentional omission, but I think it's better to manually disable these rules.
- Loading branch information
Showing
7 changed files
with
27 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 4 additions & 39 deletions
43
packages/eslint-config-sheriff/src/handpickedRules/unicornHandPickedRules.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,11 @@ | ||
import type { TSESLint } from '@typescript-eslint/utils'; | ||
|
||
export const unicornHandPickedRules = { | ||
'unicorn/better-regex': 2, | ||
'unicorn/explicit-length-check': 2, | ||
'unicorn/consistent-function-scoping': 2, | ||
'unicorn/prefer-default-parameters': 2, | ||
'unicorn/no-array-push-push': 2, | ||
'unicorn/prefer-array-index-of': 2, | ||
'unicorn/prefer-array-flat-map': 2, | ||
'unicorn/prefer-array-some': 2, | ||
'unicorn/prefer-array-find': 2, | ||
'unicorn/prefer-array-flat': 2, | ||
'unicorn/prefer-includes': 2, | ||
'unicorn/prefer-top-level-await': 2, | ||
'unicorn/prefer-spread': 2, | ||
'unicorn/no-useless-spread': 2, | ||
'unicorn/no-useless-fallback-in-spread': 2, | ||
'unicorn/no-for-loop': 2, | ||
'unicorn/prefer-set-size': 2, | ||
'unicorn/prefer-type-error': 2, | ||
'unicorn/prefer-object-from-entries': 2, | ||
'unicorn/no-instanceof-array': 2, | ||
'unicorn/prefer-native-coercion-functions': 2, | ||
'unicorn/prefer-logical-operator-over-ternary': 2, | ||
'unicorn/prefer-event-target': 2, | ||
'unicorn/no-await-expression-member': 2, | ||
'unicorn/no-new-array': 2, | ||
'unicorn/throw-new-error': 2, | ||
'unicorn/no-array-reduce': 2, | ||
'unicorn/no-useless-length-check': 2, | ||
'unicorn/prefer-prototype-methods': 2, | ||
'unicorn/prefer-date-now': 2, | ||
'unicorn/prefer-node-protocol': 2, | ||
'unicorn/prefer-export-from': [2, { ignoreUsedVariables: true }], | ||
'unicorn/no-new-buffer': 2, | ||
'unicorn/prefer-query-selector': 2, | ||
'unicorn/prefer-string-replace-all': 2, | ||
'unicorn/prefer-switch': [2, { emptyDefaultCase: 'do-nothing-comment' }], | ||
'unicorn/switch-case-braces': 2, | ||
'unicorn/catch-error-name': 2, | ||
'unicorn/consistent-destructuring': 2, | ||
'unicorn/prefer-string-slice': 2, | ||
'unicorn/no-await-in-promise-methods': 2, | ||
'unicorn/no-single-promise-in-promise-methods': 2, | ||
'unicorn/filename-case': 0, // This rule is project-specific. | ||
'unicorn/no-null': 0, // This rule is too strict. | ||
'unicorn/no-process-exit': 0, // This rule is wrong in the context of a CLI. | ||
'unicorn/prevent-abbreviations': 0, // This rule is too strict. | ||
} as const satisfies TSESLint.FlatConfig.Rules; |