Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add fragment options to lint code fragment for Vue SFC performance #1180

Closed
@yoyo930021

Description

@yoyo930021

I think a solution for Vue SFC performance.

Solution

change

typescript-eslint/typescript-eslint project

  1. add fragment boolean option in @typescript-eslint/parser.
  2. if fragment === true use createIsolatedProgram in @typescript-eslint/typescript-estree.

vue-eslint-parser project

  1. if parse ScriptFragment, add fragment options to parserOptions.

Test result

I have 109 TypeScript files and 119 Vue SFC files in this tested project.

@typescript-eslint 2.6.0 && vue-eslint-parser 6.0.4:
real 261.93
user 306.04
sys 5.10

This Solution:
real 13.04
user 20.26
sys 1.27

Test code project

yoyo930021/typescript-eslint #commit
yoyo930021/vue-eslint-parser #commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partyquestionQuestions! (i.e. not a bug / enhancment / documentation)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions