Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommended-type-checked #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

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