Skip to content

Latest commit

 

History

History

eslint-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@importantimport/eslint-config npm

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"]
+ }
}

License

MIT