Skip to content

Commit

Permalink
docs: update for ignoredPropNamas option
Browse files Browse the repository at this point in the history
  • Loading branch information
MURAKAMI Masahiko authored and arthurgeron committed Oct 7, 2024
1 parent 1973ddf commit 4484ba4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/require-usememo.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The rule takes an optional object:
"fix": { "addImports": true },
"checkHookCalls": true,
"ignoredHookCallsNames": { "useStateManagement": false },
"ignoredPropNames": ["style"]
}],
}
```
Expand All @@ -42,6 +43,9 @@ You can use strict 1:1 comparisons (e.g., `"useCustomHook"`) or employ Minimatch
- `fix`: Contains rules that only apply during eslint's fix routine.

- `addImports`: Creates imports for useMemo and useCallback when one or both are added by this rule. Will increment to a existing import declaration or create a new one. Setting this to false disables it, defaults to true.

- `ignoredPropNames`: This allows you to add specific prop name, thereby disabling them to be checked when used.

## Autofix Examples (Function Components & Hooks only)

To illustrate the autofix feature in action, below are some examples with input code and the corresponding fixed output:
Expand Down

0 comments on commit 4484ba4

Please sign in to comment.