Configure ESLint to ignore underscore-prefixed function arguments#19
Merged
Conversation
The compositionGuardPlugin added in 5d89a69 declares _view/_event handler args that are intentionally unused, prefixed with _ per the existing convention. no-unused-vars only had varsIgnorePattern, so these args failed the lint step and broke CI on main. Add argsIgnorePattern: '^_' to honor the prefix convention. https://claude.ai/code/session_01KndTBoSS4psob1CTs9q5cs
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.
Summary
Updated the ESLint
no-unused-varsrule configuration to ignore function arguments that start with an underscore, following a common convention for intentionally unused parameters.Changes
argsIgnorePattern: '^_'to theno-unused-varsrule infrontend/eslint.config.js_(e.g.,(_unused) => { ... }) to signal intent and suppress linting warningsDetails
This is a common JavaScript convention where underscore-prefixed identifiers indicate intentionally unused variables. The existing configuration already ignored uppercase and underscore-prefixed variable names (
varsIgnorePattern: '^[A-Z_]'); this change extends that pattern to function arguments for consistency.https://claude.ai/code/session_01KndTBoSS4psob1CTs9q5cs