Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make lint fix work on windows #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kacper-trebacz-atos
Copy link

@kacper-trebacz-atos kacper-trebacz-atos commented Aug 26, 2021

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

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.'",
Copy link
Contributor

@codeviking codeviking Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

@kacper-trebacz-atos kacper-trebacz-atos Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't develop on Windows, so I can't be sure. I think @vtcaregorodtcev runs PAWLS on Windows, maybe he can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants