govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Add ESLint and Stylelint caches to GitHub actions workflow

Open colinrotherham opened this issue 3 years ago • 1 comments

During workflow runs we only need to lint "changed" files

Both ESLint and Stylelint support this 👍

Locally too, this will remove a 2-3 second delay during (future) git hook "lint" runs: https://github.com/alphagov/govuk-frontend/pull/2848

colinrotherham avatar Sep 20 '22 08:09 colinrotherham

Converting back to draft whilst we wait for https://github.com/stylelint/stylelint/pull/6356 🎉

colinrotherham avatar Sep 21 '22 10:09 colinrotherham

Converting back to draft whilst we wait for https://github.com/stylelint/stylelint/pull/6356 🎉

We've just released [email protected] with this fix in. It also contains a new --cache-strategy content flag that you may want to use for parity with how you use ESLint.

jeddy3 avatar Sep 28 '22 10:09 jeddy3

We've just released [email protected] with this fix in. It also contains a new --cache-strategy content flag that you may want to use for parity with how you use ESLint.

Thanks @jeddy3 (and @kimulaco @kaorun343 @ybiquitous)

Massively appreciate the new addition (and contribution) 🙌

colinrotherham avatar Sep 28 '22 11:09 colinrotherham

@36degrees This one's ready to review again 😊

Not a huge speed bump for the GitHub workflow, but noticeable when running gulp dev (touching lots of Sass files)

colinrotherham avatar Sep 29 '22 07:09 colinrotherham