vuejs / eslint-config-typescript

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

Add recommended-type-checked #68

Open segevfiner opened 10 months ago

segevfiner commented 10 months ago

This can be used like this:

// @ts-check
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');

/** @type {import('eslint').Linter.Config} */
module.exports = {
  root: true,
  extends: [
    'plugin:vue/vue3-recommended',
    'eslint:recommended',
    '@vue/eslint-config-typescript/recommended-type-checked',
    '@vue/eslint-config-prettier',
  ],
  parserOptions: {
    ecmaVersion: 'latest',
    tsconfigRootDir: __dirname,
    project: [
      './tsconfig.app.json',
      './tsconfig.vitest.json',
      './tsconfig.node.json',
      './e2e/tsconfig.json',
    ],
  },
};

And adding typescript-eslint-parser-for-extra-files to devDependencies

See https://github.com/vuejs/vue-eslint-parser/issues/104 & https://github.com/vuejs/eslint-config-typescript/issues/29

cc @ota-meshi

segevfiner commented 7 months ago

@sodatea