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

Performance difference when using different parserOptions on with-typescript #27

Open
freakzlike opened this issue Nov 25, 2022 · 0 comments

Comments

@freakzlike
Copy link

freakzlike commented Nov 25, 2022

Hi,
I'm migrating one of my projects to a fresh create-vue. I have notice a big performance difference when using @vue/eslint-config-standard-with-typescript and following config changes of parserOptions:

  overrides: [
    {
      files: [
        '**/*.ts',
        '**/*.vue'
      ],
      extends: [
        '@vue/eslint-config-standard-with-typescript'
      ],
      parser: 'vue-eslint-parser',
      parserOptions: {
        tsconfigRootDir: __dirname,
        parser: {
          '<template>': 'espree',
          js: '@typescript-eslint/parser',
          ts: '@typescript-eslint/parser'
        },
        project: ['./tsconfig.json']
      }
    }
  ]

Performance test:

  • With the parserOptions: 47s
  • Without the parserOptions: 98s

My eslint run was twice as fast. Not sure if this is suitable for everyone.

Edit

What could be also interesting Glob pattern in parser's option "project" slows down linting (typescript-eslint/typescript-eslint#2611)

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

No branches or pull requests

1 participant