@condorhero/eslint-config-basic
v0.2.0
Published
My eslint basic config
Downloads
15
Maintainers
Readme
@condorhero/eslint-config-basic
Note: The code comes from @antfu/eslint-config
- 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
# or with npm
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
}
}