@importantimport/eslint-config
v1.0.0-alpha.2
Published
An ESLint Flat Config for !mportantImport.
Downloads
176
Readme
@importantimport/eslint-config
An ESLint Flat Config for !mportantImport.
Usage
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())
TypeScript Config (optional)
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"]
+ }
}