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 11import { 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
36
4- export function unicorn ( ) : TypedFlatConfigItem [ ] {
57 return [
68 {
79 name : 'coderwyd/unicorn/rules' ,
@@ -79,6 +81,8 @@ export function unicorn(): TypedFlatConfigItem[] {
7981 // 'unicorn/prefer-top-level-await': 'error',
8082 'unicorn/prefer-type-error' : 'error' ,
8183 'unicorn/throw-new-error' : 'error' ,
84+
85+ ...overrides ,
8286 } ,
8387 } ,
8488 ]
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export interface OptionsComponentExts {
2727 componentExts ?: string [ ]
2828}
2929
30+ export interface OptionsUnicorn extends OptionsOverrides { }
31+
3032export interface OptionsTypeScriptParserOptions {
3133 /**
3234 * Additional parser options for TypeScript.
@@ -192,8 +194,6 @@ export interface OptionsConfig extends OptionsComponentExts {
192194 */
193195 unocss ?: boolean | OptionsUnoCSS
194196
195-
196-
197197 /**
198198 * Enable regexp rules.
199199 *
You can’t perform that action at this time.
0 commit comments