Skip to content

fix: eslint-plugin-import rules url#284

Merged
hardfist merged 1 commit intomainfrom
fix/import-plugin-url
Aug 17, 2025
Merged

fix: eslint-plugin-import rules url#284
hardfist merged 1 commit intomainfrom
fix/import-plugin-url

Conversation

@zoolsher
Copy link
Copy Markdown
Member

@zoolsher zoolsher commented Aug 16, 2025

This pull request improves the way rule documentation links are generated and used in the RuleStates component, making the code more maintainable and extensible. The main focus is on centralizing the logic for building rule URLs and ensuring the correct links are used throughout the UI.

Rule documentation link improvements:

  • Added a new getRuleUrl function to generate rule documentation URLs based on the rule's group, supporting both @typescript-eslint/eslint-plugin and eslint-plugin-import rules.
  • Updated the rule documentation button to use the new getRuleUrl function, ensuring the correct URL is opened for each rule.

UI consistency:

  • Simplified the CSS classes for the failing case button by removing redundant class names, improving code clarity.

Copilot AI review requested due to automatic review settings August 16, 2025 17:09
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 16, 2025

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit bcc277a
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68a0bb4a5544a2000823b9e1
😎 Deploy Preview https://deploy-preview-284--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes URL generation for ESLint plugin rules by adding proper handling for different rule sources. Previously, the code assumed all rules belonged to @typescript-eslint, but now it correctly generates URLs for both @typescript-eslint and eslint-plugin-import rules.

Key Changes

  • Added a getRuleUrl function that generates appropriate URLs based on the rule's group
  • Updated the rule link to use the new URL generation function
  • Minor CSS class adjustment removing items-start from a button

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@zoolsher zoolsher requested a review from hardfist August 16, 2025 17:11
@hardfist hardfist merged commit 7de754a into main Aug 17, 2025
12 checks passed
@hardfist hardfist deleted the fix/import-plugin-url branch August 17, 2025 07:52
ScriptedAlchemy pushed a commit to ScriptedAlchemy/rslint that referenced this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants