stylelint icon indicating copy to clipboard operation
stylelint copied to clipboard

Add cacheStrategy option

Open kaorun343 opened this issue 3 years ago • 1 comments

What is the problem you're trying to solve?

It seems the current cache strategy of Stylelint is the same with ESLint and Prettier's metadata strategy. When running on CI, each file metadata can change at every single CI execution.

What solution would you like to see?

ESLint and Prettier supports content cache strategy. This strategy doesn't depends on metadata but depends on each file's content, so it is very useful when running them at CI.

  • https://eslint.org/docs/user-guide/command-line-interface#--cache-strategy
  • https://prettier.io/docs/en/cli.html#--cache-strategy

kaorun343 avatar Jun 23 '22 09:06 kaorun343

@kaorun343 Thanks for the request and for using the template.

A new cacheStrategy option (being metadata (default) or content) that is available via the Node.js API and the CLI sounds good to me.

I've labelled the issue as ready to implement. Please consider contributing if you have time.

jeddy3 avatar Jun 23 '22 13:06 jeddy3