Is there a way to prevent `lowercaseevent` names?

From time to time, I have to write such PR reviews to tell the person not to use lower case event names. It is getting repetitive and annoying for everyone involved. Ideally, IDE would tell them this instead or even autofix. Anyone has a solution for this?
No description
4 Replies
deluksic
deluksicOP6mo ago
we are using typescript, so ideally it would be an actual type error to write it the other way
Paul Armstrong
Paul Armstrong6mo ago
You could write a custom eslint plugin to do it… but you either have to know every single handler available or accept uniformly erroring on any JSX prop that starts with on that isn't followed by a capital letter. It's likely that you could use jsx-handler-names from eslint-plugin-react without any modifications
Dakotys
Dakotys6mo ago
GitHub
eslint-plugin-solid/docs/event-handlers.md at main · solidjs-commun...
Solid-specific linting rules for ESLint. Contribute to solidjs-community/eslint-plugin-solid development by creating an account on GitHub.
deluksic
deluksicOP6mo ago
Perfect, thank you for the suggestions. Will try then out on monday!
Want results from more Discord servers?
Add your server