Promote all eslint warnings to errors#7123
Merged
isaacroldan merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
All 10 warning-level rules in @shopify/eslint-plugin-cli have zero current violations across the entire codebase. Promoting them to errors prevents regressions and removes the ambiguity of warnings that are never enforced. Promoted rules (baseRules): - @typescript-eslint/switch-exhaustiveness-check - @typescript-eslint/prefer-nullish-coalescing - @typescript-eslint/prefer-promise-reject-errors - @typescript-eslint/only-throw-error - no-negated-condition - no-lone-blocks - @shopify/cli/prompt-message-format - @shopify/cli/banner-headline-format Promoted rules (testFileRules): - @typescript-eslint/no-unnecessary-template-expression - @typescript-eslint/prefer-reduce-type-parameter Co-authored-by: Claude Code <claude-code@anthropic.com>
Contributor
Coverage report
Test suite run success4000 tests passing in 1531 suites. Report generated by 🧪jest coverage report action from 1c7815a |
There was a problem hiding this comment.
Pull request overview
This PR tightens lint enforcement in the shared @shopify/eslint-plugin-cli flat config by upgrading selected ESLint rule severities from warnings to errors, ensuring violations fail lint/CI instead of being informational.
Changes:
- Promotes
@typescript-eslint/switch-exhaustiveness-checkfromwarntoerror. - Promotes two Shopify CLI custom rules (
prompt-message-format,banner-headline-format) fromwarntoerror. - Promotes multiple TypeScript/ESLint core rules (including test-file overrides) from
warntoerror.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gonzaloriestra
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Improves code quality enforcement by upgrading ESLint rule severity levels from warnings to errors.
WHAT is this pull request doing?
Promotes 9 ESLint rules from 'warn' to 'error' severity:
Base rules:
@typescript-eslint/switch-exhaustiveness-check- ensures switch statements handle all cases@shopify/cli/prompt-message-format- enforces proper prompt message formatting@shopify/cli/banner-headline-format- enforces proper banner headline formatting@typescript-eslint/prefer-nullish-coalescing- prefers nullish coalescing over logical ORno-negated-condition- discourages negated conditions@typescript-eslint/prefer-promise-reject-errors- ensures proper error objects in promise rejectionsno-lone-blocks- prevents unnecessary code blocks@typescript-eslint/only-throw-error- ensures only Error objects are thrownTest file rules:
@typescript-eslint/no-unnecessary-template-expression- prevents redundant template expressions@typescript-eslint/prefer-reduce-type-parameter- encourages proper typing in reduce operationsHow to test your changes?
Run the ESLint configuration on existing code to verify the promoted rules now fail the build when violations are present instead of just showing warnings.
Measuring impact
How do we know this change was effective? Please choose one:
Checklist