File tree 2 files changed +58
-0
lines changed
2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,15 @@ let analyzeModule = ({
325
325
continue
326
326
}
327
327
328
+ if (
329
+ selector === 'class' &&
330
+ modifiers . includes ( 'export' ) &&
331
+ modifiers . includes ( 'decorated' )
332
+ ) {
333
+ // Not always handled correctly at the moment
334
+ continue
335
+ }
336
+
328
337
let { defineGroup, getGroup } = useGroups ( options )
329
338
for ( let officialGroup of generatePredefinedGroups ( {
330
339
cache : cachedGroupsByModifiersAndSelectors ,
Original file line number Diff line number Diff line change @@ -959,6 +959,7 @@ describe(ruleName, () => {
959
959
} ,
960
960
)
961
961
962
+ /* Currently not handled correctly
962
963
ruleTester.run(
963
964
`${ruleName}(${type}): prioritize default over decorated`,
964
965
rule,
@@ -1036,6 +1037,7 @@ describe(ruleName, () => {
1036
1037
valid: [],
1037
1038
},
1038
1039
)
1040
+ */
1039
1041
} )
1040
1042
1041
1043
describe ( `${ ruleName } (${ type } ): function modifiers priority` , ( ) => {
@@ -2375,6 +2377,53 @@ describe(ruleName, () => {
2375
2377
} ,
2376
2378
)
2377
2379
} )
2380
+
2381
+ ruleTester . run (
2382
+ `${ ruleName } (${ type } ): ignores exported decorated classes` ,
2383
+ rule ,
2384
+ {
2385
+ invalid : [
2386
+ {
2387
+ errors : [
2388
+ {
2389
+ data : {
2390
+ right : 'B' ,
2391
+ left : 'C' ,
2392
+ } ,
2393
+ messageId : 'unexpectedModulesOrder' ,
2394
+ } ,
2395
+ ] ,
2396
+ output : dedent `
2397
+ @B
2398
+ class B {}
2399
+
2400
+ @A
2401
+ export class A {}
2402
+
2403
+ @C
2404
+ class C {}
2405
+ ` ,
2406
+ code : dedent `
2407
+ @C
2408
+ class C {}
2409
+
2410
+ @A
2411
+ export class A {}
2412
+
2413
+ @B
2414
+ class B {}
2415
+ ` ,
2416
+ options : [
2417
+ {
2418
+ ...options ,
2419
+ groups : [ 'unknown' ] ,
2420
+ } ,
2421
+ ] ,
2422
+ } ,
2423
+ ] ,
2424
+ valid : [ ] ,
2425
+ } ,
2426
+ )
2378
2427
} )
2379
2428
2380
2429
describe ( `${ ruleName } : sorting by natural order` , ( ) => {
You can’t perform that action at this time.
0 commit comments