[docs] Passing sx example causes eslint "unsafe spready of 'any' value in an array" error
@mnajdova is already working on this.
Since Jun 26, 2023.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Related page
https://mui.com/system/getting-started/the-sx-prop/#passing-the-sx-prop
Kind of issue
Broken demonstration
Issue description
Perhaps the expectation is that users are not prohibiting the use of the any type via eslint, but if I copy the ListHeader component example from the referenced docs page, eslint marks it as an error. Specifically, the case where sx is an array, eslint sees it as type any[] (see screenshot). I'm wondering if there's a way to make this work with the eslint setting to prevent the use of any?
Context 🔦
Attempting to make a component that accepts an sx property and passes it to its first child component (a MUI Box) and add a few style prop settings. See screenshot.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.