eslint-config-opendtc

0.0.19 • Public • Published

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规范

Package Sidebar

Install

npm i eslint-config-opendtc

Weekly Downloads

0

Version

0.0.19

License

ISC

Unpacked Size

74.2 kB

Total Files

14

Last publish

Collaborators

  • chenglin.yu