eslint-plugin-nextfriday 3.1.0 → 3.2.1
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 +14 -0
- package/README.md +11 -7
- package/docs/rules/ENFORCE_CONSTANT_CASE.md +28 -17
- package/docs/rules/INDEX_EXPORT_ONLY.md +88 -0
- package/docs/rules/NO_INLINE_TYPE_IMPORT.md +86 -0
- package/lib/index.cjs +541 -432
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +84 -0
- package/lib/index.d.ts +84 -0
- package/lib/index.js +541 -432
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# eslint-plugin-nextfriday
|
|
2
2
|
|
|
3
|
+
## 3.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#120](https://github.com/next-friday/eslint-plugin-nextfriday/pull/120) [`6f56995`](https://github.com/next-friday/eslint-plugin-nextfriday/commit/6f569958e538f23b699fa3ac1cb4743b87e4ab60) Thanks [@joetakara](https://github.com/joetakara)! - `enforce-constant-case` now only flags global `const` declarations bound to a magic number or magic text literal. Object literals, array literals, RegExp, template literals (static or dynamic), `as const` assertions, booleans, and any non-literal initializer are no longer checked. This unblocks Next.js App Router files where reserved exports like `metadata`, `viewport`, `dynamic`, `revalidate`, `runtime`, `fetchCache`, `dynamicParams`, `preferredRegion`, and `maxDuration` are framework-owned and must keep their exact names. The rule scope now matches the documented intent of the plugin's naming convention skill ("top-level constant primitive values") instead of every static-shaped initializer.
|
|
8
|
+
|
|
9
|
+
## 3.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#118](https://github.com/next-friday/eslint-plugin-nextfriday/pull/118) [`143eee9`](https://github.com/next-friday/eslint-plugin-nextfriday/commit/143eee9fd0c6aed00e10677a6cad448dbdc9136e) Thanks [@joetakara](https://github.com/joetakara)! - Add `index-export-only` rule. Restricts `index.{js,jsx,ts,tsx}` files to imports, re-exports, and type/interface declarations only — flagging local function/class/variable declarations, inline `export const`/`export function`/`export class`, top-level expressions, and control flow. Type aliases, interfaces, and `export type` are allowed since they have no runtime cost. Included in `base`, `react`, and `nextjs` presets.
|
|
14
|
+
|
|
15
|
+
- [#118](https://github.com/next-friday/eslint-plugin-nextfriday/pull/118) [`143eee9`](https://github.com/next-friday/eslint-plugin-nextfriday/commit/143eee9fd0c6aed00e10677a6cad448dbdc9136e) Thanks [@joetakara](https://github.com/joetakara)! - Add `no-inline-type-import` rule. Disallows inline `type` markers on import specifiers (`import { type Foo }` and `import { value, type Foo }`); auto-fix hoists single inline-type imports to `import type { ... }` and splits mixed value/type imports into two separate statements while preserving aliases, default specifiers, and quote style. Also strips redundant inline markers from existing `import type { ... }` statements. Included in `base`, `react`, and `nextjs` presets.
|
|
16
|
+
|
|
3
17
|
## 3.1.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -434,6 +434,7 @@ In practice: turn the high tier on as `"error"` first, leave the medium tier as
|
|
|
434
434
|
| [enforce-sorted-destructuring](docs/rules/ENFORCE_SORTED_DESTRUCTURING.md) | Enforce alphabetical sorting of destructured properties | ✅ |
|
|
435
435
|
| [no-env-fallback](docs/rules/NO_ENV_FALLBACK.md) | Disallow fallback values for environment variables | ❌ |
|
|
436
436
|
| [no-inline-default-export](docs/rules/NO_INLINE_DEFAULT_EXPORT.md) | Disallow inline default exports - declare first, then export | ❌ |
|
|
437
|
+
| [index-export-only](docs/rules/INDEX_EXPORT_ONLY.md) | Restrict index files to imports, re-exports, and type declarations | ❌ |
|
|
437
438
|
| [no-direct-date](docs/rules/NO_DIRECT_DATE.md) | Disallow direct usage of Date constructor and methods | ❌ |
|
|
438
439
|
| [newline-after-multiline-block](docs/rules/NEWLINE_AFTER_MULTILINE_BLOCK.md) | Require a blank line after multi-line statements | ✅ |
|
|
439
440
|
| [newline-before-return](docs/rules/NEWLINE_BEFORE_RETURN.md) | Require a blank line before return statements | ✅ |
|
|
@@ -449,6 +450,7 @@ In practice: turn the high tier on as `"error"` first, leave the medium tier as
|
|
|
449
450
|
| Rule | Description | Fixable |
|
|
450
451
|
| -------------------------------------------------------------------- | --------------------------------------------------------- | ------- |
|
|
451
452
|
| [no-relative-imports](docs/rules/NO_RELATIVE_IMPORTS.md) | Disallow relative imports with ../ - use absolute imports | ❌ |
|
|
453
|
+
| [no-inline-type-import](docs/rules/NO_INLINE_TYPE_IMPORT.md) | Disallow inline 'type' markers - hoist or split imports | ✅ |
|
|
452
454
|
| [prefer-import-type](docs/rules/PREFER_IMPORT_TYPE.md) | Enforce using 'import type' for type-only imports | ✅ |
|
|
453
455
|
| [prefer-react-import-types](docs/rules/PREFER_REACT_IMPORT_TYPES.md) | Enforce direct imports from 'react' instead of React.X | ✅ |
|
|
454
456
|
| [sort-exports](docs/rules/SORT_EXPORTS.md) | Enforce a consistent ordering of export groups | ✅ |
|
|
@@ -498,16 +500,16 @@ In practice: turn the high tier on as `"error"` first, leave the medium tier as
|
|
|
498
500
|
|
|
499
501
|
| Preset | Severity | Base Rules | JSX Rules | Next.js Rules | Total Rules |
|
|
500
502
|
| -------------------- | -------- | ---------- | --------- | ------------- | ----------- |
|
|
501
|
-
| `base` | warn |
|
|
502
|
-
| `base/recommended` | error |
|
|
503
|
-
| `react` | warn |
|
|
504
|
-
| `react/recommended` | error |
|
|
505
|
-
| `nextjs` | warn |
|
|
506
|
-
| `nextjs/recommended` | error |
|
|
503
|
+
| `base` | warn | 42 | 0 | 0 | 42 |
|
|
504
|
+
| `base/recommended` | error | 42 | 0 | 0 | 42 |
|
|
505
|
+
| `react` | warn | 42 | 16 | 0 | 58 |
|
|
506
|
+
| `react/recommended` | error | 42 | 16 | 0 | 58 |
|
|
507
|
+
| `nextjs` | warn | 42 | 16 | 1 | 59 |
|
|
508
|
+
| `nextjs/recommended` | error | 42 | 16 | 1 | 59 |
|
|
507
509
|
|
|
508
510
|
The `nextjs` and `nextjs/recommended` presets ship as an array of two flat-config objects: the rule set above, plus a routing override that disables `nextfriday/file-kebab-case` and `nextfriday/jsx-pascal-case` for files matching `app/**/*.{js,jsx,ts,tsx}`, `src/app/**/*.{js,jsx,ts,tsx}`, `pages/**/*.{js,jsx,ts,tsx}`, and `src/pages/**/*.{js,jsx,ts,tsx}`. Next.js owns the filenames in those directories (`page.tsx`, `layout.tsx`, `route.ts`, `middleware.ts`, etc.), so the plugin steps out of the way. ESLint 9+ flattens nested config arrays automatically, so spreading the preset works as expected.
|
|
509
511
|
|
|
510
|
-
### Base Configuration Rules (
|
|
512
|
+
### Base Configuration Rules (42 rules)
|
|
511
513
|
|
|
512
514
|
Included in `base`, `base/recommended`, and all other presets:
|
|
513
515
|
|
|
@@ -521,6 +523,7 @@ Included in `base`, `base/recommended`, and all other presets:
|
|
|
521
523
|
- `nextfriday/enforce-sorted-destructuring`
|
|
522
524
|
- `nextfriday/enforce-type-declaration-order`
|
|
523
525
|
- `nextfriday/file-kebab-case`
|
|
526
|
+
- `nextfriday/index-export-only`
|
|
524
527
|
- `nextfriday/newline-after-multiline-block`
|
|
525
528
|
- `nextfriday/newline-before-return`
|
|
526
529
|
- `nextfriday/no-complex-inline-return`
|
|
@@ -530,6 +533,7 @@ Included in `base`, `base/recommended`, and all other presets:
|
|
|
530
533
|
- `nextfriday/no-inline-default-export`
|
|
531
534
|
- `nextfriday/no-inline-nested-object`
|
|
532
535
|
- `nextfriday/no-inline-return-properties`
|
|
536
|
+
- `nextfriday/no-inline-type-import`
|
|
533
537
|
- `nextfriday/no-lazy-identifiers`
|
|
534
538
|
- `nextfriday/no-logic-in-params`
|
|
535
539
|
- `nextfriday/no-misleading-constant-case`
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
# enforce-constant-case
|
|
2
2
|
|
|
3
|
-
Enforce SCREAMING_SNAKE_CASE for global
|
|
3
|
+
Enforce SCREAMING_SNAKE_CASE for global magic-number and magic-text constants.
|
|
4
4
|
|
|
5
5
|
## Rule Details
|
|
6
6
|
|
|
7
|
-
This rule ensures that global-scope `const` declarations
|
|
7
|
+
This rule ensures that global-scope `const` declarations bound to a **magic number** or **magic text** literal use SCREAMING_SNAKE_CASE. The rule scope is intentionally narrow:
|
|
8
|
+
|
|
9
|
+
- A magic text constant is a string literal: `const API_URL = "https://api.example.com"`
|
|
10
|
+
- A magic number constant is a number literal (including a unary `-`/`+` over a numeric literal): `const PAGE_LIMIT = 10`, `const OFFSET = -1`
|
|
11
|
+
|
|
12
|
+
Anything else is **not** checked: booleans, RegExp, template literals (static or dynamic), arrays, objects, `as const` assertions, function calls, identifiers, member expressions, JSX. Use whatever name fits the value (`metadata`, `viewport`, `statusMap`, `phoneRegex`, `isEnabled`, etc.) — the rule will not flag it.
|
|
8
13
|
|
|
9
14
|
Only global scope (top-level of a file) is checked. Local scope constants inside functions are not checked by this rule.
|
|
10
15
|
|
|
11
16
|
**Config files are exempt.** Files matching `*.config.{ts,mjs,cjs,js}`, `*.rc.*`, `*.setup.*`, `*.spec.*`, `*.test.*`, `.eslintrc*`, `.babelrc*`, and `.prettierrc*` skip this rule entirely. This avoids conflicts with framework conventions that require specific identifier names — e.g. Next.js expects `nextConfig` (not `NEXT_CONFIG`) in `next.config.ts`, Vite expects `config`, Tailwind expects `config`, etc.
|
|
12
17
|
|
|
18
|
+
### Why magic numbers and magic text only?
|
|
19
|
+
|
|
20
|
+
Reserved framework export names commonly bind to objects (Next.js App Router exports `metadata`, `viewport`, `generateStaticParams`, `dynamic`, `revalidate`, `runtime`, `fetchCache`, `dynamicParams`, `preferredRegion`, `maxDuration`; React Server Components and others have similar patterns). Forcing SCREAMING_SNAKE_CASE on any static-shaped initializer would rename those exports and break framework integration. Restricting the rule to bare number and string literals keeps the convention where it adds value (avoiding magic constants scattered through code) without colliding with framework-owned names.
|
|
21
|
+
|
|
13
22
|
## Examples
|
|
14
23
|
|
|
15
24
|
### Incorrect
|
|
@@ -18,10 +27,8 @@ Only global scope (top-level of a file) is checked. Local scope constants inside
|
|
|
18
27
|
const defaultCover = "/images/default.jpg";
|
|
19
28
|
const pageLimit = 10;
|
|
20
29
|
const apiBaseUrl = "https://api.example.com";
|
|
21
|
-
const
|
|
22
|
-
const phoneRegex = /^[0-9]{10}$/;
|
|
30
|
+
const negativeOne = -1;
|
|
23
31
|
const default_theme = "dark";
|
|
24
|
-
export const categories = [{ id: "1" }] as const;
|
|
25
32
|
```
|
|
26
33
|
|
|
27
34
|
### Correct
|
|
@@ -30,35 +37,39 @@ export const categories = [{ id: "1" }] as const;
|
|
|
30
37
|
const DEFAULT_COVER = "/images/default.jpg";
|
|
31
38
|
const PAGE_LIMIT = 10;
|
|
32
39
|
const API_BASE_URL = "https://api.example.com";
|
|
33
|
-
const
|
|
34
|
-
const PHONE_REGEX = /^[0-9]{10}$/;
|
|
40
|
+
const NEGATIVE_ONE = -1;
|
|
35
41
|
const DEFAULT_THEME = "dark";
|
|
36
|
-
export const CATEGORIES = [{ id: "1" }] as const;
|
|
37
42
|
|
|
38
|
-
const SKELETON_ITEMS = [1, 2, 3, 4, 5];
|
|
39
|
-
const MAP_STYLE = { height: "320px", width: "100%" };
|
|
40
|
-
const STATUS_MAP = { ACTIVE: "active" } as const;
|
|
41
|
-
|
|
42
|
-
// Booleans with standard prefixes (is, has, should, etc.) are exempt
|
|
43
43
|
const isProduction = true;
|
|
44
44
|
const hasAccess = false;
|
|
45
|
+
const featureEnabled = true;
|
|
46
|
+
|
|
47
|
+
const phoneRegex = /^[0-9]{10}$/;
|
|
48
|
+
const template = `hello world`;
|
|
49
|
+
const skeletonItems = [1, 2, 3, 4, 5];
|
|
50
|
+
const mapStyle = { height: "320px", width: "100%" };
|
|
51
|
+
const statusMap = { ACTIVE: "active" } as const;
|
|
52
|
+
const categories = [{ id: "1" }] as const;
|
|
53
|
+
|
|
54
|
+
export const metadata: Metadata = { title: "404 - Page Not Found" };
|
|
55
|
+
export const viewport: Viewport = { themeColor: "#fff" };
|
|
56
|
+
export const generateStaticParams = async () => [];
|
|
45
57
|
|
|
46
|
-
// Template literals with expressions are dynamic, camelCase is fine
|
|
47
58
|
const pendingHref = `/branch/${branch.branchNumber}`;
|
|
48
59
|
|
|
49
|
-
// Functions and components are not checked
|
|
50
60
|
const handleClick = () => {};
|
|
51
61
|
const MyComponent = () => {};
|
|
52
62
|
|
|
53
|
-
// Local scope is not checked
|
|
54
63
|
function foo() {
|
|
55
64
|
const maxRetry = 3;
|
|
56
65
|
}
|
|
57
66
|
```
|
|
58
67
|
|
|
68
|
+
> Note: Next.js App Router has a few string-valued reserved exports — `dynamic = "force-dynamic"`, `runtime = "edge"`, `fetchCache = "default-cache"`, etc. — and one number-valued one (`revalidate = 60`, `maxDuration = 30`). These remain in scope for this rule because their initializers are bare literals. Disable `nextfriday/enforce-constant-case` for `app/**` and `pages/**` in your own flat config if you use those exports.
|
|
69
|
+
|
|
59
70
|
## Configuration
|
|
60
71
|
|
|
61
|
-
This rule has no options — only severity is configurable (`"error"`, `"warn"`, `"off"`). It pairs with [`no-misleading-constant-case`](./NO_MISLEADING_CONSTANT_CASE.md) so that
|
|
72
|
+
This rule has no options — only severity is configurable (`"error"`, `"warn"`, `"off"`). It pairs with [`no-misleading-constant-case`](./NO_MISLEADING_CONSTANT_CASE.md) so that magic-literal globals use `SCREAMING_SNAKE_CASE` while local scopes and dynamic values keep `camelCase`.
|
|
62
73
|
|
|
63
74
|
### Install
|
|
64
75
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# index-export-only
|
|
2
|
+
|
|
3
|
+
Restrict `index` files to imports, re-exports, and type declarations only.
|
|
4
|
+
|
|
5
|
+
## Rule Details
|
|
6
|
+
|
|
7
|
+
This rule enforces that `index.{js,jsx,ts,tsx}` files act purely as barrel files. Any runtime declaration — functions, classes, variables, top-level expressions, or inline `export const`/`export function`/`export class` — must live in its own module and be re-exported from the index.
|
|
8
|
+
|
|
9
|
+
The rule applies only when the basename of the file is `index`. Files like `index.test.ts`, `index.spec.ts`, or `index.d.ts` are not affected.
|
|
10
|
+
|
|
11
|
+
### Why?
|
|
12
|
+
|
|
13
|
+
Index files are entry points. Mixing implementation into them obscures where behavior lives, breaks file-based code navigation, and makes the import surface harder to refactor. A barrel file should describe the public API of a directory — nothing more.
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Incorrect
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { clsx, type ClassValue } from "clsx";
|
|
21
|
+
import { twMerge } from "tailwind-merge";
|
|
22
|
+
|
|
23
|
+
function cn(...inputs: ClassValue[]): string {
|
|
24
|
+
return twMerge(clsx(inputs));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { cn };
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
export const VERSION = "1.0.0";
|
|
32
|
+
|
|
33
|
+
export function helper() {
|
|
34
|
+
return 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class Service {}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
console.log("loaded");
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Correct
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
export { cn } from "./cn";
|
|
48
|
+
export * from "./types";
|
|
49
|
+
export type { Props } from "./props";
|
|
50
|
+
export { default as Button } from "./button";
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import button from "./button";
|
|
55
|
+
|
|
56
|
+
export default button;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export type Foo = string;
|
|
61
|
+
export interface Bar {
|
|
62
|
+
id: string;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What This Rule Allows
|
|
67
|
+
|
|
68
|
+
- `import` statements (including side-effect imports like `import "./styles.css"`)
|
|
69
|
+
- Specifier-only `export` and `export ... from` re-exports
|
|
70
|
+
- `export *` and `export * as ns` re-exports
|
|
71
|
+
- `export default identifier` where the identifier comes from an import
|
|
72
|
+
- Top-level `type` aliases and `interface` declarations (they have no runtime cost)
|
|
73
|
+
- `export type` and `export interface` declarations
|
|
74
|
+
|
|
75
|
+
## What This Rule Disallows
|
|
76
|
+
|
|
77
|
+
- `function`, `class`, and `const`/`let`/`var` declarations at the top level
|
|
78
|
+
- Inline `export function`, `export class`, `export const`, `export let`, `export var`
|
|
79
|
+
- `export default` of a function/class/literal/object expression
|
|
80
|
+
- Top-level expression statements and control flow (`console.log(...)`, `if`, `for`, etc.)
|
|
81
|
+
|
|
82
|
+
## When Not To Use It
|
|
83
|
+
|
|
84
|
+
If your project intentionally mixes implementation and re-exports in index files — for example, a single-file utility library where `index.ts` is the only source file — disable this rule.
|
|
85
|
+
|
|
86
|
+
## Related Rules
|
|
87
|
+
|
|
88
|
+
- [no-inline-default-export](./NO_INLINE_DEFAULT_EXPORT.md) - Disallow inline default and named exports across all files
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# no-inline-type-import
|
|
2
|
+
|
|
3
|
+
Disallow inline `type` markers on import specifiers. Use `import type` or split into a separate type-only import statement.
|
|
4
|
+
|
|
5
|
+
> This rule is auto-fixable using `--fix`.
|
|
6
|
+
|
|
7
|
+
## Rule Details
|
|
8
|
+
|
|
9
|
+
This rule forbids the inline-`type` form `import { type Foo }` and the mixed form `import { value, type Foo }`. Type-only imports must be expressed at the statement level with `import type { ... }`. When value and type imports come from the same module, the rule splits them into two separate statements.
|
|
10
|
+
|
|
11
|
+
### Why?
|
|
12
|
+
|
|
13
|
+
Statement-level `import type` makes the runtime cost of every import unambiguous at a glance, simplifies tooling that distinguishes erased imports from real ones (bundlers, type-only emit, transpilers), and removes the need for readers to scan each specifier for an inline keyword.
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Incorrect
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { type foo } from "bar";
|
|
21
|
+
|
|
22
|
+
import { baz, type moo } from "mee";
|
|
23
|
+
|
|
24
|
+
import Default, { value, type Foo } from "src";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Correct
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import type { foo } from "bar";
|
|
31
|
+
|
|
32
|
+
import { baz } from "mee";
|
|
33
|
+
import type { moo } from "mee";
|
|
34
|
+
|
|
35
|
+
import Default, { value } from "src";
|
|
36
|
+
import type { Foo } from "src";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Auto-fixing
|
|
40
|
+
|
|
41
|
+
The rule's `--fix` produces these transformations:
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
// Single inline type → hoisted
|
|
45
|
+
import { type foo } from "bar";
|
|
46
|
+
// becomes
|
|
47
|
+
import type { foo } from "bar";
|
|
48
|
+
|
|
49
|
+
// All inline types → hoisted
|
|
50
|
+
import { type foo, type bar } from "src";
|
|
51
|
+
// becomes
|
|
52
|
+
import type { foo, bar } from "src";
|
|
53
|
+
|
|
54
|
+
// Mixed value + inline type → split
|
|
55
|
+
import { baz, type moo } from "mee";
|
|
56
|
+
// becomes
|
|
57
|
+
import { baz } from "mee";
|
|
58
|
+
import type { moo } from "mee";
|
|
59
|
+
|
|
60
|
+
// Default + inline type → split
|
|
61
|
+
import Default, { type Foo } from "src";
|
|
62
|
+
// becomes
|
|
63
|
+
import Default from "src";
|
|
64
|
+
import type { Foo } from "src";
|
|
65
|
+
|
|
66
|
+
// Aliases are preserved
|
|
67
|
+
import { foo as bar, type baz as qux } from "src";
|
|
68
|
+
// becomes
|
|
69
|
+
import { foo as bar } from "src";
|
|
70
|
+
import type { baz as qux } from "src";
|
|
71
|
+
|
|
72
|
+
// Redundant inline markers inside `import type` are stripped
|
|
73
|
+
import type { foo, type bar } from "src";
|
|
74
|
+
// becomes
|
|
75
|
+
import type { foo, bar } from "src";
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
After auto-fix, other import-ordering rules (such as `sort-imports`) may re-order the resulting statements according to their own grouping rules.
|
|
79
|
+
|
|
80
|
+
## When Not To Use It
|
|
81
|
+
|
|
82
|
+
If your codebase intentionally uses the inline `type` form to keep value and type imports adjacent in a single statement, disable this rule.
|
|
83
|
+
|
|
84
|
+
## Related Rules
|
|
85
|
+
|
|
86
|
+
- [prefer-import-type](./PREFER_IMPORT_TYPE.md) - Hoists imports that are used only as types to `import type`. Complements this rule for usage-based detection.
|