0.0.1 • Published 4 years ago
@jvbf2e/eslint-config-silk v0.0.1
ESLint 规范
是毛线前端 ESLint 规范,目前支持taro|vue|react
安装
npm install @jvbf2e/eslint-config-silk -D
# OR
yarn add @jvbf2e/eslint-config-silk --dev使用
在你的工程根目录下创建一个.eslintrc.js配置文件
配置如下:
- taro
module.exports = {
extends: ["silk/taro"],
};- vue
module.exports = {
extends: ["silk/vue"],
};- react
module.exports = {
extends: ["silk/react"],
};:::caution
如果项目之前安装过 ESLint 相关的包,建议卸载,避免引入不必要的包。如eslint、eslint-plugin-vue、@babel/eslint-parser、@typescript-eslint/eslint-plugin 、@typescript-eslint/parser、@vue/eslint-config-standard、@vue/eslint-config-typescript、eslint-config-react-app、
eslint-plugin-import等,直接在 package.json 搜索eslint,相关的包全部卸载
:::
规范
0.0.1
4 years ago