eslint-config-kouts
eslint-config-kouts
Custom ESLint and Prettier config with sensible defaults
Installation
npm i -D eslint prettier@2 eslint-config-kouts eslint-config-standard eslint-plugin-html eslint-plugin-import eslint-plugin-n
eslint-plugin-promise eslint-plugin-vue eslint-plugin-prettier eslint-config-prettier eslint-plugin-sort-imports-es6-autofix
For the Vue 3 TypeScript preset we need additionally:
npm i -D @typescript-eslint/parser @vue/eslint-config-typescript vue-eslint-parser
Usage
There are 4 ESLint config presets that you can use:
eslint-config-kouts/javascriptfor JavaScript / TypeScript projectseslint-config-kouts/vue2for Vue.js 2 projectseslint-config-kouts/vue3for Vue.js 3 projectseslint-config-kouts/vue3-typescriptfor Vue.js 3 / TypeScript projects
Add the desired config preset into your .eslintrc.js file:
module.exports = {
extends: ['eslint-config-kouts/vue2']
}
Add a prettier.config.js file with contents:
module.exports = require('eslint-config-kouts/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
- Based on eslint-config-standard
- Prettier for code formatting
- Plugins
- eslint-plugin-html for linting inline scripts contained in HTML files
- eslint-plugin-vue for linting Vue.js files
- eslint-config-prettier for disabling all rules that conflict with Prettier
- eslint-plugin-prettier for using prettier as a code formatter for
eslint --fix - sort-imports-es6-autofix for auto-fixing imports order
License
Related Packages
@icij/eslint-config
ESLint config for ICIJ projects, including Typescript, Stylistic and Vue support
1,599
0
@uscreen.de/eslint-config-prettystandard-vue
ESLint sharable config: prettier & standard for vue
1,039
1
@anoesj/eslint-config-vue-ts
Anoesj's ESLint config for Vue and Nuxt projects with TypeScript
1,603
0
Version History
| Version | Released | License |
|---|---|---|
| 2.3.0 | MIT | |
| 2.2.0 | MIT | |
| 2.1.3 | MIT | |
| 2.1.2 | MIT | |
| 2.1.1 | MIT | |
| 2.1.0 | MIT | |
| 1.3.6 | MIT | |
| 1.3.5 | MIT | |
| 1.3.4 | MIT | |
| 1.3.3 | MIT | |
| 1.3.2 | MIT | |
| 1.2.0 | MIT | |
| 1.1.0 | MIT |
Pre-releases (1)
| Version | Released | License |
|---|---|---|
| 3.0.0-beta.0 | MIT |