Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard for linting JavaScript #8178

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

dnkrj
Copy link
Contributor

@dnkrj dnkrj commented Aug 25, 2023

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

What

  • Add ESLint config for JavaScript Standard Style
  • Use property shorthand enforced by standard
  • Update CI to use local workflows for linting

Why

https://trello.com/c/p8IqI4zH/1653-tech-spike-more-opinionated-es6-rules

Move from standardx to standard configured through `.estlintrc.js`. This updates us to the latest version of standard and opens the door for using prettier in future.
Fix eslint errors resulting from the migration from standardx to standard
@dnkrj dnkrj force-pushed the 1653-tech-spike-more-opinionated-es6-rules branch from 921813a to 5b45ab0 Compare September 5, 2023 08:19
@dnkrj dnkrj changed the title Use standard and prettier Use standard for linting JavaScript Sep 5, 2023
@dnkrj dnkrj marked this pull request as ready for review September 5, 2023 08:30
@dnkrj dnkrj force-pushed the 1653-tech-spike-more-opinionated-es6-rules branch 4 times, most recently from e65fa1a to a8d4695 Compare September 5, 2023 08:47
Copy link
Contributor

@ryanb-gds ryanb-gds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@dnkrj dnkrj force-pushed the 1653-tech-spike-more-opinionated-es6-rules branch from a8d4695 to 21d987c Compare September 5, 2023 12:38
These local workflows allow Whitehall to use standard and in future prettier
@dnkrj dnkrj force-pushed the 1653-tech-spike-more-opinionated-es6-rules branch from 21d987c to 7cd3125 Compare September 5, 2023 12:39
@dnkrj dnkrj merged commit 928e7b2 into main Sep 5, 2023
7 checks passed
@dnkrj dnkrj deleted the 1653-tech-spike-more-opinionated-es6-rules branch September 5, 2023 12:56
richardTowers added a commit to alphagov/govuk_publishing_components that referenced this pull request May 13, 2024
[standardx](https://github.com/standard/standardx) appears to be a
bit... unmaintained. It's pinning us to a pretty old version of eslint,
and a few other dependencies.

We switched to using eslint in Whitehall in alphagov/whitehall#8178

We should consider rolling this out everywhere.

TODO - more details on what dependencies we're stuck on, and the
horrible story of the eslint config file format 🙈
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants