Skip to content

Commit

Permalink
feat: Add test for import maps (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
scagood authored and aladdin-add committed Jan 9, 2024
1 parent cb9a965 commit ea14c4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/fixtures/no-extraneous/import-map/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"imports": {
"#b": "./src/a.js"
}
}
Empty file.
4 changes: 4 additions & 0 deletions tests/lib/rules/no-extraneous-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ ruleTester.run("no-extraneous-import", rule, {
filename: fixture("optionalDependencies/a.js"),
code: "import aaa from 'aaa'",
},
{
filename: fixture("import-map/a.js"),
code: "import '#b'",
},

// missing packages are warned by no-missing-import
{
Expand Down

0 comments on commit ea14c4f

Please sign in to comment.