"noImplicitAny": true not working in a vite react project

Viewed 12

I've created a brand new TS project. using Vite with it's react-ts template.

In App.tsx, I've added the following line const a: any = 0;

this is how much tsconfig looks like:

{
  "compilerOptions": {
    "target": "ESNext",
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": true,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": ["src"],
  "references": [{ "path": "./tsconfig.node.json" }]
}

when I run pnpm build, which runs: "tsc && vite build",, it doesn't seem to fail. I wish to disallow any usage of the "any" type in the project. How can I achieve that?

0 Answers
Related