Skip to content

Commit 00dde2a

Browse files
committed
feat(unicorn): enable some new rules
1 parent 104f054 commit 00dde2a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/configs/unicorn.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@ export function unicorn(): TypedFlatConfigItem[] {
2727
'unicorn/new-for-builtins': 'error',
2828
// 'unicorn/no-array-callback-reference': 'error',
2929
'unicorn/no-array-method-this-argument': 'error',
30-
'unicorn/no-array-push-push': 'error',
3130
'unicorn/no-await-in-promise-methods': 'error',
3231
'unicorn/no-console-spaces': 'error',
3332
'unicorn/no-for-loop': 'error',
3433
'unicorn/no-hex-escape': 'error',
3534
'unicorn/no-instanceof-builtins': 'error',
3635
'unicorn/no-invalid-remove-event-listener': 'error',
37-
'unicorn/no-length-as-slice-end': 'error',
3836
'unicorn/no-lonely-if': 'error',
3937
'unicorn/no-negation-in-equality-check': 'error',
4038
'unicorn/no-new-array': 'error',
4139
'unicorn/no-new-buffer': 'error',
4240
'unicorn/no-single-promise-in-promise-methods': 'error',
4341
'unicorn/no-static-only-class': 'error',
42+
'unicorn/no-unnecessary-array-flat-depth': 'error',
43+
'unicorn/no-unnecessary-array-splice-count': 'error',
4444
'unicorn/no-unnecessary-await': 'error',
45+
'unicorn/no-unnecessary-slice-end': 'error',
4546
'unicorn/no-zero-fractions': 'error',
4647
'unicorn/prefer-add-event-listener': 'error',
4748
'unicorn/prefer-array-find': 'error',
@@ -68,6 +69,7 @@ export function unicorn(): TypedFlatConfigItem[] {
6869
'unicorn/prefer-prototype-methods': 'error',
6970
'unicorn/prefer-query-selector': 'error',
7071
'unicorn/prefer-reflect-apply': 'error',
72+
'unicorn/prefer-single-call': 'error',
7173
// 'unicorn/prefer-regexp-test': 'error',
7274
'unicorn/prefer-string-replace-all': 'error',
7375
'unicorn/prefer-string-slice': 'error',

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { Linter } from 'eslint'
21
import {
32
command,
43
comments,
@@ -34,6 +33,7 @@ import {
3433
renamePluginInConfigs,
3534
resolveSubOptions,
3635
} from './shared'
36+
import type { Linter } from 'eslint'
3737
import type { Awaitable, OptionsConfig, TypedFlatConfigItem } from './types'
3838

3939
const flatConfigProps = [
@@ -223,8 +223,6 @@ export async function defineConfig(
223223
)
224224
}
225225

226-
227-
228226
if (options.yaml ?? true) {
229227
configs.push(
230228
yaml({

0 commit comments

Comments
 (0)