make lint fix work on windows#142
Conversation
Linter did not work for me single quotes '' made eslint find no files. I also changed it to look in src. Otherwise it was looking also in node_modules and it took forever to complete
| "lint": "eslint '**/*.{js,ts,tsx,json}' && echo 'Lint complete.'", | ||
| "lint:fix": "eslint '**/*.{js,ts,tsx,json}' --fix && echo 'Lint --fix complete.'", | ||
| "lint": "eslint src/**/*.{js,ts,tsx,json} && echo 'Lint complete.'", | ||
| "lint:fix": "eslint src/**/*.{js,ts,tsx,json} --fix && echo 'Lint --fix complete.'", |
There was a problem hiding this comment.
The single quotes prevent shell expansion, so that eslint handles the glob instead of the user's shell (which helps ensure things are consistent).
So I think we need to preserve that. I'm unsure of how to make this work on Windows while retaining that -- do you have any ideas?
The src/ addition is nice, but unnecessary, as node_modules/ and a few other things are in the .eslintignore file.
There was a problem hiding this comment.
Does it work for you with quotes on Windows? Removing them was the only thing that worked for me o Windows.
Do you have an idea why it could not finish working when it pointed to whole directory not just src?
There was a problem hiding this comment.
I don't develop on Windows, so I can't be sure. I think @vtcaregorodtcev runs PAWLS on Windows, maybe he can help.
Linter did not work for me. Single quotes '' made eslint find no files. I also changed it to look in src. Otherwise it was looking also in node_modules and it took forever to complete