0.0.19 • Published 2 years ago

eslint-config-opendtc v0.0.19

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

ESLint规范

是DTC前端ESLint规范,目前支持vue|react

安装

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

使用

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

配置如下:

  • vue
module.exports = {
  extends: ['opendtc/vue'],
};
  • react
module.exports = {
  extends: ['opendtc/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规范