Skip to content

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

Open
@freakzlike

Description

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)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions