Skip to content

Commit

Permalink
Update docs wording
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie committed Oct 9, 2023
1 parent 95f18a9 commit dccb782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/lints/roblox_roact_non_exhaustive_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ end
7. This lint will ignore upvalues that are not reactive. Some examples of this are variables defined outside the component and variables that are known to be stable such as setter functions to `useState`.

## Deviations from [eslint-plugin-react-hooks/exhaustive-deps](https://www.npmjs.com/package/eslint-plugin-react-hooks)
1. ESLint requires passing in `a` for `a.b()` since js can implicitly pass `a` as `this` to `a.b`. Lua doesn't do this, so we allow `a.b` as dependencies.
2. ESLint complains about brackets in dependencies like `a["b"]` as being too complex. If string literals are inside the brackets and not a variable like `a[b]`, we recognize that and treat it the same as `a.b`.
1. ESLint requires passing in `a` for `a.b()` since js can implicitly pass `a` as `this` to `a.b`. Lua doesn't do this, so Selene allows `a.b` as dependencies.
2. ESLint complains about brackets in dependencies like `a["b"]` as being too complex. If string literals are inside the brackets and not a variable like `a[b]`, Selene recognizes that and treat it the same as `a.b`.

0 comments on commit dccb782

Please sign in to comment.