Skip to content

Commit ae142dc

Browse files
committed
fix(lint): add argsIgnorePattern so PascalCase destructured params don't trip no-unused-vars
ExportMenu.jsx's `icon: TriggerIcon = Download` pattern was flagged because TriggerIcon is only referenced inside JSX (<TriggerIcon ... />), and the config has no eslint-plugin-react/jsx-uses-vars to mark JSX usage. argsIgnorePattern mirrors the existing varsIgnorePattern so PascalCase destructured function params follow the same convention.
1 parent 0f56bf0 commit ae142dc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

eslint.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export default [
2323
rules: {
2424
...js.configs.recommended.rules,
2525
...reactHooks.configs.recommended.rules,
26-
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
26+
'no-unused-vars': ['error', {
27+
varsIgnorePattern: '^[A-Z_]',
28+
argsIgnorePattern: '^[A-Z_]',
29+
}],
2730
'react-refresh/only-export-components': [
2831
'warn',
2932
{ allowConstantExport: true },

0 commit comments

Comments
 (0)