-
-
Notifications
You must be signed in to change notification settings - Fork 714
feat(analyze/js): added rule for @typescript-eslint/consistent-type-definitions
#7053
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(analyze/js): added rule for @typescript-eslint/consistent-type-definitions
#7053
Conversation
🦋 Changeset detectedLatest commit: 30f7b5c The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case you missed it, there's a separate CONTRIBUTING doc specifically for the analyzer: https://github.com/biomejs/biome/blob/main/crates/biome_analyze/CONTRIBUTING.md
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must run cargo test
, review the snapshots and accept them. https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#testing
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs
Outdated
Show resolved
Hide resolved
c245a51
to
1b82785
Compare
1b82785
to
5b74c79
Compare
@dyc3 @ematipico @siketyan addressed all and rebased |
@typescript-eslint/consistent-type-definitions
@typescript-eslint/consistent-type-definitions
91d6d42
to
e4a69ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note the CI failures. It doesn't build.
12a9436
to
d15c802
Compare
CodSpeed Performance ReportMerging #7053 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to run just gen-all
to get all the other things updated
Then accept the snapshots and commit them.
cargo test -p biome_js_analyze
cargo insta accept
crates/biome_js_analyze/tests/specs/nursery/useConsistentTypeDefinitions/invalid.ts
Show resolved
Hide resolved
f905e2a
to
de01e72
Compare
de01e72
to
99aec20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…pt-eslint-consistent-type-definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix the docs of options, and we should add more tests. We should add tests of code with comments around the members and the curly brackets
crates/biome_js_analyze/src/lint/nursery/use_consistent_type_definitions.rs
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_consistent_type_definitions.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
…pt-eslint-consistent-type-definitions
This hasn't been addressed. Here's an example interface/**/ Foo /**/ {/**/
/**/lorem:/**/ boolean/**/
/**/} Essentially, we want to test that we don't lose trivia when doing the action. If you want, we can address this in another. Just let us know |
@ematipico I see what you mean. In any case, addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 🫡
Summary
Implements https://typescript-eslint.io/rules/consistent-type-definitions/
This resolves #7036
Test Plan
Unit tests
Docs