Error with 'no-unsafe-*' rules in Vite project #7465
Labels
bug
Something isn't working
fix: user error
issue was fixed by correcting the configuration / correcting the code
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
working as intended
Issues that are closed as they are working as intended
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
I have a Vite project using the
react-ts
template. I setup xo as my linter, which uses this project under the hood.I reported this issue on the xo project, but it got closed, asking me to open an issue in typescript-eslint instead.
I’m having an issue with
@typescript-eslint/no-unsafe-*
rules on the following code:plugin.ts
src/app.tsx
However, if I declare the type locally, it works:
And it’s also OK if I import the type from another file under the
src
directory:I’m using the following configuration:
Here are my two TS config files:
tsconfig.json
tsconfig.node.json
Reproduction Repository Link
https://github.com/nicolas-goudry/xo-ts-vite-no-unsafe
Repro Steps
npm install
npm run lint
Versions
@typescript-eslint/eslint-plugin
6.3.0
@typescript-eslint/parser
6.3.0
TypeScript
5.1.6
ESLint
8.47.0
node
18.16.0
The text was updated successfully, but these errors were encountered: