You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importtype{BuildInfoFromRoot}from'../plugin'constresponse=awaitfetch('/some-url')// This is not OK for typescript-eslintconstdata: BuildInfoFromRoot=awaitresponse.json()functionApp(){return<pre>{JSON.stringify(data,null,2)}</pre>}exportdefaultApp
First of all: thanks for this awesome project, I use it in all of my projects and it’s a breeze!
I have a Vite project using the
react-ts
template. I setup xo and 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
Here is a repository reproducing the issue: https://github.com/nicolas-goudry/xo-ts-vite-no-unsafe
The text was updated successfully, but these errors were encountered: