-
Notifications
You must be signed in to change notification settings - Fork 657
☂️ [PAUSED] React lint rules #341
Comments
It would be nice to have a strong set of accessibility rules. We could have autofixes/suggestions that infer from usage what props the author probably meant. |
FWIW here's the list of lint rules included with Create React App, which is probably a good guide as to which rules a lot of people are using today: https://github.com/facebook/create-react-app/blob/master/packages/eslint-config-react-app/index.js The "Rules of Hooks" rule is a pretty important one for React hooks: https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks
Create React App uses |
A lot of those seems so superfluous. We can pretty much ignore any of the rule that are specific to createClass. Also there’s many there that just get around ESLints poor handling of JSX, that we already handle such as variables in JSX being marked as used. |
There’s also the Airbnb config’s react rules worth considering. |
Are react specific rules going to be implemented as expansion packs as discussed in #173 ? It didn't seem like the discussion was conclusive. Maybe this is a good time to make that decision. |
Thinking about expansion packs, it feels like having an on switch just for the sake of it. We can detect the React code pretty unambiguously so there's no reason to have configuration to turn it on. |
Something that we might consider: https://twitter.com/dan_abramov/status/1255237989548134405?s=20 |
Is it safe to assume that the recommended rules are not superfluous? If there's not going to be an expansion pack, could people have at those ones? |
If no one has started working on |
I'm going to take a look at implementing: |
Before submitting React or JSX lint rules of any kind please get confirmation in this issue or on the Discord. |
@jamiebuilds Could you look at finalizing the rule list? The comment at the top with a link in big bold letters looks like it's finalized and ready for people to work on. While a lot of them are fine, I don't want someone to spend a lot of time on ones that we don't want only to have their PR rejected. |
There's been other things happening recently, but I am still working on these rules: |
Can I take a |
I'll take |
I'll take |
gonna start on I'll also take a look at |
Ill take a look at react/sort-comp |
Still working on |
can i try |
Hey everyone! I'd like to pause development of new React lint rules (if you're currently working on or have reserved something in this thread then feel free to complete it!). We're preparing for our first release and should focus on stability and polish. We need to take a more comprehensive look on the sort of React rules and patterns we want to encourage (ideally with approval from the React team or "community leaders" (whatever that means lol)). For that reason there may be some rules that will undergo significant tweaks or even removal. I'll make sure to keep this thread updated with those discussions and as we finalize any guidelines in case anyone wants to get involved. Thank you everyone for your participation so far! Really exciting to see the contributions. |
Going to close this and use more finegrained issues. |
This issue serves to discuss what React rules we should have in Rome. Ideally these rules would be blessed by the React team.
What rules do you think are the most important? Keep in mind that Rome does not allow disabling lint rules. You can only suppress them. The React rules will not be an exception. Rome allows AST autofixes which drastically simplifies the existence of many lint rules by allowing them to be automatically fixed, and with the Rome review system, unsafe suggestions are also easily added and amended.
The text was updated successfully, but these errors were encountered: