Ai
1 Star 0 Fork 0

火力少年/vue3_backend-manage_project

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.eslintrc.cjs 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true
},
/*指定如何解析语法*/
parser: "vue-eslint-parser",
/*优先级低于parse的语法配置器*/
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: "@typescript-eslint/parser",
jsxPragma: "React",
ecmaFeatures: {
jsx: true,
},
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-essential",
"plugin:prettier/recommended"
],
plugins: [
"@typescript-eslint",
"vue"
],
/*
off或0,关闭规则
warn或1,打开的规则作为警告,不影响代码执行
error或2,规则作为一个错误,代码不能执行,界面报错
*/
rules: {
//eslint
"no-var": "error", //要求使用let或const,而不是var
"no-multiple-empty-lines": ["warn", { max: 1 }], //不允许多个空行
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-unexpected-multiline": "error", //禁止多余空行
"no-useless-escape": "off", //禁止不必要的转义字符
//typescript
"@typescript-eslint/no-unused-vars": "error", //禁止定义未使用的变量
"@typescript-eslint/prefer-ts-expect-error": "error", //禁止使用@ts-ignore
"@typescript-eslint/no-explicit-any": "off", //禁止使用any类型
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": "off", //禁止使用自定义Typescript模块和命名空间
"@typescript-eslint/semi": "off",
//eslint-plugin-vue
"vue/multi-word-component-names": "off", //要求组件名称始终为"-"连接的单词
"vue/script-setup-uses-vars": "error", //防止<script setup>使用的变量<template>被标记为未使用
"vue/no-mutating-props": "off", //不允许组件prop被改变
"vue/attribute-hyphenation": "off", //对模板中的自定义组件强制执行属性命名样式
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/firepower-boy/vue3_backend-manage_project.git
git@gitee.com:firepower-boy/vue3_backend-manage_project.git
firepower-boy
vue3_backend-manage_project
vue3_backend-manage_project
master

搜索帮助