0.0.4 • Published 2 months ago

eslint-config-cyber v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

ESLint规范

是商羚前端ESLint规范,目前支持taro|vue|react

安装

npm install eslint-config-selling -D
# OR
yarn add eslint-config-selling --dev

使用

在你的工程根目录下创建一个.eslintrc.js配置文件

配置如下:

  • taro
module.exports = {
  extends: ['selling/taro'],
};
  • vue
module.exports = {
  extends: ['selling/vue'],
};
  • react
module.exports = {
  extends: ['selling/react'],
};

:::caution 如果项目之前安装过ESLint相关的包,建议卸载,避免引入不必要的包。如eslinteslint-plugin-vue@babel/eslint-parser@typescript-eslint/eslint-plugin@typescript-eslint/parser@vue/eslint-config-standard@vue/eslint-config-typescripteslint-config-react-appeslint-plugin-import等,直接在package.json搜索eslint,相关的包全部卸载 :::

规范

ESLint规范