eslint-plugin-import-next 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +80 -70
- package/package.json +15 -3
- package/src/index.d.ts +192 -0
- package/src/index.js +13 -1
- package/src/oxlint.d.ts +20 -0
- package/src/oxlint.js +21 -0
- package/src/rules/consistent-type-specifier-style.js +5 -1
- package/src/rules/default.js +1 -0
- package/src/rules/dynamic-import-chunkname.js +4 -1
- package/src/rules/enforce-dependency-direction.js +2 -1
- package/src/rules/enforce-import-order.js +4 -2
- package/src/rules/enforce-team-boundaries.js +27 -17
- package/src/rules/export.js +3 -0
- package/src/rules/exports-last.js +3 -0
- package/src/rules/extensions.js +1 -0
- package/src/rules/first.js +2 -0
- package/src/rules/group-exports.js +3 -0
- package/src/rules/max-dependencies.js +2 -1
- package/src/rules/named.js +1 -0
- package/src/rules/namespace.js +1 -0
- package/src/rules/newline-after-import.js +1 -0
- package/src/rules/no-absolute-path.js +3 -0
- package/src/rules/no-amd.js +2 -1
- package/src/rules/no-anonymous-default-export.js +2 -0
- package/src/rules/no-barrel-file.js +2 -1
- package/src/rules/no-barrel-import.js +1 -0
- package/src/rules/no-commonjs.js +2 -1
- package/src/rules/no-cross-domain-imports.js +2 -1
- package/src/rules/no-cycle.js +94 -73
- package/src/rules/no-default-export.js +2 -1
- package/src/rules/no-deprecated.js +2 -1
- package/src/rules/no-duplicates.js +1 -0
- package/src/rules/no-dynamic-require.js +3 -0
- package/src/rules/no-empty-named-blocks.js +4 -1
- package/src/rules/no-extraneous-dependencies.js +4 -1
- package/src/rules/no-full-package-import.js +1 -0
- package/src/rules/no-import-module-exports.js +3 -0
- package/src/rules/no-internal-modules.js +1 -0
- package/src/rules/no-legacy-imports.js +1 -0
- package/src/rules/no-mutable-exports.js +2 -1
- package/src/rules/no-named-as-default-member.js +3 -0
- package/src/rules/no-named-as-default.js +3 -0
- package/src/rules/no-named-default.js +3 -0
- package/src/rules/no-named-export.js +2 -1
- package/src/rules/no-namespace.js +12 -5
- package/src/rules/no-nodejs-modules.js +3 -1
- package/src/rules/no-relative-packages.js +4 -1
- package/src/rules/no-relative-parent-imports.js +1 -0
- package/src/rules/no-restricted-paths.js +1 -0
- package/src/rules/no-self-import.js +2 -1
- package/src/rules/no-unassigned-import.js +1 -0
- package/src/rules/no-unresolved.js +3 -2
- package/src/rules/no-unused-modules.js +1 -0
- package/src/rules/no-useless-path-segments.js +3 -0
- package/src/rules/prefer-default-export.js +2 -1
- package/src/rules/prefer-direct-import.js +1 -0
- package/src/rules/prefer-modern-api.js +1 -0
- package/src/rules/prefer-node-protocol.js +2 -0
- package/src/rules/prefer-tree-shakeable-imports.js +1 -0
- package/src/rules/require-import-approval.js +1 -0
- package/src/rules/unambiguous.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [2.3.6] - 2026-05-03
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- `no-cycle` rewritten to per-import targeted DFS (replaces upfront full-graph BFS+Tarjan SCC). The `nonCyclicFiles` cache provides O(1) rejection after first visit; only files along the actual DFS path are read. Detection parity with the previous algorithm is preserved.
|
|
6
|
+
|
|
7
|
+
## 2.3.5 (2026-02-09)
|
|
8
|
+
|
|
9
|
+
This was a version bump only for eslint-plugin-import-next to align it with other projects, there were no code changes.
|
|
10
|
+
|
|
1
11
|
## [2.3.3] - 2026-02-08
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
<a href="https://www.npmjs.com/package/eslint-plugin-import-next" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-import-next.svg" alt="NPM Version" /></a>
|
|
11
11
|
<a href="https://www.npmjs.com/package/eslint-plugin-import-next" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-import-next.svg" alt="NPM Downloads" /></a>
|
|
12
12
|
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Package License" /></a>
|
|
13
|
-
<a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=
|
|
13
|
+
<a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=import-next" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=import-next" alt="Codecov" /></a>
|
|
14
14
|
<a href="https://github.com/ofri-peretz/eslint" target="_blank"><img src="https://img.shields.io/badge/Since-Dec_2025-blue?logo=rocket&logoColor=white" alt="Since Dec 2025" /></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
## Description
|
|
18
18
|
|
|
19
19
|
This plugin provides Next-generation import sorting, validation, and architectural boundaries.
|
|
20
|
-
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
|
|
21
20
|
|
|
22
21
|
## Philosophy
|
|
23
22
|
|
|
@@ -36,13 +35,6 @@ By using this plugin, you can proactively identify and mitigate security risks a
|
|
|
36
35
|
npm install eslint-plugin-import-next --save-dev
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
## 🔄 Compatibility Matrix
|
|
40
|
-
| Rule | Original Plugin | Status | Notes |
|
|
41
|
-
| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :----------------------- |
|
|
42
|
-
| All Rules | [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) [](https://www.npmjs.com/package/eslint-plugin-import) | ✅ Supported | Full drop-in replacement |
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
38
|
## ⚙️ Configuration Presets
|
|
47
39
|
| Preset | Description |
|
|
48
40
|
| :------------------ | :----------------------------------------------- |
|
|
@@ -58,6 +50,19 @@ npm install eslint-plugin-import-next --save-dev
|
|
|
58
50
|
| `errors` | Matches eslint-plugin-import errors preset |
|
|
59
51
|
| `warnings` | Matches eslint-plugin-import warnings preset |
|
|
60
52
|
|
|
53
|
+
## 🔄 Parity with `eslint-plugin-import`
|
|
54
|
+
| Rule | Original Plugin | Status | Notes |
|
|
55
|
+
| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :----------------------- |
|
|
56
|
+
| All Rules | [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) [](https://www.npmjs.com/package/eslint-plugin-import) | ✅ Supported | Full drop-in replacement |
|
|
57
|
+
|
|
58
|
+
## 📦 Compatibility
|
|
59
|
+
| Package | Version |
|
|
60
|
+
| :--- | :--- |
|
|
61
|
+
| ESLint | `^8.0.0 \|\| ^9.0.0 \|\| ^10.0.0` |
|
|
62
|
+
| Node.js | `>=18.0.0` |
|
|
63
|
+
|
|
64
|
+
See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) for the full matrix.
|
|
65
|
+
|
|
61
66
|
## Rules
|
|
62
67
|
|
|
63
68
|
**Legend**
|
|
@@ -65,69 +70,74 @@ npm install eslint-plugin-import-next --save-dev
|
|
|
65
70
|
| Icon | Description |
|
|
66
71
|
| :---: | :--- |
|
|
67
72
|
| 💼 | **Recommended**: Included in the recommended preset. |
|
|
68
|
-
| ⚠️ | **Warns**: Set
|
|
73
|
+
| ⚠️ | **Warns**: Set to warn in recommended preset. |
|
|
69
74
|
| 🔧 | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
70
75
|
| 💡 | **Suggestions**: Providing code suggestions in IDE. |
|
|
71
76
|
| 🚫 | **Deprecated**: This rule is deprecated. |
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
| [
|
|
80
|
-
| [
|
|
81
|
-
| [
|
|
82
|
-
| [
|
|
83
|
-
| [
|
|
84
|
-
| [
|
|
85
|
-
| [
|
|
86
|
-
| [
|
|
87
|
-
| [
|
|
88
|
-
| [
|
|
89
|
-
| [
|
|
90
|
-
| [
|
|
91
|
-
| [
|
|
92
|
-
| [
|
|
93
|
-
| [
|
|
94
|
-
| [no-
|
|
95
|
-
| [no-
|
|
96
|
-
| [no-
|
|
97
|
-
| [no-
|
|
98
|
-
| [no-
|
|
99
|
-
| [no-
|
|
100
|
-
| [no-
|
|
101
|
-
| [no-
|
|
102
|
-
| [no-
|
|
103
|
-
| [no-
|
|
104
|
-
| [no-
|
|
105
|
-
| [no-
|
|
106
|
-
| [no-
|
|
107
|
-
| [no-
|
|
108
|
-
| [no-
|
|
109
|
-
| [no-
|
|
110
|
-
| [no-
|
|
111
|
-
| [no-
|
|
112
|
-
| [no-
|
|
113
|
-
| [no-
|
|
114
|
-
| [no-
|
|
115
|
-
| [no-
|
|
116
|
-
| [no-
|
|
117
|
-
| [no-
|
|
118
|
-
| [no-
|
|
119
|
-
| [no-
|
|
120
|
-
| [no-
|
|
121
|
-
| [no-
|
|
122
|
-
| [no-
|
|
123
|
-
| [
|
|
124
|
-
| [
|
|
125
|
-
| [
|
|
126
|
-
| [
|
|
127
|
-
| [
|
|
128
|
-
| [
|
|
129
|
-
| [
|
|
130
|
-
|
|
77
|
+
| 🟢 | **Type-unaware**: AST-only, runs in oxlint JS-plugin tier. |
|
|
78
|
+
| 🟡 | **Type-aware (refining)**: pure-AST primary path; types refine precision. |
|
|
79
|
+
| 🟠 | **Type-aware (graceful)**: requires TS program; silent without it. |
|
|
80
|
+
|
|
81
|
+
<!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
|
|
82
|
+
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|
|
83
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
84
|
+
| [consistent-type-specifier-style](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/consistent-type-specifier-style) | | | | | 🟢 | | | | | |
|
|
85
|
+
| [default](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/default) | | | | | 🟡 | 💼 | | | | |
|
|
86
|
+
| [dynamic-import-chunkname](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/dynamic-import-chunkname) | | | | | 🟢 | | | | | |
|
|
87
|
+
| [enforce-dependency-direction](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/enforce-dependency-direction) | | | | | 🟢 | | | | | |
|
|
88
|
+
| [enforce-import-order](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/enforce-import-order) | | | | | 🟢 | | | | | |
|
|
89
|
+
| [enforce-team-boundaries](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/enforce-team-boundaries) | | | | | 🟢 | | | | | |
|
|
90
|
+
| [export](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/export) | | | | | 🟢 | 💼 | | | | |
|
|
91
|
+
| [exports-last](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/exports-last) | | | | | 🟢 | | | | | |
|
|
92
|
+
| [extensions](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/extensions) | | | | | 🟢 | | | | | |
|
|
93
|
+
| [first](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/first) | | | | | 🟢 | | ⚠️ | | | |
|
|
94
|
+
| [group-exports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/group-exports) | | | | | 🟢 | | | | | |
|
|
95
|
+
| [max-dependencies](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/max-dependencies) | | | | | 🟢 | | | | | |
|
|
96
|
+
| [named](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/named) | | | | | 🟡 | 💼 | | | | |
|
|
97
|
+
| [namespace](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/namespace) | | | | | 🟡 | | ⚠️ | | | |
|
|
98
|
+
| [newline-after-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/newline-after-import) | | | | | 🟢 | | ⚠️ | | | |
|
|
99
|
+
| [no-absolute-path](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-absolute-path) | | | | | 🟢 | | | | | |
|
|
100
|
+
| [no-amd](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-amd) | | | | | 🟢 | | ⚠️ | | | |
|
|
101
|
+
| [no-anonymous-default-export](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-anonymous-default-export) | | | | | 🟢 | | | | | |
|
|
102
|
+
| [no-barrel-file](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-barrel-file) | | | | | 🟢 | | | | | |
|
|
103
|
+
| [no-barrel-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-barrel-import) | | | | | 🟢 | | | | | |
|
|
104
|
+
| [no-commonjs](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-commonjs) | | | | | 🟢 | | | | | |
|
|
105
|
+
| [no-cross-domain-imports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-cross-domain-imports) | | | | | 🟢 | | | | | |
|
|
106
|
+
| [no-cycle](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-cycle) | | A05:2021 | | | 🟢 | 💼 | | | | |
|
|
107
|
+
| [no-default-export](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-default-export) | | | | | 🟢 | | | | | |
|
|
108
|
+
| [no-deprecated](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-deprecated) | | A09:2021 | | | 🟢 | | | | | |
|
|
109
|
+
| [no-duplicates](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-duplicates) | | | | | 🟢 | 💼 | | | | |
|
|
110
|
+
| [no-dynamic-require](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-dynamic-require) | | | | | 🟢 | | | | | |
|
|
111
|
+
| [no-empty-named-blocks](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-empty-named-blocks) | | | | | 🟢 | | ⚠️ | | | |
|
|
112
|
+
| [no-extraneous-dependencies](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-extraneous-dependencies) | | | | | 🟢 | | ⚠️ | | | |
|
|
113
|
+
| [no-full-package-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-full-package-import) | | | | | 🟢 | | | | | |
|
|
114
|
+
| [no-import-module-exports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-import-module-exports) | | | | | 🟢 | | | | | |
|
|
115
|
+
| [no-internal-modules](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-internal-modules) | | | | | 🟢 | | | | | |
|
|
116
|
+
| [no-legacy-imports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-legacy-imports) | | | | | 🟢 | | | | | |
|
|
117
|
+
| [no-mutable-exports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-mutable-exports) | | | | | 🟢 | | | | | |
|
|
118
|
+
| [no-named-as-default](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-named-as-default) | | | | | 🟢 | | ⚠️ | | | |
|
|
119
|
+
| [no-named-as-default-member](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-named-as-default-member) | | | | | 🟢 | | ⚠️ | | | |
|
|
120
|
+
| [no-named-default](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-named-default) | | | | | 🟢 | | | | | |
|
|
121
|
+
| [no-named-export](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-named-export) | | | | | 🟢 | | | | | |
|
|
122
|
+
| [no-namespace](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-namespace) | | | | | 🟢 | | | | | |
|
|
123
|
+
| [no-nodejs-modules](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-nodejs-modules) | | | | | 🟢 | | | | | |
|
|
124
|
+
| [no-relative-packages](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-relative-packages) | | | | | 🟢 | | | | | |
|
|
125
|
+
| [no-relative-parent-imports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-relative-parent-imports) | | | | | 🟢 | | | | | |
|
|
126
|
+
| [no-restricted-paths](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-restricted-paths) | | | | | 🟢 | | | | | |
|
|
127
|
+
| [no-self-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-self-import) | | | | | 🟢 | 💼 | | | | |
|
|
128
|
+
| [no-unassigned-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-unassigned-import) | | | | | 🟢 | | | | | |
|
|
129
|
+
| [no-unresolved](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-unresolved) | | A03:2021 | | | 🟢 | 💼 | | | | |
|
|
130
|
+
| [no-unused-modules](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-unused-modules) | | | | | 🟢 | | | | | |
|
|
131
|
+
| [no-useless-path-segments](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/no-useless-path-segments) | | | | | 🟢 | | | | | |
|
|
132
|
+
| [order](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/order) | | | | | 🟢 | | ⚠️ | | | |
|
|
133
|
+
| [prefer-default-export](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/prefer-default-export) | | | | | 🟢 | | | | | |
|
|
134
|
+
| [prefer-direct-import](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/prefer-direct-import) | | | | | 🟢 | | | | | |
|
|
135
|
+
| [prefer-modern-api](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/prefer-modern-api) | | | | | 🟢 | | | | | |
|
|
136
|
+
| [prefer-node-protocol](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/prefer-node-protocol) | | | | | 🟢 | | | | | |
|
|
137
|
+
| [prefer-tree-shakeable-imports](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/prefer-tree-shakeable-imports) | | | | | 🟢 | | | | | |
|
|
138
|
+
| [require-import-approval](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/require-import-approval) | | | | | 🟢 | | | | | |
|
|
139
|
+
| [unambiguous](https://eslint.interlace.tools/docs/quality/plugin-import-next/rules/unambiguous) | | | | | 🟢 | | | | | |
|
|
140
|
+
<!-- AUTO-GENERATED:RULES_TABLE:END -->
|
|
131
141
|
## 🔗 Related ESLint Plugins
|
|
132
142
|
|
|
133
143
|
Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with LLM-optimized error messages:
|
|
@@ -136,7 +146,7 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
136
146
|
| :--- | :---: | :--- |
|
|
137
147
|
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
|
|
138
148
|
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
139
|
-
| [`eslint-plugin-
|
|
149
|
+
| [`eslint-plugin-node-security`](https://www.npmjs.com/package/eslint-plugin-node-security) | [](https://www.npmjs.com/package/eslint-plugin-node-security) | Node.js core-module security (fs, child_process, vm, crypto, Buffer). |
|
|
140
150
|
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
141
151
|
| [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
|
|
142
152
|
| [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-import-next",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"description": "Drop-in replacement for eslint-plugin-import. 100x faster no-cycle detection, AI-optimized fixes, zero config migration.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"./types": {
|
|
14
14
|
"types": "./src/types/index.d.ts",
|
|
15
15
|
"default": "./src/types/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./oxlint": {
|
|
18
|
+
"types": "./src/oxlint.d.ts",
|
|
19
|
+
"default": "./src/oxlint.js"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"author": "Ofri Peretz <ofriperetzdev@gmail.com>",
|
|
@@ -64,7 +68,9 @@
|
|
|
64
68
|
"engines": {
|
|
65
69
|
"node": ">=18.0.0"
|
|
66
70
|
},
|
|
67
|
-
"peerDependencies": {
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
73
|
+
},
|
|
68
74
|
"dependencies": {
|
|
69
75
|
"tslib": "^2.3.0",
|
|
70
76
|
"@interlace/eslint-devkit": "^1.2.1"
|
|
@@ -72,5 +78,11 @@
|
|
|
72
78
|
"devDependencies": {
|
|
73
79
|
"@typescript-eslint/parser": "^8.46.2",
|
|
74
80
|
"@typescript-eslint/rule-tester": "^8.46.2"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsx ../../scripts/build-package.ts",
|
|
84
|
+
"test": "vitest run",
|
|
85
|
+
"test:coverage": "vitest run --coverage",
|
|
86
|
+
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
75
87
|
}
|
|
76
|
-
}
|
|
88
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -379,6 +379,198 @@ export declare const plugin: {
|
|
|
379
379
|
* Preset configurations for common use cases
|
|
380
380
|
*/
|
|
381
381
|
export declare const configs: {
|
|
382
|
+
/**
|
|
383
|
+
* Flagship preset — exactly the rule from this plugin that appears in the
|
|
384
|
+
* ecosystem-wide flagship list (`.agent/flagship-rules.md`). Use this when
|
|
385
|
+
* you want the highest-signal subset shippable in CI gates without the
|
|
386
|
+
* noise of `recommended`.
|
|
387
|
+
*/
|
|
388
|
+
flagship: {
|
|
389
|
+
plugins: {
|
|
390
|
+
'import-next': {
|
|
391
|
+
meta: {
|
|
392
|
+
name: string;
|
|
393
|
+
version: string;
|
|
394
|
+
};
|
|
395
|
+
rules: {
|
|
396
|
+
'no-duplicates': TSESLint.RuleModule<"noDuplicates", import("./rules/no-duplicates").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
397
|
+
name: string;
|
|
398
|
+
};
|
|
399
|
+
named: TSESLint.RuleModule<"named", import("./rules/named").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
400
|
+
name: string;
|
|
401
|
+
};
|
|
402
|
+
default: TSESLint.RuleModule<"noDefaultExport", [], unknown, TSESLint.RuleListener> & {
|
|
403
|
+
name: string;
|
|
404
|
+
};
|
|
405
|
+
namespace: TSESLint.RuleModule<"namespace", import("./rules/namespace").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
406
|
+
name: string;
|
|
407
|
+
};
|
|
408
|
+
extensions: TSESLint.RuleModule<"missingExtension" | "unexpectedExtension", [{
|
|
409
|
+
pattern?: Record<string, "always" | "never">;
|
|
410
|
+
default?: "always" | "never";
|
|
411
|
+
}], unknown, TSESLint.RuleListener> & {
|
|
412
|
+
name: string;
|
|
413
|
+
};
|
|
414
|
+
'no-self-import': TSESLint.RuleModule<"selfImport", [(import("./rules/no-self-import").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
415
|
+
name: string;
|
|
416
|
+
};
|
|
417
|
+
'no-unresolved': TSESLint.RuleModule<"unresolvedImport" | "moduleNotFound" | "invalidExtension" | "addIgnoreComment", [(import("./rules/no-unresolved").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
418
|
+
name: string;
|
|
419
|
+
};
|
|
420
|
+
'no-absolute-path': TSESLint.RuleModule<"absolutePath", [(import("./rules/no-absolute-path").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
421
|
+
name: string;
|
|
422
|
+
};
|
|
423
|
+
'no-dynamic-require': TSESLint.RuleModule<"dynamicRequire" | "dynamicImport", [(import("./rules/no-dynamic-require").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
424
|
+
name: string;
|
|
425
|
+
};
|
|
426
|
+
'no-relative-packages': TSESLint.RuleModule<"relativePackage", [(import("./rules/no-relative-packages").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
427
|
+
name: string;
|
|
428
|
+
};
|
|
429
|
+
'no-useless-path-segments': TSESLint.RuleModule<"uselessPathSegments", [(import("./rules/no-useless-path-segments").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
430
|
+
name: string;
|
|
431
|
+
};
|
|
432
|
+
'no-amd': TSESLint.RuleModule<"preferES6", [(import("./rules/no-amd").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
433
|
+
name: string;
|
|
434
|
+
};
|
|
435
|
+
'no-commonjs': TSESLint.RuleModule<"preferES6" | "commonjsRequire" | "commonjsExport" | "commonjsModule", [(import("./rules/no-commonjs").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
436
|
+
name: string;
|
|
437
|
+
};
|
|
438
|
+
'no-nodejs-modules': TSESLint.RuleModule<"nodejsBuiltinImport" | "nodejsBuiltinRequire" | "nodejsBuiltinDynamic", [(import("./rules/no-nodejs-modules").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
439
|
+
name: string;
|
|
440
|
+
};
|
|
441
|
+
'no-import-module-exports': TSESLint.RuleModule<"importModuleExports", [(import("./rules/no-import-module-exports").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
442
|
+
name: string;
|
|
443
|
+
};
|
|
444
|
+
unambiguous: TSESLint.RuleModule<"ambiguous", [], unknown, TSESLint.RuleListener> & {
|
|
445
|
+
name: string;
|
|
446
|
+
};
|
|
447
|
+
'no-cycle': TSESLint.RuleModule<"moduleSplit" | "directImport" | "extractShared" | "dependencyInjection", import("./rules/no-cycle").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
448
|
+
name: string;
|
|
449
|
+
};
|
|
450
|
+
'no-internal-modules': TSESLint.RuleModule<"internalModuleImport" | "suggestPublicApi" | "suggestBarrelExport", [(import("./rules/no-internal-modules").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
451
|
+
name: string;
|
|
452
|
+
};
|
|
453
|
+
'no-cross-domain-imports': TSESLint.RuleModule<"crossDomainImport" | "useSharedModule" | "useEvents" | "useApplicationService", [(import("./rules/no-cross-domain-imports").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
454
|
+
name: string;
|
|
455
|
+
};
|
|
456
|
+
'enforce-dependency-direction': TSESLint.RuleModule<"dependencyDirectionViolation" | "useDependencyInversion" | "refactorDependency", [(import("./rules/enforce-dependency-direction").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
457
|
+
name: string;
|
|
458
|
+
};
|
|
459
|
+
'no-restricted-paths': TSESLint.RuleModule<"restrictedPath" | "pathViolation" | "zoneViolation", [(import("./rules/no-restricted-paths").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
460
|
+
name: string;
|
|
461
|
+
};
|
|
462
|
+
'no-relative-parent-imports': TSESLint.RuleModule<"relativeParentImport" | "preferAbsoluteImport" | "suggestAlias", [(import("./rules/no-relative-parent-imports").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
463
|
+
name: string;
|
|
464
|
+
};
|
|
465
|
+
export: TSESLint.RuleModule<"duplicateExport" | "duplicateDefault", [], unknown, TSESLint.RuleListener> & {
|
|
466
|
+
name: string;
|
|
467
|
+
};
|
|
468
|
+
'no-default-export': TSESLint.RuleModule<"defaultExport" | "preferNamedExport" | "defaultExportRefactor", [(import("./rules/no-default-export").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
469
|
+
name: string;
|
|
470
|
+
};
|
|
471
|
+
'no-named-export': TSESLint.RuleModule<"namedExport" | "suggestDefault", [(import("./rules/no-named-export").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
472
|
+
name: string;
|
|
473
|
+
};
|
|
474
|
+
'prefer-default-export': TSESLint.RuleModule<"preferDefaultExport" | "singleNamedExport" | "multipleNamedToDefault", [(import("./rules/prefer-default-export").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
475
|
+
name: string;
|
|
476
|
+
};
|
|
477
|
+
'no-anonymous-default-export': TSESLint.RuleModule<"anonymousDefaultExport" | "suggestNamedExport" | "arrowFunctionExport" | "useNamedExport", [(import("./rules/no-anonymous-default-export").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
478
|
+
name: string;
|
|
479
|
+
};
|
|
480
|
+
'no-mutable-exports': TSESLint.RuleModule<"mutableExport" | "varExport" | "letExport", [(import("./rules/no-mutable-exports").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
481
|
+
name: string;
|
|
482
|
+
};
|
|
483
|
+
'no-deprecated': TSESLint.RuleModule<"deprecatedImport" | "deprecatedExport" | "deprecatedUsage", [(import("./rules/no-deprecated").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
484
|
+
name: string;
|
|
485
|
+
};
|
|
486
|
+
'exports-last': TSESLint.RuleModule<"exportNotLast", [], unknown, TSESLint.RuleListener> & {
|
|
487
|
+
name: string;
|
|
488
|
+
};
|
|
489
|
+
'group-exports': TSESLint.RuleModule<"groupExports", [], unknown, TSESLint.RuleListener> & {
|
|
490
|
+
name: string;
|
|
491
|
+
};
|
|
492
|
+
'enforce-import-order': TSESLint.RuleModule<"importOrder" | "alphabeticalOrder" | "importsNotContiguous", [(import("./rules/enforce-import-order").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
493
|
+
name: string;
|
|
494
|
+
};
|
|
495
|
+
order: TSESLint.RuleModule<"importOrder" | "alphabeticalOrder" | "importsNotContiguous", [(import("./rules/enforce-import-order").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
496
|
+
name: string;
|
|
497
|
+
};
|
|
498
|
+
'no-unassigned-import': TSESLint.RuleModule<"unassignedImport" | "sideEffectOnly" | "missingAssignment", [(import("./rules/no-unassigned-import").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
499
|
+
name: string;
|
|
500
|
+
};
|
|
501
|
+
first: TSESLint.RuleModule<"first", import("./rules/first").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
502
|
+
name: string;
|
|
503
|
+
};
|
|
504
|
+
'newline-after-import': TSESLint.RuleModule<"newlineAfterImport", import("./rules/newline-after-import").RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
505
|
+
name: string;
|
|
506
|
+
};
|
|
507
|
+
'no-empty-named-blocks': TSESLint.RuleModule<"emptyNamedBlock" | "suggestRemove", [], unknown, TSESLint.RuleListener> & {
|
|
508
|
+
name: string;
|
|
509
|
+
};
|
|
510
|
+
'no-named-as-default': TSESLint.RuleModule<"namedAsDefault", [], unknown, TSESLint.RuleListener> & {
|
|
511
|
+
name: string;
|
|
512
|
+
};
|
|
513
|
+
'no-named-as-default-member': TSESLint.RuleModule<"namedAsDefaultMember", [], unknown, TSESLint.RuleListener> & {
|
|
514
|
+
name: string;
|
|
515
|
+
};
|
|
516
|
+
'no-named-default': TSESLint.RuleModule<"namedDefault", [], unknown, TSESLint.RuleListener> & {
|
|
517
|
+
name: string;
|
|
518
|
+
};
|
|
519
|
+
'no-namespace': TSESLint.RuleModule<"noNamespace", [(import("./rules/no-namespace").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
520
|
+
name: string;
|
|
521
|
+
};
|
|
522
|
+
'consistent-type-specifier-style': TSESLint.RuleModule<"preferInline" | "preferTopLevel", [(("prefer-inline" | "prefer-top-level") | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
523
|
+
name: string;
|
|
524
|
+
};
|
|
525
|
+
'dynamic-import-chunkname': TSESLint.RuleModule<"missingChunkName" | "invalidChunkName" | "suggestChunkName", [(import("./rules/dynamic-import-chunkname").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
526
|
+
name: string;
|
|
527
|
+
};
|
|
528
|
+
'no-extraneous-dependencies': TSESLint.RuleModule<"extraneousDependency" | "missingDependency" | "devDependencyInProduction" | "addToDependencies" | "addToDevDependencies" | "moveToDependencies", [(import("./rules/no-extraneous-dependencies").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
529
|
+
name: string;
|
|
530
|
+
};
|
|
531
|
+
'no-unused-modules': TSESLint.RuleModule<"missingExports", [(import("./rules/no-unused-modules").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
532
|
+
name: string;
|
|
533
|
+
};
|
|
534
|
+
'max-dependencies': TSESLint.RuleModule<"maxDependencies" | "suggestRefactor" | "dependencyAnalysis", [(import("./rules/max-dependencies").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
535
|
+
name: string;
|
|
536
|
+
};
|
|
537
|
+
'prefer-node-protocol': TSESLint.RuleModule<"preferNodeProtocol", [(import("./rules/prefer-node-protocol").Options | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
538
|
+
name: string;
|
|
539
|
+
};
|
|
540
|
+
'no-barrel-file': TSESLint.RuleModule<"barrelFileDetected" | "considerDirectExports", [(import("./rules/no-barrel-file").NoBarrelFileOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
541
|
+
name: string;
|
|
542
|
+
};
|
|
543
|
+
'no-barrel-import': TSESLint.RuleModule<"barrelImportDetected", [(import("./rules/no-barrel-import").NoBarrelImportOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
544
|
+
name: string;
|
|
545
|
+
};
|
|
546
|
+
'prefer-tree-shakeable-imports': TSESLint.RuleModule<"namespaceImport" | "defaultImportFromLargePackage", [(import("./rules/prefer-tree-shakeable-imports").PreferTreeShakeableOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
547
|
+
name: string;
|
|
548
|
+
};
|
|
549
|
+
'prefer-direct-import': TSESLint.RuleModule<"preferDirectImport", [(import("./rules/prefer-direct-import").PreferDirectImportOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
550
|
+
name: string;
|
|
551
|
+
};
|
|
552
|
+
'no-full-package-import': TSESLint.RuleModule<"fullPackageImport", [(import("./rules/no-full-package-import").NoFullPackageImportOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
553
|
+
name: string;
|
|
554
|
+
};
|
|
555
|
+
'enforce-team-boundaries': TSESLint.RuleModule<"unauthorizedTeamImport", [import("./rules/enforce-team-boundaries").EnforceTeamBoundariesOptions], unknown, TSESLint.RuleListener> & {
|
|
556
|
+
name: string;
|
|
557
|
+
};
|
|
558
|
+
'no-legacy-imports': TSESLint.RuleModule<"legacyImport", [import("./rules/no-legacy-imports").NoLegacyImportsOptions], unknown, TSESLint.RuleListener> & {
|
|
559
|
+
name: string;
|
|
560
|
+
};
|
|
561
|
+
'require-import-approval': TSESLint.RuleModule<"unapprovedPackage" | "blockedPackage", [import("./rules/require-import-approval").RequireImportApprovalOptions], unknown, TSESLint.RuleListener> & {
|
|
562
|
+
name: string;
|
|
563
|
+
};
|
|
564
|
+
'prefer-modern-api': TSESLint.RuleModule<"preferModernApi", [(import("./rules/prefer-modern-api").PreferModernApiOptions | undefined)?], unknown, TSESLint.RuleListener> & {
|
|
565
|
+
name: string;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
rules: {
|
|
571
|
+
'import-next/no-cycle': string;
|
|
572
|
+
};
|
|
573
|
+
};
|
|
382
574
|
/**
|
|
383
575
|
* Recommended configuration for most projects
|
|
384
576
|
*
|
package/src/index.js
CHANGED
|
@@ -146,7 +146,7 @@ exports.rules = {
|
|
|
146
146
|
exports.plugin = {
|
|
147
147
|
meta: {
|
|
148
148
|
name: 'eslint-plugin-import-next',
|
|
149
|
-
version: '2.
|
|
149
|
+
version: '2.3.6',
|
|
150
150
|
},
|
|
151
151
|
rules: exports.rules,
|
|
152
152
|
};
|
|
@@ -154,6 +154,18 @@ exports.plugin = {
|
|
|
154
154
|
* Preset configurations for common use cases
|
|
155
155
|
*/
|
|
156
156
|
exports.configs = {
|
|
157
|
+
/**
|
|
158
|
+
* Flagship preset — exactly the rule from this plugin that appears in the
|
|
159
|
+
* ecosystem-wide flagship list (`.agent/flagship-rules.md`). Use this when
|
|
160
|
+
* you want the highest-signal subset shippable in CI gates without the
|
|
161
|
+
* noise of `recommended`.
|
|
162
|
+
*/
|
|
163
|
+
flagship: {
|
|
164
|
+
plugins: { 'import-next': exports.plugin },
|
|
165
|
+
rules: {
|
|
166
|
+
'import-next/no-cycle': 'error',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
157
169
|
/**
|
|
158
170
|
* Recommended configuration for most projects
|
|
159
171
|
*
|
package/src/oxlint.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
+
* MIT license that can be found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* oxlint sub-export.
|
|
8
|
+
*
|
|
9
|
+
* Consumers wire oxlint to this entry via:
|
|
10
|
+
* { "jsPlugins": ["eslint-plugin-import-next/oxlint"] }
|
|
11
|
+
*
|
|
12
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-import-next/oxlint')` and reads
|
|
13
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
14
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
15
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
16
|
+
*
|
|
17
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
18
|
+
*/
|
|
19
|
+
import { plugin } from './index';
|
|
20
|
+
export = plugin;
|
package/src/oxlint.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
+
* MIT license that can be found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* oxlint sub-export.
|
|
9
|
+
*
|
|
10
|
+
* Consumers wire oxlint to this entry via:
|
|
11
|
+
* { "jsPlugins": ["eslint-plugin-import-next/oxlint"] }
|
|
12
|
+
*
|
|
13
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-import-next/oxlint')` and reads
|
|
14
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
15
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
16
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
17
|
+
*
|
|
18
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
19
|
+
*/
|
|
20
|
+
const index_1 = require("./index");
|
|
21
|
+
module.exports = index_1.plugin;
|
|
@@ -12,7 +12,10 @@ exports.consistentTypeSpecifierStyle = (0, eslint_devkit_1.createRule)({
|
|
|
12
12
|
meta: {
|
|
13
13
|
type: 'suggestion',
|
|
14
14
|
docs: {
|
|
15
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-import-next/docs/rules/consistent-type-specifier-style.md',
|
|
15
16
|
description: 'Enforce or ban the use of inline type-only markers for named imports',
|
|
17
|
+
cwe: 'CWE-1078',
|
|
18
|
+
cvss: 2.5,
|
|
16
19
|
},
|
|
17
20
|
fixable: 'code',
|
|
18
21
|
messages: {
|
|
@@ -46,10 +49,11 @@ exports.consistentTypeSpecifierStyle = (0, eslint_devkit_1.createRule)({
|
|
|
46
49
|
defaultOptions: ['prefer-inline'],
|
|
47
50
|
create(context) {
|
|
48
51
|
const style = context.options[0] || 'prefer-inline';
|
|
49
|
-
const sourceCode = context.
|
|
52
|
+
const sourceCode = context.sourceCode;
|
|
50
53
|
/**
|
|
51
54
|
* Get the text for a specifier, handling aliasing
|
|
52
55
|
*/
|
|
56
|
+
// oxlint-disable-next-line consistent-function-scoping
|
|
53
57
|
function getSpecifierText(spec) {
|
|
54
58
|
const imported = spec.imported.type === 'Identifier'
|
|
55
59
|
? spec.imported.name
|
package/src/rules/default.js
CHANGED
|
@@ -15,6 +15,7 @@ exports.defaultRule = (0, eslint_devkit_1.createRule)({
|
|
|
15
15
|
meta: {
|
|
16
16
|
type: 'problem',
|
|
17
17
|
docs: {
|
|
18
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-import-next/docs/rules/default.md',
|
|
18
19
|
description: 'Ensure a default export is present, given a default import',
|
|
19
20
|
},
|
|
20
21
|
messages: {
|