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

Run prettier as part of ESLint #1676

Closed
wants to merge 3 commits into from
Closed
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"test-node": "c8 --99 --check-coverage mocha --require ./test/bootstrap/index.js test/*.js",
"test-chrome": "web-test-runner --playwright",
"lint": "npm run lint:js && npm run lint:format",
"lint:js": "eslint lib/",
"lint:format": "prettier --check lib",
"lint:js": "eslint lib/ && prettier --check lib/",
"lint:format": "eslint lib/ --fix && prettier --write lib/",
Copy link
Contributor

Choose a reason for hiding this comment

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

This means the lint script will run both of them twice. I guess you meant to also update the lint script to only call lint:js?

Maybe we can make it clearer by calling the other lint:fix instead

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh maybe I've misunderstood how this works. I've been getting prettier changes in my PRs that didn't fail CI so I assumed it wasn't working but I can see now that it should be failing the build.

Maybe I was looking at the wrong thing then. I'm just gonna close this and add a git hook I think.

"lint:types": "tsc",
"clean": "rm -rf chai.js coverage/"
},
Expand Down