ministryofjustice / development-standards-alpha

Code standards for new probation services
Other
0 stars 1 forks source link

JavaScript linting variation from GDS #4

Open gregtyler opened 5 years ago

gregtyler commented 5 years ago

Hi folks, thanks for putting this together. I look forward to contributing and seeing it grow!

I had a wee question about JavaScript linting standards. linting-rules.md says that ESLint should be used with the AirBnB config. However, I note that the GOV.UK Frontend/Design System uses standardjs.

These don't necessarily need to be identical, and I don't think usage in GOV.UK Frontend constitutes a recommendation from GDS, but I wondered if there had been an intentional decision to differ from what GDS are using?

I've used both setups before, and found them both great, but wondered if we'd benefit from aligning given that we likely have a dependency on the GOV.UK Design System.

theDustRoom commented 4 years ago

I was just about to raise this myself.

The Probation in Court team unanimously chose to use JavaScript Standard Style based on the fact that it now appears to be the default standard (no pun intended) for JavaScript and that GDS use it.

Also, JavaScript Standard Style is supported by IntelliJ IDEA and other IDEs right out of the box.

I would argue that JavaScript Standard Style is a more suitable linting tool to adopt as the chosen style for MoJ Digital.