Skip to content

Commit

Permalink
fix: disable some unicron rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 3, 2024
1 parent bee2c5d commit e6985f2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/configs/unicorn.ts
Expand Up @@ -12,7 +12,8 @@ export const unicorn: FlatESLintConfigItem[] = [
'unicorn/custom-error-definition': 'error',
'unicorn/error-message': 'error',
'unicorn/escape-case': 'error',
'unicorn/explicit-length-check': 'error',
// disabled for better bundle size
// 'unicorn/explicit-length-check': 'error',
'unicorn/filename-case': [
'error',
{
Expand All @@ -21,7 +22,8 @@ export const unicorn: FlatESLintConfigItem[] = [
},
],
'unicorn/new-for-builtins': 'error',
'unicorn/no-array-callback-reference': 'error',
// disabled for better bundle size
// 'unicorn/no-array-callback-reference': 'error',
'unicorn/no-array-method-this-argument': 'error',
'unicorn/no-array-push-push': 'error',
'unicorn/no-await-in-promise-methods': 'error',
Expand Down Expand Up @@ -66,7 +68,8 @@ export const unicorn: FlatESLintConfigItem[] = [
'unicorn/prefer-string-slice': 'error',
'unicorn/prefer-string-starts-ends-with': 'error',
'unicorn/prefer-string-trim-start-end': 'error',
'unicorn/prefer-top-level-await': 'error',
// top level await is not supported in all environments
// 'unicorn/prefer-top-level-await': 'error',
'unicorn/prefer-type-error': 'error',
'unicorn/throw-new-error': 'error',
},
Expand Down

0 comments on commit e6985f2

Please sign in to comment.