Skip to content

Conversation

segevfiner
Copy link

@segevfiner segevfiner commented Jan 29, 2024

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 vuejs/vue-eslint-parser#104 & #29

cc @ota-meshi

@segevfiner
Copy link
Author

@sodatea

parser: require.resolve('vue-eslint-parser'),

parserOptions: {
parser: require('typescript-eslint-parser-for-extra-files')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@segevfiner Curiously, what problems were you running into that required this dependency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rules that use type checking see the linked issues in the PR description.

@segevfiner segevfiner closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants