-
-
Notifications
You must be signed in to change notification settings - Fork 448
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): implement @typescript-eslint/triple-slash-reference #1903
Conversation
CodSpeed Performance ReportMerging #1903 will not alter performanceComparing Summary
|
1ffef56
to
2902278
Compare
crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs
Outdated
Show resolved
Hide resolved
I think we can do this, given TSImportEqualsDeclaration and ImportDeclaration only appear at top level:
For getting comments, use the range API from |
@Boshen Also, it made me realize that I don't need to iterate all comments since Triple-slash directives are only valid at the top of their containing file. |
25afca3
to
fa7bbb2
Compare
fa7bbb2
to
a1131b1
Compare
@Boshen
I am not sure why performance regression is happening 🤔 |
crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs
Outdated
Show resolved
Hide resolved
…c-project#1903) implement @typescript-eslint/triple-slash-reference Related issue: oxc-project#503 original - doc: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md - code: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/triple-slash-reference.ts
implement @typescript-eslint/triple-slash-reference
Related issue: #503
original