@kriszu/eslint-config v3.2.5
@kriszu/eslint-config
kriszu eslint configuration based on @antfu/eslint-config.
Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3.
Features
- Support Vue 2 and 3 out-of-box.
- Support JSON(5), YAML, Markdown...
- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Sorted imports, dangling commas
You don't need
.eslintignore
normally as it has been provided by the preset.
Install
pnpm i -D eslint @kriszu/eslint-config
Config .eslintrc
{
"extends": "@kriszu/eslint-config"
}
Add script for package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Config VSCode auto fix File .vscode/setting.json
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Lint Staged
If you want to apply lint and auto-fix before every commit, you can add the following to your package.json
:
{
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
and then
npm i -D lint-staged simple-git-hooks
Reference project
License
2 days ago
2 days ago
15 days ago
1 month ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago