eslint-filtered-fix icon indicating copy to clipboard operation
eslint-filtered-fix copied to clipboard

Fix rules with slash not working on Windows

Open RedMser opened this issue 3 years ago • 2 comments

I assume that optionator parses strings as file names (as there's a similar bug reported here), so on Windows it turns slashes in rule names into backslashes.

I haven't encountered rules that contain spaces, so this may be enough to fix related issues for now.

RedMser avatar Jan 16 '22 16:01 RedMser

Hi, thanks for the PR! Can you give an example of a rule name that currently fails in windows? This package is used in https://github.com/IanVS/eslint-nibble, and I haven't heard any reports of windows failures, so I'd like to make sure I clearly understand what is going on.

IanVS avatar Jan 16 '22 16:01 IanVS

Hi, I did some more research and it actually seems to be related to npx, as running your CLI directly via node works as expected. I found a similar issue here, which got resolved by updating node and npm.

So I assume this fix isn't strictly needed, since your code is working as intended, but maybe a disclaimer on the readme or the like...

RedMser avatar Jan 16 '22 17:01 RedMser