Skip to content

Commit

Permalink
feat: allow overrides for import rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Sep 27, 2024
1 parent c22c43b commit 96884ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/configs/imports.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { pluginAntfu, pluginImport } from '../plugins';
import type { OptionsStylistic, TypedFlatConfigItem } from '../types';
import type { OptionsOverrides, OptionsStylistic, TypedFlatConfigItem } from '../types';

export async function imports(
options: OptionsStylistic = {},
options: OptionsStylistic & OptionsOverrides = {},
): Promise<TypedFlatConfigItem[]> {
const {
stylistic = true,
Expand Down
1 change: 1 addition & 0 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function rotki(
comments(),
node(),
imports({
overrides: getOverrides(options, 'imports'),
stylistic: stylisticOptions,
}),

Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ export interface OptionsConfig extends OptionsComponentExts, OptionsProjectType
*/
jsx?: boolean;

/**
* Core rules. Can't be disabled;
*/
imports?: OptionsOverrides;

/**
* Options for eslint-plugin-unicorn.
*
Expand Down

0 comments on commit 96884ef

Please sign in to comment.