Reputation: 7105
I'm trying to prevent type checking from my typescript project as it's still under development.
I tried adding "checkJs": false
in my tsconfig file but still type checking triggers. Only solution i found was to add // @ts-nocheck
in every file of my project. Is there a way to disable type checking without having to add // @ts-nocheck
to every single file and instead use it in a single place.
my tsconfig.json
file
{
"compilerOptions": {
"target": "es5",
"checkJs": false,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noEmit": true,
"jsx": "preserve",
"isolatedModules": true
},
"include": [
"src"
]
}
Upvotes: 0
Views: 4835
Reputation: 342
create .eslintrc.js
in your root to ignore what you want or config your eslint
. please read the docs, there are many rules in there. your case:
module.exports = {
extends: ["react-app", "plugin:prettier/recommended"],
rules: {
"@typescript-eslint/ban-ts-ignore": "off"
},
plugins: ["react", "@typescript-eslint", "prettier"]
};
to igore type check
Upvotes: 1