|
| 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 | +} |
0 commit comments