vuejs / eslint-config-typescript

ESLint configuration for Vue 3 + TypeScript projects
MIT License
128 stars 30 forks source link

Error: Plugin "@typescript-eslint" was conflicted between ".eslintrc.js » plugin:@typescript-eslint/recommended-type-checked » ./configs/base" and ".eslintrc.js » @vue/eslint-config-typescriptBug: <short description of the issue> #63

Open laterdayi opened 1 year ago

laterdayi commented 1 year ago
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
  root: true,
  env: {
    node: true,
    es6: true
  },
  parser: 'vue-eslint-parser',
  plugins: ['standard-recommended'],
  extends: [
    'eslint:recommended',
    'plugin:vue/vue3-essential',
    'plugin:vue/vue3-strongly-recommended',
    'plugin:vue/vue3-recommended',
    '@vue/eslint-config-typescript',
    '@vue/eslint-config-prettier/skip-formatting',
    'plugin:@typescript-eslint/recommended-type-checked',
    // unplugin-auto-import
    './.eslintrc-auto-import.json'
  ],
  parserOptions: {
    project: true,
    tsconfigRootDir: __dirname,
    parser: '@typescript-eslint/parser',
    sourceType: 'module',
    ecmaVersion: 'latest',
    ecmaFeatures: {
      jsx: true
    }
  },
  noInlineConfig: true,
  reportUnusedDisableDirectives: true,
  // ignore 
  ignorePatterns: [
    '*.sh',
    'node_modules',
    '*.md',
    '*.woff',
    '*.ttf',
    '.vscode',
    '.idea',
    'dist',
    '/docs',
    '.husky',
    '.github'
  ],
};
{
  "extends": "@vue/tsconfig/tsconfig.dom.json",
  "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "auto-imports.d.ts", "components.d.ts"],
  "compilerOptions": {
    "ignoreDeprecations": "5.0",
    "jsx": "preserve",
    "baseUrl": ".",
    "moduleResolution": "bundler",
    "paths": {
      "@unocss/preset-icons/browser": ["./node_modules/@unocss/preset-icons/dist/browser"],
      "@/*": ["./src/*"],
      "@c/*": ["./src/components/*"],
      "@v/*": ["./src/views/*"]
    },
    "lib": ["ESNext", "DOM"],
    "types": ["vite/client", "naive-ui/volar"]
  }
}

![Uploading 图片.png…]()