Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kouts/eslint-config-kouts
Custom ESLint and Prettier config with sensible defaults
https://github.com/kouts/eslint-config-kouts
config eslint javascript standard
Last synced: about 1 month ago
JSON representation
Custom ESLint and Prettier config with sensible defaults
- Host: GitHub
- URL: https://github.com/kouts/eslint-config-kouts
- Owner: kouts
- License: mit
- Created: 2021-05-03T09:24:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-30T06:08:16.000Z (over 2 years ago)
- Last Synced: 2024-11-28T05:18:08.266Z (2 months ago)
- Topics: config, eslint, javascript, standard
- Language: JavaScript
- Homepage:
- Size: 367 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-kouts
> Custom ESLint and Prettier config with sensible defaults
## Installation
```bash
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:
```bash
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/javascript` for JavaScript / TypeScript projects
- `eslint-config-kouts/vue2` for Vue.js 2 projects
- `eslint-config-kouts/vue3` for Vue.js 3 projects
- `eslint-config-kouts/vue3-typescript` for Vue.js 3 / TypeScript projectsAdd the desired config preset into your `.eslintrc.js` file:
```javascript
module.exports = {
extends: ['eslint-config-kouts/vue2']
}
```Add a `prettier.config.js` file with contents:
```javascript
module.exports = require('eslint-config-kouts/prettier.config.js')
```You can add ESLint commands to `.package-json`
```json
{
"lint": "eslint \"**/*.{vue,ts,js}\"",
"lint-fix": "eslint --fix \"**/*.{vue,ts,js}\""
}
```and VS Code settings for autofix on save
`.vscode/settings.json`
```json
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
```## Features
- Based on [eslint-config-standard](https://github.com/standard/eslint-config-standard)
- [Prettier](https://prettier.io) for code formatting
- Plugins
- [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html) for linting inline scripts contained in HTML files
- [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue/) for linting Vue.js files
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) for disabling all rules that conflict with Prettier
- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) for using prettier as a code formatter for `eslint --fix`
- [sort-imports-es6-autofix](https://github.com/marudor/eslint-plugin-sort-imports-es6-autofix) for auto-fixing imports order## License
[MIT](http://opensource.org/licenses/MIT)