You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A regex for packages should be treated as internal. Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other.
514
503
515
-
By default, any package referenced from [`import-x/external-module-folders`](#importexternal-module-folders) will be considered as "external", including packages in a monorepo like yarn workspace or lerna environment. If you want to mark these packages as "internal" this will be useful.
504
+
By default, any package referenced from [`import-x/external-module-folders`](#import-xexternal-module-folders) will be considered as "external", including packages in a monorepo like yarn workspace or lerna environment. If you want to mark these packages as "internal" this will be useful.
516
505
517
506
For example, if your packages in a monorepo are all in `@scope`, you can configure `import-x/internal-regex` like this
518
507
@@ -593,3 +582,12 @@ In Package Settings / SublimeLinter / User Settings:
593
582
594
583
I believe this defaults to `3`, so you may not need to alter it depending on your
Copy file name to clipboardexpand all lines: docs/rules/consistent-type-specifier-style.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,6 @@ This rule either enforces or bans the use of inline type-only markers for named
31
31
32
32
This rule includes a fixer that will automatically convert your specifiers to the correct form - however the fixer will not respect your preferences around de-duplicating imports. If this is important to you, consider using the [`import-x/no-duplicates`] rule.
33
33
34
-
[`import-x/no-duplicates`]: ./no-duplicates.md
35
-
36
34
## Options
37
35
38
36
The rule accepts a single string option which may be one of:
@@ -89,3 +87,5 @@ import {typeof Foo} from 'Foo';
89
87
If you aren't using Flow or TypeScript 4.5+, then this rule does not apply and need not be used.
90
88
91
89
If you don't care about, and don't want to standardize how named specifiers are imported then you should not use this rule.
Copy file name to clipboardexpand all lines: docs/rules/extensions.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ By providing an object you can configure each extension separately.
22
22
}]
23
23
```
24
24
25
-
For example `{ "js": "always", "json": "never"}` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension.
25
+
For example `{ "js": "always", "json": "never"}` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension.
26
26
27
27
By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions.
28
28
@@ -66,8 +66,8 @@ For example, given the following folder structure:
Copy file name to clipboardexpand all lines: docs/rules/named.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,6 @@ Redux's npm module includes this key, and thereby is lintable, for example.
14
14
15
15
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported. Note that type imports and exports, as used by [Flow], are always ignored.
16
16
17
-
[ignored]: ../../README.md#importignore
18
-
[unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
19
-
[Flow]: https://flow.org/
20
-
21
17
## Rule Details
22
18
23
19
Given:
@@ -100,3 +96,6 @@ runtime, you will likely see false positives with this rule.
The enforced order is the same as the order of each element in a group. Omitted types are implicitly grouped together as the last element. Example:
108
108
@@ -224,6 +224,8 @@ Example:
224
224
225
225
[Import Type](https://github.com/un-ts/eslint-plugin-import-x/blob/ea7c13eb9b18357432e484b25dfa4451eca69c5b/src/utils/import-type.ts#L145) is resolved as a fixed string in predefined set, it can't be a `patterns` (e.g., `react`, `react-router-dom`, etc).
0 commit comments