Skip to content

Commit 55534f1

Browse files
authored
test: ensure no-restricted-imports works with NodeJS imports (#15907)
1 parent 901ce0f commit 55534f1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/lib/rules/no-restricted-imports.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,17 @@ ruleTester.run("no-restricted-imports", rule, {
10831083
column: 1,
10841084
endColumn: 41
10851085
}]
1086+
},
1087+
{
1088+
code: "import absoluteWithPatterns from '#foo/bar';",
1089+
options: [{ patterns: ["\\#foo"] }],
1090+
errors: [{
1091+
message: "'#foo/bar' import is restricted from being used by a pattern.",
1092+
type: "ImportDeclaration",
1093+
line: 1,
1094+
column: 1,
1095+
endColumn: 45
1096+
}]
10861097
}
10871098
]
10881099
});

0 commit comments

Comments
 (0)