AtomLinter / linter-eslint-node

ESLint plugin for Atom/Pulsar Linter (v8 and above)
https://web.pulsar-edit.dev/packages/linter-eslint-node
MIT License
4 stars 3 forks source link

fix: Clear cache properly when .eslintrc changes #33

Closed savetheclocktower closed 1 year ago

savetheclocktower commented 1 year ago

This was an oversight; file it under “how did this ever work?” Rather than iterating over keys, I was iterating over the key/value array yielded by each Map, so deletion had no effect, because I was asking it to delete keys that did not exist.

To verify:

  1. Make sure the “Use cache” setting is enabled.
  2. Trigger a linter error/warning in a file in your project.
  3. Change your .eslintrc so that it no longer cares about that rule.
  4. Go back to your file and re-save.

On main, the linting error/warning won't go away. On this PR branch, it will.

savetheclocktower commented 1 year ago

I can work on a test. At least some of the CI runs are failing on the setup-atom step, and I'm not sure how the ones that get past that step are doing so.

savetheclocktower commented 1 year ago

Test added. @UziTech, I also added a snippet to the spec runner which fixes its failure to inherit PATH from the editor that spawned it. This might not be a problem on Windows at all, but if it's something that affects you as well, then that code block probably needs to be made more generic. Not a blocker; I imagine it doesn't affect running specs from the command line.