evanshortiss / lintspaces-cli

A CLI for the node-lintspaces module.
MIT License
18 stars 6 forks source link

Add --cache (eslint & stylelint style) #23

Open jrencz opened 7 years ago

jrencz commented 7 years ago

Both ESLint and Stylelint use --cache + --cache-location

Eslint creates cache entries like:

{
  "/path/to/file.js": {
    "size":234,
    "mtime":1505831352000,
    "hashOfConfig":"105xr29",
    "results":{
      "filePath":"/path/to/file.js",
      "messages":[],
      "errorCount":0,
      "warningCount":0
    }
  }
  ...
}

Stylelint has a bit smaller object:

{
  "/path/to/file.scss": {
    "size":541,
    "mtime":1503311672000,
    "hashOfConfig":"ch65yk"
  }
  ...
}

I haven't checked but those are similar enough that I think they either use the same package or one was inspired by another.

Let's discuss a possibility of adding those in here as well

schorfES commented 6 years ago

Hi @jrencz, I think this is a feature for the lintspaces core module. Would you like to open a PR?

evanshortiss commented 6 years ago

@schorfES @jrencz did anything come of this? @jrencz mind explaining the idea behind this? Is it to skip files that are unchanged between executions of lintspaces?