Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This applies standard for linting JavaScript as per the GDS Way [1]. Standardx is used instead of standard because Standard 16 introduced a rule that disallowed the use of `var`, instead preferring `let` or `const` [2]. This conflicts with the GOV.UK approach where we tend to not embrace features that we know will break old browsers even if they're not necessarily supported [3], disallowing var will mean that < IE 11 will be unable to run any of the JS. In order to customise standard rules this project has switched to using standardx [4] which allows us to disallow rules. I've used this so we can disallow the 'no-var' rule. [1]: https://gds-way.cloudapps.digital/manuals/programming-languages/js.html#linting [2]: standard/standard#633 [3]: alphagov/govuk_publishing_components#1611 (comment) [4]: https://github.com/standard/standardx
- Loading branch information