What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
In my .astro file, I have added an importmap to the head. Oxlint sees this as an error.
<script type="importmap">
{
"imports": {
"swiper": "https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.mjs"
}
}
</script>
> oxlint
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[src/pages/components/examples/[...slug].astro:34:14]
33 │ {
34 │ "imports": {
· ▲
35 │ "swiper": "https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.mjs"
╰────
help: Try inserting a semicolon here
Found 0 warnings and 1 error.
Current workaround:
const importMap = {
"imports": {
"swiper": "https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.mjs"
}
}
...
<script type="importmap" set:html={JSON.stringify(importMap)}></script>
What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "plugins": ["import", "eslint"], "rules": { "curly": ["error", "multi-line", "consistent"], // https://oxc.rs/docs/guide/usage/linter/rules/eslint/curly.html "eslint/eqeqeq": ["error", "smart"], // https://oxc.rs/docs/guide/usage/linter/rules/eslint/eqeqeq.html "default-case": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/default-case.html "yoda": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/yoda.html "no-nested-ternary": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-nested-ternary.html "no-var": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-var.html "no-console": [ "error", { "allow": [ "info", "warn", "error" ] } ], // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-console.html "unicorn/empty-brace-spaces": "error", // https://oxc.rs/docs/guide/usage/linter/rules/unicorn/empty-brace-spaces.html "guard-for-in": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/guard-for-in.html "import/no-absolute-path": "error", // https://oxc.rs/docs/guide/usage/linter/rules/import/no-absolute-path.html "capitalized-comments": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/capitalized-comments.html "unicorn/catch-error-name": "error", // https://oxc.rs/docs/guide/usage/linter/rules/unicorn/catch-error-name "import/consistent-type-specifier-style": "error", // https://oxc.rs/docs/guide/usage/linter/rules/import/consistent-type-specifier-style "default-param-last": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/default-param-last "import/no-nodejs-modules": "error", // https://oxc.rs/docs/guide/usage/linter/rules/import/no-nodejs-modules "no-template-curly-in-string": "error", // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-template-curly-in-string } }What happened?
In my .astro file, I have added an importmap to the head. Oxlint sees this as an error.
Current workaround: