Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Standard eslint #13

Merged
merged 3 commits into from
Nov 19, 2019
Merged

Standard eslint #13

merged 3 commits into from
Nov 19, 2019

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Nov 19, 2019

use standard config for eslint

@UziTech
Copy link
Member Author

UziTech commented Nov 19, 2019

I added npm run lint to husky so it will run before push

@the-j0k3r the-j0k3r self-requested a review November 19, 2019 19:42
@UziTech UziTech merged commit 6de7758 into bus-stop:master Nov 19, 2019
@UziTech UziTech deleted the standard-eslint branch November 19, 2019 21:33
@the-j0k3r
Copy link
Member

the-j0k3r commented Nov 20, 2019

EDITED:

Do we need to add a standad --fix script to package.json, no? to be run on pre-commit so all code being submitted directly or via PR automatically conforms to the style, right? linting only lints doesn't fix or change code.

Also about the eslint --fix, is that what that does it calls standard --fix right, if so Ill update the hook following your feedback.

@UziTech
Copy link
Member Author

UziTech commented Nov 20, 2019

eslint . --fix does the same thing as standard --fix. Standard just uses eslint under the hood

@the-j0k3r
Copy link
Member

and about making the pre-commit hook a fix instead of prepush lint or prepush fix?

@UziTech
Copy link
Member Author

UziTech commented Nov 20, 2019

I didn't want to make it on pre-commit since it lints all files not just the ones in the commit. I think pre-push is fine. Ideally their IDE will be alerting them of errors as they type but if not pre-push is just the catch all.

@the-j0k3r
Copy link
Member

I was thinking, if the existing code is already linted and fixed.... The only upside is not having to ask a user to run a fix script with their PR's right?

I thought the point of having a standard is so we dont review ugly code or ask users to run fix, which if the pre-existeing code is not linted/fixed we end up with a unrelated fixes anyway.

Doesnt make sense not to have it but I will redirect users to run the fix script with PR.s

@UziTech
Copy link
Member Author

UziTech commented Nov 20, 2019

The pre-push hook runs before they push code to their PR branches so it shouldn't let them push code to PRs that fails linting.

@the-j0k3r
Copy link
Member

🎉 This PR is included in version 4.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants