See the title. :^)
Ideally, I'd like to be able to specify "controlComponents": "Input$" to match any component that ends with Input (e.g., <TextInput />, <EmailInput />, <BirthdateInput />, etc.).
I'd prefer a glob to a regex string; ie, *Input.
2 cents: I would vote for regex over glob. Regexes are more powerful and I think they're more common in this kind of thing (I've only ever seen globs used for file paths). How would you express .+(Input|Area|Box) using a glob (e.g., if we wanted to allow TextInput or TextBox or TextArea as valid "input" components)? The downside is that regexes are a bit harder to use. ¯_(ツ)_/¯
"More powerful" is a downside, not an upside.
I'd expect that example to be ["*Input", "*Area", "*Box"].
You say potato, I say potato. 😉
I don't have super strong feelings either way, but the eslint core rules use regexes over globs.
e.g. https://eslint.org/docs/rules/no-unused-vars
Depends on which rules you look at.
Accepting a regex string opens us up to a host of potential CVEs id rather avoid.
I created https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/749 to add glob support 😄