@jzo/eslint-config-esbing

0.0.5 • Public • Published

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 相关的包,建议卸载,避免引入不必要的包。如eslinteslint-plugin-vue@babel/eslint-parser@typescript-eslint/eslint-plugin@typescript-eslint/parser@vue/eslint-config-typescripteslint-config-react-appeslint-plugin-import等,直接在 package.json 搜索eslint,相关的包全部卸载 :::

版本更新

0.0.3 更新react/jsx-curly-spacing 配置
0.0.4 新增prettier

Package Sidebar

Install

npm i @jzo/eslint-config-esbing

Weekly Downloads

2

Version

0.0.5

License

ISC

Unpacked Size

74.9 kB

Total Files

12

Last publish

Collaborators

  • jws132