ITADN

Config does not allow using React.forwardRef

#410Closedabemedia 创建于 2025-07-26
bugquestiontriaging
A
abemediacommented
### Your environment n/a ### Describe the bug The linting rule `fsecond/prefer-destructured-optionals` conflicts with `React.forwardRef` as that requires an argument of the type `(props: P, ref: ForwardedRef<T>): ReactNode` so we have no choice but to turn this rule off if using React. I think it should be removed completely or at least turned off if `react` is `true`. ### Project eslint-config-sheriff ### Minimal reproduction _No response_ ### Steps to reproduce _No response_ ### Logs ```shell ``` ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/AndreaPontrandolfo/sheriff/blob/master/CODE_OF_CONDUCT.md) - [x] I have read the [Contributing Guidelines on Issues](https://github.com/AndreaPontrandolfo/sheriff/blob/master/CONTRIBUTING.md#opening-a-new-issue). ### I will submit a PR - [x] I'd be willing to submit a PR for this issue.
关闭于 2025-07-27 3 条评论