File tree 2 files changed +14
-1
lines changed 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1151,6 +1151,7 @@ export interface Options {
1151
1151
pathGroups ?: PathGroup [ ]
1152
1152
sortTypesGroup ?: boolean
1153
1153
warnOnUnassignedImports ?: boolean
1154
+ privateImportsFeatureFlag ?: boolean
1154
1155
}
1155
1156
1156
1157
type MessageId =
@@ -1273,6 +1274,10 @@ export default createRule<[Options?], MessageId>({
1273
1274
type : 'boolean' ,
1274
1275
default : false ,
1275
1276
} ,
1277
+ privateImportsFeatureFlag : {
1278
+ type : 'boolean' ,
1279
+ default : false ,
1280
+ } ,
1276
1281
} ,
1277
1282
additionalProperties : false ,
1278
1283
dependencies : {
@@ -1391,7 +1396,10 @@ export default createRule<[Options?], MessageId>({
1391
1396
options . pathGroups || [ ] ,
1392
1397
)
1393
1398
const { groups, omittedTypes } = convertGroupsToRanks (
1394
- options . groups || defaultGroups ,
1399
+ options . groups ||
1400
+ ( options . privateImportsFeatureFlag
1401
+ ? defaultGroups
1402
+ : defaultGroups . slice ( 1 ) ) ,
1395
1403
)
1396
1404
ranks = {
1397
1405
groups,
Original file line number Diff line number Diff line change @@ -4818,6 +4818,11 @@ import { localA } from "./a";
4818
4818
console.log({ internA, scopeA, localA });
4819
4819
` ,
4820
4820
...parserConfig ,
4821
+ options : [
4822
+ {
4823
+ privateImportsFeatureFlag : true ,
4824
+ } ,
4825
+ ] ,
4821
4826
} ) ,
4822
4827
] ,
4823
4828
invalid : [
You can’t perform that action at this time.
0 commit comments