+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyze): Improve generated suppression text #3924

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

MichaReiser
Copy link
Contributor

The suppression code action used to insert a suppression comment with the reason suppressed. The issue with suppressed is that users might think that this is the exact syntax necessary for suppression comments rather than it being a placeholder for the reason why the rule is suppressed.

This PR changes the inserted suppression:

//·rome-ignore·lint/a11y/useKeyWithClickEvents:·<explanation>

which hopefully makes it clear to users that they should replace <explanation> with a reason.

A more involved solution could select the <explanation> after adding the suppression comment.

Test Plan

See updated snapshots

The suppression code action used to insert a suppression comment with the *reason* `suppressed`. The issue with `suppressed` is that users might think that this is the exact syntax necessary for suppression comments rather than it being a placeholder for the reason why the rule is suppressed.

This PR changes the inserted suppression:

```
//·rome-ignore·lint/a11y/useKeyWithClickEvents:·<explanation>

```

which hopefully makes it clear to users that they should replace `<explanation>` with a reason.

A more involved solution could select the `<explanation>` after adding the suppression comment.

## Test Plan

See updated snapshots
@netlify
Copy link

netlify bot commented Dec 2, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 7a5961e
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/638a1205f9b483000833508e

@MichaReiser MichaReiser added the I-Easy Implementation: easy task, usually a good fit for new contributors label Dec 2, 2022
@MichaReiser MichaReiser merged commit 5248e2b into main Dec 2, 2022
@MichaReiser MichaReiser deleted the feat/suppression-text branch December 2, 2022 15:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I-Easy Implementation: easy task, usually a good fit for new contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载