Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit fb2c886

Browse files
committed
Add settings import
1 parent 117fadd commit fb2c886

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

src/settings/import.d.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import type { Parser } from '../parser-options';
2+
3+
/**
4+
* Import settings.
5+
*/
6+
export interface ImportSettings {
7+
/**
8+
* A list of file extensions that will be parsed as modules and inspected for `export`s.
9+
*
10+
* @see [import/extensions](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importextensions)
11+
*/
12+
'import/extensions'?: string[];
13+
/**
14+
* If you require more granular extension definitions.
15+
*
16+
* @see [import/resolver](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importresolver)
17+
*/
18+
'import/resolver'?: string | Record<string, unknown>;
19+
/**
20+
* A list of regex strings that, if matched by a path, will not report the matching module if no `exports` are found.
21+
*
22+
* @see [import/ignore](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importignore)
23+
*/
24+
'import/ignore'?: string[];
25+
/**
26+
* An array of additional modules to consider as "core" modules--modules that should be considered resolved but have no path on the filesystem.
27+
*
28+
* @see [import/core-modules](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importcore-modules)
29+
*/
30+
'import/core-modules'?: string[];
31+
/**
32+
* An array of folders. Resolved modules only from those folders will be considered as "external".
33+
*
34+
* @default ["node_modules"]
35+
*
36+
* @see [import/external-module-folders](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importexternal-module-folders)
37+
*/
38+
'import/external-module-folders'?: string[];
39+
/**
40+
* A map from parsers to file extension arrays.
41+
*
42+
* @see [import/parsers](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importparsers)
43+
*/
44+
'import/parsers'?: Partial<Record<Parser, string[]>>;
45+
/**
46+
* Settings for cache behavior.
47+
*
48+
* @see [import/cache](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importcache)
49+
*/
50+
'import/cache'?: { lifetime?: number } & Record<string, unknown>;
51+
/**
52+
* A regex for packages should be treated as internal.
53+
*
54+
* Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other.
55+
*
56+
* @see [import/internal-regex](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importinternal-regex)
57+
*/
58+
'import/internal-regex'?: string;
59+
}

src/settings/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import type { ImportSettings } from './import';
12
import type { JSDocSettings } from './jsdoc';
23

34
/**
45
* Settings.
56
*/
6-
export interface Settings extends JSDocSettings, Partial<Record<string, unknown>> {}
7+
export interface Settings extends ImportSettings, JSDocSettings, Partial<Record<string, unknown>> {}

0 commit comments

Comments
 (0)