@kouts/eslint-config
Custom ESLint and Prettier config with sensible defaults
Installation
npm i -D @kouts/eslint-config eslint prettier
Usage
There are 4 ESLint config presets that you can use:
@kouts/eslint-config/javascript
for JavaScript / TypeScript projects@kouts/eslint-config/vue2
for Vue.js 2 projects@kouts/eslint-config/vue3
for Vue.js 3 projects@kouts/eslint-config/vue3-typescript
for Vue.js 3 / TypeScript projects
Add the desired config preset into your .eslintrc.js
file:
module.exports = {
extends: ['@kouts/eslint-config/vue2']
}
Add a prettier.config.js
file with contents:
module.exports = require('@kouts/eslint-config/prettier.config.js')
You can add ESLint commands to .package-json
{
"lint": "eslint \"**/*.{vue,ts,js}\"",
"lint-fix": "eslint --fix \"**/*.{vue,ts,js}\""
}
and VS Code settings for autofix on save
.vscode/settings.json
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Features
License
MIT