12345678910111213141516171819202122232425262728293031 |
- /*
- * @Author: PoJun
- * @Date: 2023-08-09 16:38:18
- * @LastEditors: PoJun
- * @LastEditTime: 2023-08-15 13:47:39
- * @Message: Nothing
- */
- module.exports = {
- root: true,
- env: {
- node: true,
- },
- extends: ["plugin:vue/essential", "eslint:recommended"],
- parserOptions: {
- parser: "babel-eslint",
- },
- rules: {
- "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
- "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
- "no-alert": 0, //禁止使用alert confirm prompt
- "no-empty": 2, //块语句中的内容不能为空
- "no-nested-ternary": 0, //禁止使用嵌套的三目运算
- "no-redeclare": 2, //禁止重复声明变量
- "no-spaced-func": 2, //函数调用时 函数名与()之间不能有空格
- "no-unreachable": 2, //不能有无法执行的代码
- "no-unused-vars": [2, { vars: "all", args: "after-used" }], //不能有声明后未被使用的变量或参数
- "no-var": "error", //禁用var,用let和const代替
- semi: [2, "always"], //语句强制分号结尾
- },
- };
|