dimanche 9 août 2020

How to test code style and standards in React?

Me and my team are making a React website. We've done all the coding bits, however, I'm worried that with more people joining in, our code-base can become messy, as in:

  • Improper indentation used (preferred 2 space in .js files)
  • Extremely long lines (I'd prefer to set a limit for number of lines in a row)
  • Incorrect location of CSS files: For e.g. storing .css files under components (I'd prefer them to be in src/ but outside src/components/)
  • No Warnings when running npm start.

From the little I've tested out testing libraries for React, they mostly deal with code errors. I'm aware in Android it is possible to keep checks for first two options using testing libraries. What are React/NodeJS solutions for the same?

Aucun commentaire:

Enregistrer un commentaire