+
Skip to content

Conversation

jakeleventhal
Copy link
Contributor

Summary

Implements https://typescript-eslint.io/rules/consistent-type-definitions/

This resolves #7036

Test Plan

Unit tests

Docs

Copy link

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: 30f7b5c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

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

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Jul 28, 2025
Copy link
Contributor

@dyc3 dyc3 left a 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

Copy link
Member

@ematipico ematipico left a 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

@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch from c245a51 to 1b82785 Compare July 28, 2025 17:06
@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch from 1b82785 to 5b74c79 Compare July 28, 2025 17:06
@jakeleventhal
Copy link
Contributor Author

@dyc3 @ematipico @siketyan addressed all and rebased

@dyc3 dyc3 changed the title Added rule for @typescript-eslint/consistent-type-definitions feat(analyze/js): added rule for @typescript-eslint/consistent-type-definitions Jul 28, 2025
@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch from 91d6d42 to e4a69ef Compare July 28, 2025 18:56
Copy link
Contributor

@dyc3 dyc3 left a 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.

@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch 2 times, most recently from 12a9436 to d15c802 Compare July 29, 2025 14:36
@jakeleventhal jakeleventhal requested a review from dyc3 July 29, 2025 14:53
Copy link

codspeed-hq bot commented Jul 29, 2025

CodSpeed Performance Report

Merging #7053 will not alter performance

Comparing jakeleventhal:typescript-eslint-consistent-type-definitions (6d2dc2b) with main (bb91a11)

Summary

✅ 128 untouched benchmarks

Copy link
Contributor

@dyc3 dyc3 left a 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

@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch from f905e2a to de01e72 Compare July 29, 2025 16:02
@github-actions github-actions bot added the A-CLI Area: CLI label Jul 29, 2025
@jakeleventhal jakeleventhal force-pushed the typescript-eslint-consistent-type-definitions branch from de01e72 to 99aec20 Compare July 30, 2025 15:10
@jakeleventhal jakeleventhal requested a review from dyc3 July 30, 2025 15:30
Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@ematipico ematipico left a 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

@jakeleventhal jakeleventhal requested a review from ematipico August 1, 2025 11:09
@ematipico
Copy link
Member

@jakeleventhal

We should add tests of code with comments around the members and the curly brackets

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

@jakeleventhal
Copy link
Contributor Author

@ematipico I see what you mean. In any case, addressed

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 🫡

@arendjr arendjr merged commit 655049e into biomejs:main Aug 5, 2025
2 checks passed
@github-actions github-actions bot mentioned this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载