-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add {tokens: true} to parsers #8017
Copy link
Copy link
Closed
Labels
locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.type:refactorIssues about tackling technical debtIssues about tackling technical debt
Metadata
Metadata
Assignees
Labels
locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.type:refactorIssues about tackling technical debtIssues about tackling technical debt
Both
@typescript-eslint/typescript-estree@babel/parserflow-parsersupports{tokens: true}.I think with token info we can make some improvements (maybe comments print).
Example:
prettier/src/language-js/printer-estree.js
Lines 1083 to 1087 in aeeb2ff
I think we don't have to check source code, instead we can check tokens between.