123456789101112131415161718192021222324252627282930313233343536373839 |
- module.exports = {
- root: true,
- env: {
- node: true
- },
- extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/typescript/recommended", "plugin:prettier/recommended"],
- parserOptions: {
- ecmaVersion: 2020
- },
- //配置
- rules: {
- // "prettier/prettier": "error",
- "prettier/prettier": ["error", { endOfLine: "auto" }],
- "no-debugger": process.env.NODE_ENV == "production" ? 2 : 1,
- "no-unreachable": process.env.NODE_ENV == "production" ? 2 : 1, //return 警告不报错
- "no-undef": "off", // 没有声明的变量
- "vue/no-v-html": "off",
- "no-irregular-whitespace": "off",
- "vue/html-self-closing": [
- "error",
- {
- html: {
- void: "always",
- normal: "never",
- component: "always"
- },
- svg: "always",
- math: "always"
- }
- ],
- "vue/multi-word-component-names": "off", // 关闭驼峰命名
- /* ts相关 */
- "@typescript-eslint/no-empty-function": "off", // 可以为空函数
- "@typescript-eslint/explicit-module-boundary-types": "off", //函数不需要返回类型也可以
- "@typescript-eslint/no-explicit-any": "off", //可以为any
- "@typescript-eslint/no-non-null-assertion": "off", //! 非空断言
- "@typescript-eslint/no-this-alias": "off" //忽略this关键字
- }
- }
|