Default export of an Astro component has a type `any`
Opened this issue · 0 comments
nix6839 commented
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
What version of ESLint are you using?
8.57.0
What version of eslint-plugin-astro
are you using?
0.33.1
What did you do?
Configuration
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:astro/recommended"
],
parserOptions: {
project: "./tsconfig.json",
},
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
}
]
}
<!-- Foo.astro -->
<div></div>
---
// ErrorComponent.astro
import Foo from './Foo.astro';
const Errored = Foo;
---
<Errored />
What did you expect to happen?
const Errored = Foo;
There should be no lint errors.
What actually happened?
Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
Link to Minimal Reproducible Example
Additional comments
Unlike issue #341, using https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files still results in a lint error.
Maybe related with ota-meshi/astro-eslint-parser#259