@typescript-eslint/member-ordering#468
@typescript-eslint/member-ordering#468ScriptedAlchemy wants to merge 16 commits intoweb-infra-dev:mainfrom
Conversation
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Summary of ChangesHello @ScriptedAlchemy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request ports the @typescript-eslint/member-ordering rule, which is a significant and complex feature. The implementation is extensive and covers the full logic of the original rule. I've identified a logical issue in one of the helper functions that could lead to missed errors. My feedback includes a suggested fix for this issue.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 672b3fc551
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
internal/plugins/typescript/rules/member_ordering/member_ordering.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR ports the @typescript-eslint/member-ordering ESLint rule into the rslint TypeScript plugin, adds a Go test for basic coverage, and enables/updates the corresponding TypeScript snapshot tests to run under the unified member-ordering rule name.
Changes:
- Add a new
member_orderingrule implementation (ordering logic, classification, config parsing) and register it as@typescript-eslint/member-ordering. - Update TypeScript rule-tester suites to run under the
member-orderingrule name and add/update snapshots accordingly. - Enable member-ordering tests in
packages/rslint-test-tools/rstest.config.mtsand add a Go unit test for the rule.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/member-ordering-optionalMembers.test.ts | Runs the suite under member-ordering instead of a custom run name. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/member-ordering-natural-order.test.ts | Runs the suite under member-ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/member-ordering-natural-case-insensitive-order.test.ts | Runs the suite under member-ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/member-ordering-alphabetically-order.test.ts | Runs the suite under member-ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/member-ordering-alphabetically-case-insensitive-order.test.ts | Runs the suite under member-ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/snapshots/member-ordering-optionalMembers.test.ts.snap | Adds snapshots for optionality ordering scenarios. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/snapshots/member-ordering-natural-order.test.ts.snap | Adds snapshots for natural ordering scenarios. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/snapshots/member-ordering-natural-case-insensitive-order.test.ts.snap | Adds snapshots for natural case-insensitive ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/snapshots/member-ordering-alphabetically-order.test.ts.snap | Adds snapshots for alphabetical ordering scenarios. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/member-ordering/snapshots/member-ordering-alphabetically-case-insensitive-order.test.ts.snap | Adds snapshots for alphabetical case-insensitive ordering. |
| packages/rslint-test-tools/tests/typescript-eslint/rules/snapshots/member-ordering.test.ts.snap | Adds the main snapshot set for the ported rule behavior. |
| packages/rslint-test-tools/rstest.config.mts | Enables the member-ordering test suites in the test runner config. |
| internal/plugins/typescript/rules/member_ordering/member_ordering_test.go | Adds a Go-level unit test for the new rule. |
| internal/plugins/typescript/rules/member_ordering/member_ordering.go | Implements the member-ordering rule logic and option parsing. |
| internal/config/config.go | Registers the rule as @typescript-eslint/member-ordering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/plugins/typescript/rules/member_ordering/member_ordering.go
Outdated
Show resolved
Hide resolved
Use a tagged switch to satisfy staticcheck and disable the rule in rslint.json to prevent dogfooding lint errors. Co-authored-by: Cursor <cursoragent@cursor.com>
…ber-ordering-rule-9398 # Conflicts: # rslint.json
…ber-ordering-rule-9398 # Conflicts: # rslint.json
…ber-ordering-rule-9398 # Conflicts: # rslint.json
…ber-ordering-rule-9398
# Conflicts: # rslint.json
Summary
Ports the
@typescript-eslint/member-orderingrule, implementing its full ordering logic, member type classification, and configuration options.Related Links
Checklist
Made with Cursor