Closed karl-run closed 10 months ago
Will get to this tonight
Digging into this, I think the problem is that we try to recurse through dirs, and start linting files as we find them. This means this.state.file
etc gets overwritten all over the place.
The solution I think is to get a list of every file we should lint, before we loop through and actually parse them.
And if that doesn't solve the problem, it'd at least make things easier to debug.
I have a working implementation of this locally, but it imports the glob-util
of eslint. I've thrown together a repo deleting most everything we don't need here: https://github.com/SimenB/eslint-glob-util
That works, but it needs cleaning up. It'd also be great if eslint maintained it themselves, I have an open issue for that
🪦
When
stylint
is executed with multiple paths provided, e.g.stylint folder-one/ folder-two/
it will only lint one of them, usually not the first one (haven't found any pattern to which it will pick).Steps to reproduce
npm i
npm run lint-dank
npm run lint-cool
npm run lint
(which isstylint dank-styles/ cool-styles
)The expected behaviour is of course that it lints all provided folders.
Alternatively, add more folders and see that it doesn't always pick the first or last folder provided.