-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
feat(linter): add parserOptions.emitDecoratorMetadata
and parserOptions.experimentalDecorators
for config file
#3645
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @mysteryven and the rest of your teammates on Graphite |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
CodSpeed Performance ReportMerging #3645 will not alter performanceComparing Summary
|
…tions.experimentalDecorators` for config file
12f1ad9
to
fd30f6f
Compare
…rts` (#3895) This PR only contains the part about report error, adding the fixer part will make the whole PR difficult to review at one time. There are also some commented cases. One kind of them is `decorator`, as it blocked by #3645, another kind of them is type reference, need to solve #3799 first. I added TODO flags for them.
@mysteryven it looks like we've gotten consistent-type-imports shipped, do we still need this PR? |
Unfortunately, this issue still exists: https://typescript-eslint.io/blog/changes-to-consistent-type-imports-with-decorators/#consistent-type-imports-caused-runtime-breakage, there are some cases are commented out temporarily. Add Maybe the |
Need a better way. |
These two options are needed in
consistent-type-import
.At first, I think
parserOptions
is not useful for us, and want to hard-codeexperimentalDecorators
andemitDecoratorMetadata
tofalse
directly. But I changed the thought after reading:We don't have type-aware linting for now, and require these two options to decide how we perform: if we have both
experimentalDecorators: true
andemitDecoratorMetadata: true
, then it will not report any errors within any files that contain decorators.https://github.com/typescript-eslint/typescript-eslint/blob/e408b93e48e5199d83a8d99d1e27126d2dd8bc8f/packages/eslint-plugin/src/rules/consistent-type-imports.ts#L303-L336