0.0.5 • Published 3 years ago
@jzo/eslint-config-esbing v0.0.5
ESLint 规范
个人前端 ESLint 规范,目前支持vue|react
安装
npm install @jzo/eslint-config-esbing -D
# OR
yarn add @jzo/eslint-config-esbing --dev使用
在你的工程根目录下创建一个.eslintrc.js配置文件
配置如下:
- 基础配置
module.exports = {
extends: ['@jzo/esbing']
}- vue
module.exports = {
extends: ['@jzo/esbing/vue']
}- react
module.exports = {
extends: ['@jzo/esbing/react']
}:::caution
如果项目之前安装过 ESLint 相关的包,建议卸载,避免引入不必要的包。如eslint、eslint-plugin-vue、@babel/eslint-parser、@typescript-eslint/eslint-plugin 、@typescript-eslint/parser、@vue/eslint-config-typescript、eslint-config-react-app、
eslint-plugin-import等,直接在 package.json 搜索eslint,相关的包全部卸载
:::
版本更新
0.0.3 更新react/jsx-curly-spacing 配置
0.0.4 新增prettier