1 Star 2 Fork 0

小白菜 / exercise-element-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.eslintrc.js 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
DESKTOP-2AK6UO0\gshio 提交于 2023-08-25 18:00 . feat: 更改规则配置
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended"
],
globals: {
NodeJS: "readonly"
},
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: "latest",
parser: "@typescript-eslint/parser",
tsconfigRootDir: __dirname,
sourceType: "module",
ecmaFeatures: { jsx: true },
extraFileExtensions: [".vue"]
},
settings: {
"import/resolver": {
alias: [["/@/", "./src/"]]
}
},
plugins: ["@typescript-eslint", "vue"],
rules: {
// 'off'关闭规则 'warn'开启警告规则 'error'2 开启错误规则
"no-var": "error", // 要求使用 let 或 const 而不是 var
"no-empty-function": "error",
"prefer-const": "off",
"no-useless-escape": "off",
"no-console": "off",
"no-unused-vars": "off",
"no-use-before-define": "off", // 禁止在 函数/类/变量 定义之前使用它们
"no-multiple-empty-lines": ["error", { max: 1 }], // 不允许多个空行
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-explicit-any": "off", //any类型
"@typescript-eslint/no-unused-vars": "warn", // 禁止定义未使用的变量
"@typescript-eslint/no-non-null-assertion": "off", // 不允许使用后缀运算符的非空断言(!)
// https://eslint.vuejs.org/
"vue/no-v-html": "off", // 禁止使用 v-html
"vue/attributes-order": "off", // vue api使用顺序,强制执行属性顺序
"vue/multi-word-component-names": "off", //多单词命名
"vue/require-default-prop": "off", // 此规则要求为每个 prop 为必填时,必须提供默认值
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/no-deprecated-v-on-native-modifier": "off",
"vue/no-template-key": "off",
"vue/max-attributes-per-line": [
"warn",
{
singleline: 5,
multiline: 1
}
],
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
normal: "never",
component: "always"
},
svg: "always",
math: "always"
}
]
}
};
TypeScript
1
https://gitee.com/pxhgood/exercise-element-admin.git
git@gitee.com:pxhgood/exercise-element-admin.git
pxhgood
exercise-element-admin
exercise-element-admin
master

搜索帮助