-
-
Notifications
You must be signed in to change notification settings - Fork 0
Enable test for ban-ts-comment rule #149
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
Conversation
Uncommented the test file for the ban-ts-comment rule in rstest.config.mts to enable testing of the TypeScript-ESLint ban-ts-comment rule implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 This pull request has been linked to DevBird Task #1531 View the task details and manage the automated development workflow in DevBird. Learn more about DevBird here or the announcement blog post here. |
📋 DevBird Task PromptEnable the test for the ObjectiveUncomment the test file Documentation & Resources
Implementation Steps
Critical RequirementIf CI fails with test errors, you MUST implement the ban-ts-comment rule from scratch following these guidelines:
Success Criteria
TestingRun tests and verify they pass before committing. This comment was automatically added by DevBird. You can disable this feature in DevBird Settings. |
Pull Request Review - PR #149: Enable test for ban-ts-comment ruleSummaryThis PR enables testing for the Code Quality: ✅ ExcellentPositives:
Observations:
Implementation Review: ✅ StrongAfter reviewing the Go implementation at Strengths:
Minor Observations:
Test Coverage: ✅ ExcellentThe test file being enabled (
The Go test file ( Potential Issues:
|
Pull Request ReviewSummaryThis PR enables the test suite for the Code Quality & Best Practices ✅
Potential Issues & Considerations1. Test Implementation Verification
|
## Summary - Uncommented the test file for the `ban-tslint-comment` rule in `rstest.config.mts` to enable testing - Implemented the ban-tslint-comment rule in Go - Registered the rule in the configuration ## Context This PR is a follow-up to #149 which enabled the `ban-ts-comment` rule. This PR enables the `ban-tslint-comment` rule which helps enforce migration from deprecated TSLint to ESLint. ## Changes 1. **Test Configuration** (rstest.config.mts:36) - Uncommented the line enabling the ban-tslint-comment test file 2. **Implementation** (internal/plugins/typescript/rules/ban_tslint_comment/ban_tslint_comment.go) - Created new Go implementation for the ban-tslint-comment rule - Detects `tslint:disable` and `tslint:enable` comments in both single-line (`//`) and multi-line (`/* */`) formats - Provides automatic fixes that remove tslint comments - Handles various comment positions (standalone lines and inline comments) - Reports errors with messageId 'commentDetected' and appropriate description 3. **Registration** (internal/config/config.go) - Added import for the ban_tslint_comment package - Registered the rule as `@typescript-eslint/ban-tslint-comment` ## Implementation Details The rule implementation: - Scans source text for tslint comment patterns - Matches comments starting with `tslint:disable` or `tslint:enable` - Creates fixes that intelligently remove comments: - For standalone comment lines: removes the entire line including newline - For inline comments (e.g., `someCode(); // tslint:disable-line`): removes just the comment - Follows the pattern established by the ban-ts-comment rule ## Test Plan - [x] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail in CI ## TypeScript-ESLint Reference The implementation follows the behavior of the TypeScript-ESLint ban-tslint-comment rule: https://typescript-eslint.io/rules/ban-tslint-comment/ TSLint was deprecated in favor of ESLint, and this rule helps enforce the migration by detecting and removing TSLint directive comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
## Summary - Uncommented the test file for the `ban-ts-comment` rule in `rstest.config.mts` to enable testing of the TypeScript-ESLint ban-ts-comment rule implementation ## Context This PR enables the test for the `ban-ts-comment` rule as requested. The test file was previously commented out in the test configuration. ## Changes - Uncommented line 35 in `/home/runner/work/rslint/rslint/packages/rslint-test-tools/rstest.config.mts` - This enables the test suite at `./tests/typescript-eslint/rules/ban-ts-comment.test.ts` ## Test Plan - [ ] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail ## Implementation Notes The Go implementation is located at `/home/runner/work/rslint/rslint/internal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment.go`. If tests fail in CI, the implementation may need adjustments to match the TypeScript-ESLint reference behavior at https://typescript-eslint.io/rules/ban-ts-comment/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Donny/강동윤 <kdy.1997.dev@gmail.com>
## Summary - Uncommented the test file for the `ban-tslint-comment` rule in `rstest.config.mts` to enable testing - Implemented the ban-tslint-comment rule in Go - Registered the rule in the configuration ## Context This PR is a follow-up to #149 which enabled the `ban-ts-comment` rule. This PR enables the `ban-tslint-comment` rule which helps enforce migration from deprecated TSLint to ESLint. ## Changes 1. **Test Configuration** (rstest.config.mts:36) - Uncommented the line enabling the ban-tslint-comment test file 2. **Implementation** (internal/plugins/typescript/rules/ban_tslint_comment/ban_tslint_comment.go) - Created new Go implementation for the ban-tslint-comment rule - Detects `tslint:disable` and `tslint:enable` comments in both single-line (`//`) and multi-line (`/* */`) formats - Provides automatic fixes that remove tslint comments - Handles various comment positions (standalone lines and inline comments) - Reports errors with messageId 'commentDetected' and appropriate description 3. **Registration** (internal/config/config.go) - Added import for the ban_tslint_comment package - Registered the rule as `@typescript-eslint/ban-tslint-comment` ## Implementation Details The rule implementation: - Scans source text for tslint comment patterns - Matches comments starting with `tslint:disable` or `tslint:enable` - Creates fixes that intelligently remove comments: - For standalone comment lines: removes the entire line including newline - For inline comments (e.g., `someCode(); // tslint:disable-line`): removes just the comment - Follows the pattern established by the ban-ts-comment rule ## Test Plan - [x] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail in CI ## TypeScript-ESLint Reference The implementation follows the behavior of the TypeScript-ESLint ban-tslint-comment rule: https://typescript-eslint.io/rules/ban-tslint-comment/ TSLint was deprecated in favor of ESLint, and this rule helps enforce the migration by detecting and removing TSLint directive comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
## Summary - Uncommented the test file for the `ban-ts-comment` rule in `rstest.config.mts` to enable testing of the TypeScript-ESLint ban-ts-comment rule implementation ## Context This PR enables the test for the `ban-ts-comment` rule as requested. The test file was previously commented out in the test configuration. ## Changes - Uncommented line 35 in `/home/runner/work/rslint/rslint/packages/rslint-test-tools/rstest.config.mts` - This enables the test suite at `./tests/typescript-eslint/rules/ban-ts-comment.test.ts` ## Test Plan - [ ] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail ## Implementation Notes The Go implementation is located at `/home/runner/work/rslint/rslint/internal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment.go`. If tests fail in CI, the implementation may need adjustments to match the TypeScript-ESLint reference behavior at https://typescript-eslint.io/rules/ban-ts-comment/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Donny/강동윤 <kdy.1997.dev@gmail.com>
## Summary - Uncommented the test file for the `ban-tslint-comment` rule in `rstest.config.mts` to enable testing - Implemented the ban-tslint-comment rule in Go - Registered the rule in the configuration ## Context This PR is a follow-up to #149 which enabled the `ban-ts-comment` rule. This PR enables the `ban-tslint-comment` rule which helps enforce migration from deprecated TSLint to ESLint. ## Changes 1. **Test Configuration** (rstest.config.mts:36) - Uncommented the line enabling the ban-tslint-comment test file 2. **Implementation** (internal/plugins/typescript/rules/ban_tslint_comment/ban_tslint_comment.go) - Created new Go implementation for the ban-tslint-comment rule - Detects `tslint:disable` and `tslint:enable` comments in both single-line (`//`) and multi-line (`/* */`) formats - Provides automatic fixes that remove tslint comments - Handles various comment positions (standalone lines and inline comments) - Reports errors with messageId 'commentDetected' and appropriate description 3. **Registration** (internal/config/config.go) - Added import for the ban_tslint_comment package - Registered the rule as `@typescript-eslint/ban-tslint-comment` ## Implementation Details The rule implementation: - Scans source text for tslint comment patterns - Matches comments starting with `tslint:disable` or `tslint:enable` - Creates fixes that intelligently remove comments: - For standalone comment lines: removes the entire line including newline - For inline comments (e.g., `someCode(); // tslint:disable-line`): removes just the comment - Follows the pattern established by the ban-ts-comment rule ## Test Plan - [x] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail in CI ## TypeScript-ESLint Reference The implementation follows the behavior of the TypeScript-ESLint ban-tslint-comment rule: https://typescript-eslint.io/rules/ban-tslint-comment/ TSLint was deprecated in favor of ESLint, and this rule helps enforce the migration by detecting and removing TSLint directive comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
## Summary - Uncommented the test file for the `ban-ts-comment` rule in `rstest.config.mts` to enable testing of the TypeScript-ESLint ban-ts-comment rule implementation ## Context This PR enables the test for the `ban-ts-comment` rule as requested. The test file was previously commented out in the test configuration. ## Changes - Uncommented line 35 in `/home/runner/work/rslint/rslint/packages/rslint-test-tools/rstest.config.mts` - This enables the test suite at `./tests/typescript-eslint/rules/ban-ts-comment.test.ts` ## Test Plan - [ ] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail ## Implementation Notes The Go implementation is located at `/home/runner/work/rslint/rslint/internal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment.go`. If tests fail in CI, the implementation may need adjustments to match the TypeScript-ESLint reference behavior at https://typescript-eslint.io/rules/ban-ts-comment/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Donny/강동윤 <kdy.1997.dev@gmail.com>
## Summary - Uncommented the test file for the `ban-tslint-comment` rule in `rstest.config.mts` to enable testing - Implemented the ban-tslint-comment rule in Go - Registered the rule in the configuration ## Context This PR is a follow-up to #149 which enabled the `ban-ts-comment` rule. This PR enables the `ban-tslint-comment` rule which helps enforce migration from deprecated TSLint to ESLint. ## Changes 1. **Test Configuration** (rstest.config.mts:36) - Uncommented the line enabling the ban-tslint-comment test file 2. **Implementation** (internal/plugins/typescript/rules/ban_tslint_comment/ban_tslint_comment.go) - Created new Go implementation for the ban-tslint-comment rule - Detects `tslint:disable` and `tslint:enable` comments in both single-line (`//`) and multi-line (`/* */`) formats - Provides automatic fixes that remove tslint comments - Handles various comment positions (standalone lines and inline comments) - Reports errors with messageId 'commentDetected' and appropriate description 3. **Registration** (internal/config/config.go) - Added import for the ban_tslint_comment package - Registered the rule as `@typescript-eslint/ban-tslint-comment` ## Implementation Details The rule implementation: - Scans source text for tslint comment patterns - Matches comments starting with `tslint:disable` or `tslint:enable` - Creates fixes that intelligently remove comments: - For standalone comment lines: removes the entire line including newline - For inline comments (e.g., `someCode(); // tslint:disable-line`): removes just the comment - Follows the pattern established by the ban-ts-comment rule ## Test Plan - [x] Run `npm test` to verify all tests pass - [ ] Check CI pipeline for any failures - [ ] Fix any implementation issues if tests fail in CI ## TypeScript-ESLint Reference The implementation follows the behavior of the TypeScript-ESLint ban-tslint-comment rule: https://typescript-eslint.io/rules/ban-tslint-comment/ TSLint was deprecated in favor of ESLint, and this rule helps enforce the migration by detecting and removing TSLint directive comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Summary
ban-ts-commentrule inrstest.config.mtsto enable testing of the TypeScript-ESLint ban-ts-comment rule implementationContext
This PR enables the test for the
ban-ts-commentrule as requested. The test file was previously commented out in the test configuration.Changes
/home/runner/work/rslint/rslint/packages/rslint-test-tools/rstest.config.mts./tests/typescript-eslint/rules/ban-ts-comment.test.tsTest Plan
npm testto verify all tests passImplementation Notes
The Go implementation is located at
/home/runner/work/rslint/rslint/internal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment.go. If tests fail in CI, the implementation may need adjustments to match the TypeScript-ESLint reference behavior at https://typescript-eslint.io/rules/ban-ts-comment/.🤖 Generated with Claude Code