For production applications using this Vite + TypeScript template, it is recommended to enable type-aware lint rules by replacing tseslint.configs.recommended with tseslint.configs.recommendedTypeChecked, tseslint.configs.strictTypeChecked, or tseslint.configs.stylisticTypeChecked. You must also configure parserOptions to point to your tsconfig files.
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})