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

Consistent rule descriptions and doc sections #3361

Merged
merged 1 commit into from Aug 21, 2022

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Aug 19, 2022

This is a follow-up to #3359 to further improve rule doc consistency.

Changes included:

  1. Many rule descriptions were out-of-sync between their rule doc title and meta.docs.description property. I updated these to be consistent.
  2. Updated all rule descriptions to begin with "Enforce", "Require", or "Disallow" which follows ESLint conventions and is now enforced by eslint-plugin/require-meta-docs-description.
  3. Added tests that all rule docs have the correct title, a "Rule Details" section, and a "Rule Options" section only if they have options.

@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

Merging #3361 (13d23b8) into master (11dc75e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3361   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files         123      123           
  Lines        8873     8873           
  Branches     3244     3244           
=======================================
  Hits         8655     8655           
  Misses        218      218           
Impacted Files Coverage Δ
lib/rules/button-has-type.js 96.77% <ø> (ø)
lib/rules/default-props-match-prop-types.js 100.00% <ø> (ø)
lib/rules/display-name.js 98.33% <ø> (ø)
lib/rules/forbid-component-props.js 100.00% <ø> (ø)
lib/rules/forbid-dom-props.js 100.00% <ø> (ø)
lib/rules/forbid-elements.js 100.00% <ø> (ø)
lib/rules/forbid-foreign-prop-types.js 96.49% <ø> (ø)
lib/rules/forbid-prop-types.js 100.00% <ø> (ø)
lib/rules/function-component-definition.js 99.00% <ø> (ø)
lib/rules/hook-use-state.js 100.00% <ø> (ø)
... and 65 more

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

lib/rules/no-namespace.js Show resolved Hide resolved
lib/rules/no-unescaped-entities.js Outdated Show resolved Hide resolved
lib/rules/state-in-constructor.js Outdated Show resolved Hide resolved
tests/index.js Show resolved Hide resolved
tests/index.js Show resolved Hide resolved
@ljharb
Copy link
Member

ljharb commented Aug 19, 2022

<3 that these changes are being enforced by tests btw

@ljharb ljharb merged commit 13d23b8 into jsx-eslint:master Aug 21, 2022
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