File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { pluginUnicorn } from '../plugins'
2
- import type { TypedFlatConfigItem } from '../types'
2
+ import type { OptionsUnicorn , TypedFlatConfigItem } from '../types'
3
+
4
+ export function unicorn ( options : OptionsUnicorn = { } ) : TypedFlatConfigItem [ ] {
5
+ const { overrides = { } } = options
3
6
4
- export function unicorn ( ) : TypedFlatConfigItem [ ] {
5
7
return [
6
8
{
7
9
name : 'coderwyd/unicorn/rules' ,
@@ -79,6 +81,8 @@ export function unicorn(): TypedFlatConfigItem[] {
79
81
// 'unicorn/prefer-top-level-await': 'error',
80
82
'unicorn/prefer-type-error' : 'error' ,
81
83
'unicorn/throw-new-error' : 'error' ,
84
+
85
+ ...overrides ,
82
86
} ,
83
87
} ,
84
88
]
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export interface OptionsComponentExts {
27
27
componentExts ?: string [ ]
28
28
}
29
29
30
+ export interface OptionsUnicorn extends OptionsOverrides { }
31
+
30
32
export interface OptionsTypeScriptParserOptions {
31
33
/**
32
34
* Additional parser options for TypeScript.
@@ -192,8 +194,6 @@ export interface OptionsConfig extends OptionsComponentExts {
192
194
*/
193
195
unocss ?: boolean | OptionsUnoCSS
194
196
195
-
196
-
197
197
/**
198
198
* Enable regexp rules.
199
199
*
You can’t perform that action at this time.
0 commit comments