[英]React (CRA) disable typescript check globally
我正在遷移 React 項目,但沒有找到全局禁用打字稿的方法。 它與 @ts-nocheck 在我需要的每個文件之上配合得很好,但我想知道是否有比這更容易的事情。
謝謝。
也許您可以使用類似於以下內容的內容編輯您的tsconfig.json
文件:
{
"compilerOptions": {
"target": "es5",
"jsx": "react",
"allowSyntheticDefaultImports": true,
"alwaysStrict": false,
"strict": false,
"noImplicitAny": false,
"noEmitOnError": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": false,
"noImplicitReturns": false,
"noImplicitThis": false
},
"include": [
"src/*"
],
}
這不會禁用它,但它就像它不存在一樣。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.