Skip to content
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

Document which rules provide suggestions and improve consistency of rule autofixer notices #3359

Merged
merged 1 commit into from Aug 19, 2022

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Aug 18, 2022

This is a documentation PR touching two areas.

Suggestions

The lightbulb 💡 emoji is the convention for denoting rules that provide editor suggestions. It's used by the official ESLint website as well as in the documentation of many popular ESLint plugins. Examples (note: I am a maintainer on some of these plugins and have been working to standardize the lists of rules):

My change adds this indicator to the README and as a notice in rule documentation files.

Currently, only one of our rules is auto-suggestable, but this change will help improve discovery of the relatively-new auto-suggestion feature, especially as more rules implement one.

Autofixers

While adding tests that this suggestion notice is properly present in the rule documentation file of any suggestable rules, I also added a test that the autofixer notice is present for fixable rules. In doing this, I standardized the fixable/suggestion notices at the top of the rule docs with the corresponding emojis, and added the fixable notice to many rule docs that were missing it.

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #3359 (6b778c3) into master (8306a7b) will not change coverage.
The diff coverage is n/a.

❗ Current head 6b778c3 differs from pull request most recent head bb999c2. Consider uploading reports for the commit bb999c2 to get more accurate results

@@           Coverage Diff           @@
##           master    #3359   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files         123      123           
  Lines        8873     8873           
  Branches     3244     3244           
=======================================
  Hits         8655     8655           
  Misses        218      218           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Looks great overall!

tests/index.js Outdated Show resolved Hide resolved
tests/index.js Outdated Show resolved Hide resolved
tests/index.js Outdated Show resolved Hide resolved
tests/index.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants