- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- TypeScript, Vue out-of-the-box
- Lint also for json, yaml, markdown
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
pnpm add -D eslint @hexdigital/eslint-config
# or
yarn add -D eslint @hexdigital/eslint-config
{
"extends": "@hexdigital"
}
You don't need
.eslintignore
normally as it has been provided by the preset.
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Create .vscode/settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
pnpm run release
- hex-digital/eslint-config - Our ESLint config
- hex-digital/starter-nuxt3-base - Our starter template for Vue & Nuxt3
MIT License © 2022-PRESENT Hex Digital
Big thank you to Antfu for his eslint config that this pulls heavily from.