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

breaking: add recommended rules prefer-message-ids, prefer-output-null, no-missing-message-ids, no-unused-message-ids #258

Merged
merged 3 commits into from Jul 12, 2022

Conversation

bmish
Copy link
Member

@bmish bmish commented Jul 7, 2022

Enable additional recommended rules:

Remove from recommended:

  • consistent-output: no longer necessary since ESLint v7 validates that test cases provide output when they produce an autofix, and it's tedious to include output: null when not necessary, so we shouldn't require it

Part of v5 release (#230).

@bmish bmish added the BREAKING CHANGE This change will require a major version bump label Jul 7, 2022
@bmish bmish mentioned this pull request Jul 7, 2022
@bmish bmish changed the title breaking: update recommended rules for v5 breaking: add recommended rules prefer-message-ids, prefer-output-null, no-missing-message-ids, no-unused-message-ids, remove consistent-output Jul 7, 2022
…t-null`, `no-missing-message-ids`, `no-unused-message-ids`, remove `consistent-output`
@aladdin-add
Copy link
Contributor

aladdin-add commented Jul 8, 2022

consistent-output: no longer necessary since ESLint v7 validates that test cases provide output when they produce an autofix, and it's tedious to include output: null when not necessary, so we shouldn't require it.

it's no harm not to remove it - linting can find the error earilier(IDE)?

bmish added 2 commits July 7, 2022 22:34
* main:
  docs: modernize rule doc for `no-identical-tests` (eslint-community#265)
  docs: modernize rule doc for `require-meta-schema` (eslint-community#266)
  docs: modernize rule doc for `prefer-object-rule` (eslint-community#264)
  docs: modernize rule doc for `consistent-output` (eslint-community#263)
  chore: run version-specific CI jobs on Node 18 (eslint-community#260)
@bmish bmish changed the title breaking: add recommended rules prefer-message-ids, prefer-output-null, no-missing-message-ids, no-unused-message-ids, remove consistent-output breaking: add recommended rules prefer-message-ids, prefer-output-null, no-missing-message-ids, no-unused-message-ids Jul 8, 2022
@bmish
Copy link
Member Author

bmish commented Jul 8, 2022

@aladdin-add I'm definitely in favor of rules that can catch issues early even when ESLint itself would also catch the issues.

consistent-output can be helpful in this regard, but "consistency" is an imperfect heuristic. Just because some test cases for a rule have an autofix doesn't mean that all the rule's test cases do, which is why I think it can sometimes be tedious how this rule requires specifying output: null for the non-fixable test cases even though that's already the implicit behavior.

That said, I've removed the change to this rule from this PR since many people will still find the rule helpful and it's less churn to leave as-is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE This change will require a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants