| 12345678910111213141516171819202122232425262728293031323334 |
- /* eslint-env node */
- require("@rushstack/eslint-patch/modern-module-resolution")
- module.exports = {
- root: true,
- extends: [
- "plugin:vue/vue3-essential",
- "eslint:recommended",
- "@vue/eslint-config-typescript",
- "@vue/eslint-config-prettier",
- "@vue/typescript/recommended",
- "plugin:prettier/recommended",
- ],
- parserOptions: {
- ecmaVersion: 2020,
- },
- rules: {
- indent: ["off", 2],
- "@typescript-eslint/no-var-requires": "off",
- "@typescript-eslint/no-explicit-any": ["off"],
- // 关闭名称校验
- "vue/multi-word-component-names": "off",
- "no-unused-vars": "off",
- "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
- "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
- "@typescript-eslint/no-this-alias": [
- "error",
- {
- allowDestructuring: false, // Disallow `const { props, state } = this`; true by default
- allowedNames: ["that"], // Allow `const self = this`; `[]` by default
- },
- ],
- },
- }
|