For production applications, it is recommended to enable type-aware lint rules in your ESLint configuration. This involves replacing tseslint.configs.recommended with one of the following type-checked configurations:
tseslint.configs.recommendedTypeCheckedtseslint.configs.strictTypeChecked (stricter)tseslint.configs.stylisticTypeChecked (for stylistic rules)
You must also configure languageOptions.parserOptions to include your project (e.g., ./tsconfig.app.json) and tsconfigRootDir to enable type-aware linting.
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// 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,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])