An ESLint Flat Config for !mportantImport.
First follow the instructions for setup @antfu/eslint-config
:
pnpm dlx @antfu/eslint-config@latest
pnpm i
Then add and import @importantimport/eslint-config
:
pnpm add -D @importantimport/eslint-config
# eslint.config.js
import antfu from '@antfu/eslint-config'
+ import ii from '@importantimport/eslint-config'
export default antfu()
+ .append(ii())
Rename your eslint.config.js
to eslint.config.ts
and set the flag for scripts and vscode:
# package.json
{
"scripts": {
- "lint": "eslint .",
+ "lint": "eslint . --flag unstable_ts_config",
- "lint:fix": "eslint . --fix"
+ "lint:fix": "eslint . --flag unstable_ts_config --fix"
},
}
# .vscode/settings.json
{
+ "eslint.options": {
+ "flags": ["unstable_ts_config"]
+ }
}