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

Commit 117fadd

Browse files
committed
Add rule import/named
1 parent f9f7002 commit 117fadd

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/rules/import/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type { DefaultRule } from './default';
2+
import type { NamedRule } from './named';
23
import type { NoUnresolvedRule } from './no-unresolved';
34

45
/**
56
* All import rules.
67
*/
7-
export type ImportRules = DefaultRule & NoUnresolvedRule;
8+
export type ImportRules = DefaultRule & NamedRule & NoUnresolvedRule;

src/rules/import/named.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Verifies that all named imports are part of the set of named exports in the referenced module.
5+
*
6+
* @see [named](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md)
7+
*/
8+
export type NamedRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Verifies that all named imports are part of the set of named exports in the referenced module.
12+
*
13+
* @see [named](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md)
14+
*/
15+
export interface NamedRule {
16+
/**
17+
* Verifies that all named imports are part of the set of named exports in the referenced module.
18+
*
19+
* @see [named](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md)
20+
*/
21+
'import/named': NamedRuleConfig;
22+
}

0 commit comments

Comments
 (0)