@binlun/eslint-config-lishi
v1.0.8
Published
前端规范eslint校验规则
Readme
前端规范校验
参考文档
- eslint http://eslint.cn/docs/user-guide/getting-started
- airbnb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base
- eslint-plugin-vue https://eslint.vuejs.org/
- typescript-eslint https://typescript-eslint.io/
使用方法
npm安装
npm i @binlun/eslint-config-lishi// .eslintrc.js
module.exports ={
root: true,
env: {
es6: true,
browser: true,
node: true
},
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
extends: ['@lishi/eslint-config-lishi'],
plugins: ["@typescript-eslint", "vue"],
ignorePatterns: ["node_modules/*", "public/*"],
}编辑器配置详见:https://hu379y.yuque.com/rgrquo/nfn2nw/oztowk
注:默认使用vue3.js,仓库中还有vue2.js和uniapp.js
{
extends: ['@lishi/eslint-config-lishi/vue2.js']
}