-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Verify no-require-imports rule implementation #93
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
The no-require-imports rule was already enabled in the recent commit b730f80. This commit verifies that: - The test is enabled in rstest.config.mts - All Go tests pass (46/46 tests passing) - No regression in other tests The implementation correctly handles: - Basic require() calls - Optional chaining require?.() - import = require() syntax - allow patterns for specific imports - allowAsImport option for TypeScript imports - Local require variable shadowing - createRequire from 'module' package 🤖 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 #1228 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 PromptObjectiveEnable the TypeScript-ESLint no-require-imports test in rstest.config.mts and fix any errors in the Go implementation. ContextThis is a Go-based linter (rslint) that implements TypeScript-ESLint rules. The no-require-imports rule disallows require() calls. Documentation & Resources
Task Requirements
Success Criteria
This comment was automatically added by DevBird. You can disable this feature in DevBird Settings. |
Code Review: PR #93 - Verify no-require-imports Rule ImplementationOverviewThis PR serves as a verification commit confirming that the ✅ Strengths1. Excellent Test Coverage
2. Robust Implementation (
|
Summary
This PR verifies that the
no-require-importsTypeScript-ESLint rule is properly enabled and working correctly in rslint.Status
The
no-require-importsrule was already implemented and enabled in commit b730f80. This PR serves as verification that:packages/rslint-test-tools/rstest.config.mts(line 26)Implementation Details
The Go implementation at
internal/plugins/typescript/rules/no_require_imports/no_require_imports.gocorrectly handles:require()callsrequire?.()syntaximport = require()syntaxpackage.json)import = require()when enabledrequireis locally definedcreateRequirefrom the 'module' packageTest Results
All 46 test cases (24 valid + 22 invalid) pass successfully.
Test Plan
🤖 Generated with Claude Code