@@ -253,6 +253,17 @@ describe("Block Comment Lexer", () => {
253
253
] ) ;
254
254
} ) ;
255
255
256
+ it ( "Should not mistake a scoped package for a tag" , ( ) => {
257
+ const tokens = lex ( "/* @typescript-eslint/parser @jest/globals */" ) ;
258
+ equal ( tokens , [
259
+ {
260
+ kind : TokenSyntaxKind . Text ,
261
+ text : "@typescript-eslint/parser @jest/globals" ,
262
+ pos : 3 ,
263
+ } ,
264
+ ] ) ;
265
+ } ) ;
266
+
256
267
it ( "Should allow escaping @ in an email" , ( ) => {
257
268
const tokens = lex ( "/* test\\@example.com */" ) ;
258
269
equal ( tokens , [
@@ -651,6 +662,17 @@ describe("Line Comment Lexer", () => {
651
662
] ) ;
652
663
} ) ;
653
664
665
+ it ( "Should not mistake a scoped package for a tag" , ( ) => {
666
+ const tokens = lex ( "// @typescript-eslint/parser @jest/globals" ) ;
667
+ equal ( tokens , [
668
+ {
669
+ kind : TokenSyntaxKind . Text ,
670
+ text : "@typescript-eslint/parser @jest/globals" ,
671
+ pos : 3 ,
672
+ } ,
673
+ ] ) ;
674
+ } ) ;
675
+
654
676
it ( "Should allow escaping @ in an email" , ( ) => {
655
677
const tokens = lex ( "// test\\@example.com" ) ;
656
678
equal ( tokens , [
@@ -949,6 +971,17 @@ describe("Raw Lexer", () => {
949
971
] ) ;
950
972
} ) ;
951
973
974
+ it ( "Should not mistake a scoped package for a tag" , ( ) => {
975
+ const tokens = lex ( "@typescript-eslint/parser @jest/globals" ) ;
976
+ equal ( tokens , [
977
+ {
978
+ kind : TokenSyntaxKind . Text ,
979
+ text : "@typescript-eslint/parser @jest/globals" ,
980
+ pos : 0 ,
981
+ } ,
982
+ ] ) ;
983
+ } ) ;
984
+
952
985
it ( "Should allow escaping @ in an email" , ( ) => {
953
986
const tokens = lex ( "test\\@example.com" ) ;
954
987
equal ( tokens , [
0 commit comments