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

test(prettier): add scripts/prettier-test.sh #384

Closed
wants to merge 1 commit into from

Conversation

guillaumearm
Copy link
Collaborator

@guillaumearm guillaumearm commented Feb 19, 2018

  • move prettier from lint to lint:fix npm script
  • run prettier-test.sh in lint npm script

Ref #379, #336

@guillaumearm
Copy link
Collaborator Author

Here test failed because test/omitBy.js has not been fixed by prettier.

@char0n : what do you think ?

@guillaumearm guillaumearm self-assigned this Feb 19, 2018
@wojpawlik
Copy link
Contributor

wojpawlik commented Feb 19, 2018

It'd be better if it only check files that differ from master, I don't think CI should fail for a good PR just because there's an issue elsewhere, git diff --name-only does that.

@guillaumearm
Copy link
Collaborator Author

I think CI should never fail on master, so a PR isn't a good PR if build fails.

move prettier from `lint` to `lint:fix` npm script, run `prettier-test.sh` in `lint`

Ref #379
@wojpawlik
Copy link
Contributor

To simplify things, we could run Prettier from within Eslint, one step less to worry about: https://prettier.io/docs/en/eslint.html

@@ -62,7 +62,8 @@
},
"betterScripts": {
"docs": "jsdoc -c jsdoc.json && node ./scripts/jsdoc-inject-dist.js",
"lint": "prettier test/**.js src/**.js --write && eslint ./ && tslint -c tslint.json src/index.d.ts",
"lint": "./scripts/prettier-test.sh && eslint ./ && tslint -c tslint.json src/index.d.ts",
"lint:fix": "prettier test/**.js src/**.js --write",
Copy link
Contributor

Choose a reason for hiding this comment

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

lint:fix should probably also run eslint --fix after prettier... Either directly, or by using prettier-eslint

@char0n
Copy link
Owner

char0n commented Feb 19, 2018

Closing until #387 is resolved.

@char0n char0n closed this Feb 19, 2018
@guillaumearm guillaumearm deleted the prettier-test branch February 19, 2018 22:52
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.

3 participants