Rocketseat / eslint-config-rocketseat

ESLint configuration used by Rocketseat
https://www.npmjs.com/@rocketseat/eslint-config
734 stars 107 forks source link

Enable react/self-closing-comp rule #4

Closed ldgmaia closed 1 year ago

ldgmaia commented 2 years ago

This is a code style optimization.

Issue: When importing a component that has no content/children, ESLint is keep as instead of self closing it as .

Solution: Adding the rule ""react/self-closing-comp": "error"," to the ESLint config file will fix the self closing tag when saving the file.