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

Feature/update lint staged config #130

Merged
merged 5 commits into from
Jul 1, 2019

Conversation

michaeljaltamirano
Copy link
Contributor

@michaeljaltamirano michaeljaltamirano commented Jul 1, 2019

This PR expands our husky and lint-staged use.

  1. It adds a pre-push yarn run test hook so that we can find and fix tests before they fail on CI.
  2. It applies prettier formatting to .md and .json files
    • This applies, most significantly, to our manual markdown prop tables. Ideally, we can start pulling them automatically from the component, but we are not doing that yet.
  3. It applies prettier formatting to style/styles/test.js files.
    • This makes an assumption that we were originally ignoring these files because we didn't want to run eslint on them. I still think we should format them.
  4. It applies prettier formatting and eslint checking on other source files.
    • It looks like there was an incorrect path to these files in that resources does not exist in this repo, so we were neither applying prettier nor checking for eslint warnings/errors before pushing.

The intent of this (and #129) is to make greater use of the tools we're using offer. I think we should rely more on auto-formatting to ensure a consistent code style (so we don't have to comment on it in PRs, and so it is easier to read), and to prevent unnecessary CI builds.

Copy link
Contributor

@daigof daigof left a comment

Choose a reason for hiding this comment

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

👍

}
},
"lint-staged": {
"concurrent": false,
"subTaskConcurrency": 1,
"linters": {
"resources/**/!(style|styles|test).js": [
Copy link
Contributor

Choose a reason for hiding this comment

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

lol i must have copied this from the pocketderm repo. good find

@snags88
Copy link
Contributor

snags88 commented Jul 1, 2019

This is great, we should automate these types of checks where we can!

@michaeljaltamirano michaeljaltamirano merged commit de27d17 into master Jul 1, 2019
@michaeljaltamirano michaeljaltamirano deleted the feature/update-lint-staged-config branch July 1, 2019 22:57
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