# npx eslint site/src/layouts/BaseLayout.astro
/Users/tim/projects/maps/site/src/layouts/BaseLayout.astro
2:2 error Parsing error: `import` can only be used in `import()` or `import.meta` prettier/prettier
I know this is not a minimal preproduction, I'll see if I can create one. But before upgrading to Astro 3, the linter configuration was working using this plugin together with eslint-plugin-prettier. After upgrading to Astro 3, the linter can no longer parse *.astro files.
I imagine this has to do with the parser or parserOptions that are being used, but I cannot figure out a combination that works. So far, the only solution I have found is to disable the prettier/prettier rules when using this eslint-plugin-astro plugin.
The prettier/prettier rule has nothing to do with this plugin. Perhaps you should open the issue in another repository.
The branch you shared doesn't seem to exist anymore and I couldn't debug it.
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.50.0
What version of
eslint-plugin-astro
are you using?0.29.0
What did you do?
Configuration
```json { "extends": [ "planet" ], "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, "rules": { "import/named": "off", "import/default": "off", "import/no-unresolved": [ "error", { "ignore": [ "astro:content", "@astrojs/*" ] } ] }, "overrides": [ { "files": [ "*.astro" ], "extends": [ "plugin:astro/recommended" ] }, { "files": [ "*.jsx" ], "extends": [ "planet/react" ], "rules": { "import/named": "off" } }, { "files": [ "*.mdx" ], "extends": [ "plugin:mdx/recommended", "planet/react" ] } ] } ```What did you expect to happen?
I upgraded from Astro 2 to 3 (see https://github.com/planetlabs/maps/pull/278/files), and expected the linter configuration to continue working.
What actually happened?
Link to Minimal Reproducible Example
https://github.com/planetlabs/maps/pull/278/files
Additional comments
I know this is not a minimal preproduction, I'll see if I can create one. But before upgrading to Astro 3, the linter configuration was working using this plugin together with
eslint-plugin-prettier
. After upgrading to Astro 3, the linter can no longer parse*.astro
files.I imagine this has to do with the
parser
orparserOptions
that are being used, but I cannot figure out a combination that works. So far, the only solution I have found is to disable theprettier/prettier
rules when using thiseslint-plugin-astro
plugin.I see that the readme suggests turning the
prettier/prettier
rules off: https://github.com/ota-meshi/eslint-plugin-astro/blob/v0.29.0/README.md?plain=1#L165-L172Is anyone successfully using this plugin together with Prettier and Astro 3?