Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luooooob/eslint-config
My shareable ESLint configuration.
https://github.com/luooooob/eslint-config
Last synced: 3 months ago
JSON representation
My shareable ESLint configuration.
- Host: GitHub
- URL: https://github.com/luooooob/eslint-config
- Owner: luooooob
- License: mit
- Created: 2021-11-24T15:10:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T17:08:07.000Z (about 1 year ago)
- Last Synced: 2024-07-02T03:52:22.355Z (4 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-luooooob - luooooob/eslint-config - My shareable ESLint configuration. (JavaScript)
README
# @luooooob/eslint-config
My shareable ESLint configuration. Inspired by https://github.com/antfu/eslint-config
## Feature
1. Out of the box.
2. Support `javascript`, `typescript`, `javascriptreact`, `typescriptreact`, `vue` and `json`, `package.json`, `tsconfig.json` files.## Usage
### Install
```sh
npm i -D @luooooob/eslint-config
```### Config .eslintrc
```json
{
"extends": "@luooooob"
}
```### Add script for package.json
```json
{
"scripts": {
"lint": "eslint . --fix"
}
}
```### Config editor
I recommend using eslint as the default formatter of your editor. For example, if you are using VS Code, create a `.vscode/settings.json`:
```json
{
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"json"
],
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[json]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
}
```