Skip to content

make lint fix work on windows #142

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "UNLICENSED",
"private": true,
"scripts": {
"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.

"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test"
Expand Down