@@ -253,6 +253,17 @@ describe("Block Comment Lexer", () => {
253253 ] ) ;
254254 } ) ;
255255
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+
256267 it ( "Should allow escaping @ in an email" , ( ) => {
257268 const tokens = lex ( "/* test\\@example.com */" ) ;
258269 equal ( tokens , [
@@ -651,6 +662,17 @@ describe("Line Comment Lexer", () => {
651662 ] ) ;
652663 } ) ;
653664
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+
654676 it ( "Should allow escaping @ in an email" , ( ) => {
655677 const tokens = lex ( "// test\\@example.com" ) ;
656678 equal ( tokens , [
@@ -949,6 +971,17 @@ describe("Raw Lexer", () => {
949971 ] ) ;
950972 } ) ;
951973
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+
952985 it ( "Should allow escaping @ in an email" , ( ) => {
953986 const tokens = lex ( "test\\@example.com" ) ;
954987 equal ( tokens , [
0 commit comments