DEV Community

Discussion on: How does your Team Maintain Coding Standards?

Collapse
 
devdrake0 profile image
Si • Edited

I'd say there are two main ways:

  • Document your standards. When you're reviewing PR's/MR's, make sure people are referencing your standardisation document and ensuring things that don't adhere are flagged. The longer this document, the more chance you have it won't be reviewed 😄 .

  • Linting. Put as many of your standardisation rules as linting rules. For example, do your standards dictate a single quote over a double quote? Stick it in your linter! The more you can automate, the more chances you'll have of adherence!

As a bonus, you can also build in post commit hooks, CI checks etc if you really want to enforce your standards.