Conversation
This commit enables the ban-ts-comment rule test in the rslint test suite. The rule implementation already exists in internal/plugins/typescript/rules/ban_ts_comment/ and all Go tests pass successfully. Changes: - Enable ban-ts-comment.test.ts in rstest.config.mts The ban-ts-comment rule enforces restrictions on TypeScript directive comments (@ts-ignore, @ts-expect-error, @ts-check, @ts-nocheck) and supports: - Banning directives completely - Requiring descriptions with minimum length - Custom description format validation via regex - Proper Unicode character handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
✅ Deploy Preview for rslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🤖 This pull request has been linked to DevBird Task #2607 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 PromptObjectiveImplement the Documentation & Resources
Rule DescriptionThis rule disallows @ts- comments or requires descriptions after directive. TypeScript provides several directive comments that can be used to alter how the compiler treats the code. Using these comments to suppress TypeScript compiler errors reduces the effectiveness of TypeScript overall. ScopeCreate a complete implementation of the
Technical Requirements
Implementation Patternpackage ban_ts_comment
import (
"github.com/microsoft/typescript-go/shim/ast"
"github.com/web-infra-dev/rslint/internal/rule"
)
var BanTsCommentRule = rule.Rule{
Name: "ban-ts-comment",
Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
// Implementation here
return rule.RuleListeners{
// AST node listeners
}
},
}Test Requirements
Success Criteria
This comment was automatically added by DevBird. You can disable this feature in DevBird Settings. |
|
AI will fix the CI (until it passes) |
Summary
Implementation Details
The
ban-ts-commentrule from typescript-eslint has been fully implemented in Go at:internal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment.gointernal/plugins/typescript/rules/ban_ts_comment/ban_ts_comment_test.goThe rule is already registered in the plugin system and all Go tests pass successfully.
Rule Features
The ban-ts-comment rule disallows @ts- comments or requires descriptions after directive:
Test Coverage
✅ All 44 test cases pass (25 valid, 19 invalid):
Test Results
Changes Made
'./tests/typescript-eslint/rules/ban-ts-comment.test.ts'inpackages/rslint-test-tools/rstest.config.mts(line 35)🤖 Generated with Claude Code