Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Unify code style using Prettier and updates ESLint rules #364

Merged
merged 3 commits into from
Sep 1, 2017

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Aug 30, 2017

This PR includes:

  • unified package.json file, so it's almost exactly the same as raven-js
  • prettier setup with husky, so it runs for every file that's about to be commited
  • used prettier options from sentry repository and extended eslint config to use eslint-config-prettier. This way prettier won't collide with any stylistic rules of eslint.

Notes:

  • no manual code changes has been made in this PR
  • setup and config has been done in a separate commit, and automated changes has been made in separate ones
  • all tests are passing

Related raven-js PR: getsentry/sentry-javascript#1020

NOTE:
Tests on Node 0.8 and 0.10 are failing right now due to Husky not supporting them. To be resolved.

package.json Outdated
"should": "11.2.0"
},
"lint-staged": {
"*.{js,json}": ["prettier --write --single-quote", "git add"]
Copy link
Contributor

Choose a reason for hiding this comment

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

@kamilogorek
Copy link
Contributor Author

kamilogorek commented Aug 31, 2017

@MaxBittker @benvinegar used prettier options from sentry repository and extended eslint config to use eslint-config-prettier. This way prettier won't collide with any stylistic rules of eslint, see fe8a6fb. Those rules were found using their CLI https://github.com/prettier/eslint-config-prettier#cli-helper-tool

Same changes are reflected in getsentry/sentry-javascript#1020 (already merged).

Tests are still failing on 0.10 and 0.12, and it's know issue. See: #365

@kamilogorek kamilogorek merged commit 98353fa into master Sep 1, 2017
@kamilogorek kamilogorek deleted the prettier branch September 1, 2017 10:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants