@condorhero/eslint-config-basic
Note: The code comes from @antfu/eslint-config
My basic ESLint config presets
- Double quotes, must semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- JavaScript, NodeJs out-of-box
- Lint also for json, yaml, markdown
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
Usage
Install
pnpm add -D eslint @condorhero/eslint-config-basic
npm install -D eslint @condorhero/eslint-config-basic
Config
For example .eslintrc
file:
{
"extends": "@condorhero/eslint-config-basic"
}
You don't need .eslintignore
normally as it has been provided by the preset.
Add script for package.json
For example:
{
"scripts": {
"lint": "eslint ."
}
}
Config VS Code auto fix
Create .vscode/settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
License
MIT