@2030/eslint-config-react
v0.0.8
Published
## :fire:风格说明
Downloads
15
Readme
:sparkles:@2030/eslint-config-react
:fire:风格说明
- 强制使用单引号,分号
- 自动修复eslint问题并格式化
- 支持TypeScript, Vue, React(推荐使用@2030/eslint-config)
- 类型检查同时支持json, yaml, markdown
- import导入排序
- 单行配置,迅速接入
:bulb:使用说明
1. 安装
pnpm add -D @2030/eslint-config-react
2. 配置 .eslintrc
{
"extends": "@2030/eslint-config-react"
}
无需配置
.eslintignore
,除非内置的忽略文件配置不满足
3. 添加脚本至 package.json
代码示例:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
4. VS Code 编辑器自动修复配置
创建 .vscode/settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
:key:License
MIT License © 2022 ZiJun