feat: support rslint-disable prefix for inline directive comments#570
Conversation
Support `rslint-disable`, `rslint-enable`, `rslint-disable-line`, and `rslint-disable-next-line` comment directives alongside the existing `eslint-*` variants. Both prefixes are fully equivalent and can be mixed freely.
Summary of ChangesHello, 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 enhances Rslint's inline directive capabilities by introducing a new Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for rslint- prefixed inline directives (e.g., rslint-disable, rslint-enable, rslint-disable-line, rslint-disable-next-line) in addition to the existing eslint- prefixes. This change involves refactoring the DisableManager to handle both prefixes, updating the LSP service to generate rslint- directives, and updating documentation and tests across various components. A review comment highlights an issue where the parseRuleNames function in disable_manager.go deviates from ESLint's behavior by not correctly parsing space-separated rule names, which needs to be addressed to maintain alignment with ESLint's semantics.
Deploying rslint with
|
| Latest commit: |
99370ae
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a39c74ec.rslint.pages.dev |
| Branch Preview URL: | https://feat-support-rslint-disable.rslint.pages.dev |
Summary
rslint-disable,rslint-enable,rslint-disable-line, andrslint-disable-next-linecomment directives alongside the existingeslint-*variants. Both prefixes are fully equivalent and can be mixed freely (e.g.rslint-disablepaired witheslint-enable).directivePrefixstruct,directiveKindenum, and extractmatchDirective()function — eliminates all magic numbers and makes the code more extensible.rslint-disablecomments instead ofeslint-disable.Related Links
website/docs/en/guide/inline-directives.mdupdated withrslint-as the primary prefix.Checklist