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

Add Prettier configuration #425

Merged
merged 3 commits into from Dec 20, 2021
Merged

Add Prettier configuration #425

merged 3 commits into from Dec 20, 2021

Conversation

@Hinton
Copy link
Member

@Hinton Hinton commented Dec 20, 2021

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Adds the necessary configurations for configuring Prettier. And setting up a pre-commit hook for automatically running it before commits.

  • Removed a couple of tslint rules that conflicts with prettier.
  • Temporarily disable tslint in CI. This will be enabled again in the 2nd PR.
  • Set indent_size: 2, since we decided to stick with prettiers defaults this should ensure our editors don't get confused. (While at it, I also added trim_trailing_whitespace: true
  • Added huskier with a pre-commit hook relying on lint-staged. Which will ensure each commit is formatted. Note, this "should" never require manual intervention and will just make the commits easier to read.
  • Installed prettier, with the only config change to set line-width to 100.

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)
.husky/pre-commit Outdated Show resolved Hide resolved
@Hinton Hinton requested a review from djsmith85 Dec 20, 2021
Copy link
Contributor

@djsmith85 djsmith85 left a comment

Changes look good

@Hinton Hinton merged commit ec53a16 into master Dec 20, 2021
7 checks passed
@Hinton Hinton deleted the feature/prettier-config branch Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants