Crown-Commercial-Service / digitalmarketplace-govuk-frontend

Where Digital Marketplace frontend components and GOV.UK Frontend live together in harmony
MIT License
7 stars 5 forks source link

Standard now warns about any use of "var" #208

Closed domoscargin closed 3 years ago

domoscargin commented 3 years ago

Running npm run test passes, but standard now flags all uses of "var" instead of let/const. Eventually, this will become an error rather than a warning: https://standardjs.com/changelog.html#1601---2020-10-30

We are using var in our components and let/const in our tests to follow the conventions of govuk-frontend.

Our options here include:

  1. Rollback standard (it was bumped here: https://github.com/alphagov/digitalmarketplace-govuk-frontend/pull/205)
  2. Update our code to use let/const instead of var
  3. Ignore this rule as part of our standard/eslint config (https://standardjs.com/index.html#how-do-i-disable-a-rule)
lfdebrux commented 3 years ago

Thanks for creating an issue for this @domoscargin.

It might be worth talking to the Design System team and seeing what they think about this problem, seeing as they're going to be affected too. I'd be interested to know whether they are using var for a reason. I'm happy to reach out to them myself.

lfdebrux commented 3 years ago

@domoscargin beat me to it 😁

https://github.com/alphagov/govuk-frontend/issues/2009

domoscargin commented 3 years ago

Closing as resolved by https://github.com/alphagov/digitalmarketplace-govuk-frontend/pull/229