-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update linting to use Stylelint v15 and Prettier #179
Conversation
Seems fine to me. Does prettier have an autofix mode which we can set up as a GitHub action to run on PRs? (I think this is quite a friendly way to allow contributors to not have to think about style issues) |
@frankieroberto It does. How would imagine this working though; a workflow that adds a commit with fixes upon a PR being merged? Do you have an example of such a workflow? |
@paulrobertlloyd forgot to reply to this before, sorry. There’s an example of such a workflow on the on BAT design history. It's not a ton of code. Basically the workflow runs the linter in autofix mode, then commits and pushes any changes (on a PR), and then re-runs it without autofix mode (in order to report status). |
@paulrobertlloyd updated this and merged it. |
stylelint-config-gds
has been updated to v1.0.0 to support Stylelint v15This PR updates Stylelint dependencies, and adds Prettier to format all code, except JavaScript which is formatted using StandardJS. This is the same approach used by
govuk-frontend
(broadly speaking).If we agree this is the right approach to linting going forward, I will update the other relevant X-GOVUK projects to follow the same.