https://github.com/bbcvc/eslint-config
eslint配置
https://github.com/bbcvc/eslint-config
Last synced: 6 months ago
JSON representation
eslint配置
- Host: GitHub
- URL: https://github.com/bbcvc/eslint-config
- Owner: bbcvc
- Created: 2022-09-23T10:47:52.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-26T08:11:42.000Z (about 3 years ago)
- Last Synced: 2025-11-05T20:13:55.816Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 99.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @bbcvc/eslint-config
[](https://npmjs.com/package/@bbcvc/eslint-config)
[](https://npmjs.com/package/@bbcvc/eslint-config)
- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Designed to work with TypeScript, Vue out-of-box
- Lint also for json, yaml, markdown
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
## Usage
### Install
```bash
pnpm add -D eslint @bbcvc/eslint-config
```
### Config `.eslintrc`
```json
{
"extends": "@bbcvc"
}
```
> You don't need `.eslintignore` normally as it has been provided by the preset.
### Add script for package.json
For example:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
```
### Config VS Code auto fix
Create `.vscode/settings.json`
```json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"json5"
]
}
```