Skip to content

Commit

Permalink
eslint: Enable react/no-unstable-nested-components
Browse files Browse the repository at this point in the history
As planned; see discussion:
  zulip#5393 (comment)

With allowAsProps: true, it turns out that none of our code is
actually flagged as problematic.

See doc:
  https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
  • Loading branch information
chrisbobbe committed Aug 31, 2022
1 parent f5e8fc0 commit b50cb73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,15 @@ rules:
react/prop-types: off # We handle this better with types.
react/require-default-props: off # We handle this better with types.

react/no-unstable-nested-components:
- error
# Avoid some regressions in clarity:
# https://github.com/zulip/zulip-mobile/pull/5393#discussion_r893924345
- allowAsProps: true

# These could be good to fix.
react/prefer-stateless-function: off
react/sort-comp: off
react/no-unstable-nested-components: off


#
Expand Down

0 comments on commit b50cb73

Please sign in to comment.