feat(create-vite): set "strict: true" in tsconfig.node.json#15820
feat(create-vite): set "strict: true" in tsconfig.node.json#15820patak-cat merged 1 commit intovitejs:mainfrom
Conversation
When using @typescript-eslint/strict-type-checked rule set on a fresh Vite project and vite.config.ts is included in the files that eslint runs on, it results in the following error: 0:1 error This rule requires the `strictNullChecks` compiler option to be turned on to function correctly @typescript-eslint/prefer-nullish-coalescing 0:1 error This rule requires the `strictNullChecks` compiler option to be turned on to function correctly @typescript-eslint/no-unnecessary-condition Given that we have "strict" enabled in the main tsconfig.json it makes sense to have it enabled here too.
|
|
|
Thanks for merging. @patak-dev do you think its worth me opening a separate PR to also add the following three items from /* Linting */
"strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true,If so, are there any other additional compiler options I should copy across at the same time? I did read the documentation on Clearly |
Description
When using
@typescript-eslint/strict-type-checkedrule set on a fresh Vite project andvite.config.tsis included in the files that eslint runs on, it results in the following error:Given that we have
strictenabled in the maintsconfig.jsonit makes sense to have it enabled here too.Here's an example
eslint.cjsto use in a fresh Vite project where you can see this error:What is the purpose of this pull request?