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

Shove the whole codebase through Prettier #513

Merged
merged 17 commits into from
Dec 8, 2018
Merged

Shove the whole codebase through Prettier #513

merged 17 commits into from
Dec 8, 2018

Conversation

dtinth
Copy link
Member

@dtinth dtinth commented Dec 8, 2018

This PR makes Bemuse use Prettier’s code formatting style instead of using Standard. Other Standard rules (that has to do with common errors) stay intact though, but stylistic issues are now governed by Prettier.

Rationale:

  • Recently there are weird cases when prettier-eslint sometimes fail on ESLint step, and causes the source file to be formatted using only Prettier. Rather than fiddling with these tools to get the code to be compliant with Standard, I decided to use only Prettier to handle stylistic issue now.

  • Prettier supports more languages and results in more consistent formatting. (YAML, JSON, and SCSS files are now formatted using Prettier in this PR.)

Tasks:

  • Set up Prettier

  • Remove prettier-eslint

  • Update docs

  • Bring back style checking into Danger

@codecov-io
Copy link

codecov-io commented Dec 8, 2018

Codecov Report

Merging #513 into master will decrease coverage by 0.02%.
The diff coverage is 89.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #513      +/-   ##
==========================================
- Coverage   83.55%   83.52%   -0.03%     
==========================================
  Files         171      171              
  Lines        5400     5403       +3     
  Branches        1        1              
==========================================
+ Hits         4512     4513       +1     
- Misses        888      890       +2
Impacted Files Coverage Δ
src/app/interactors/getLR2Score.js 100% <ø> (ø) ⬆️
src/game/input/control.js 100% <ø> (ø) ⬆️
src/bootstrap/index.js 75% <ø> (ø) ⬆️
src/app/entities/Options.spec.js 100% <ø> (ø) ⬆️
packages/bemuse-notechart/src/data/GameNote.js 100% <ø> (ø) ⬆️
src/app/entities/Collections.spec.js 100% <ø> (ø) ⬆️
packages/bms/src/speedcore/segment.js 100% <ø> (ø) ⬆️
src/game/test-helpers/index.js 100% <ø> (ø) ⬆️
src/app/song-loader/song-loader.worker.js 100% <ø> (ø) ⬆️
packages/bemuse-notechart/src/data/GameEvent.js 100% <ø> (ø) ⬆️
... and 95 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf2bd47...f316548. Read the comment docs.

@akibot
Copy link
Contributor

akibot commented Dec 8, 2018

Fails
🚫 /home/circleci/bemuse/config/buildConfig.js line 14 – Read-only global 'name' should not be modified. (no-global-assign)
🚫 /home/circleci/bemuse/config/buildConfig.js line 21 – Read-only global 'name' should not be modified. (no-global-assign)
🚫 /home/circleci/bemuse/config/buildConfig.js line 24 – Read-only global 'name' should not be modified. (no-global-assign)
🚫 /home/circleci/bemuse/packages/bemuse-tools/src/server.js line 6 – Unable to resolve path to module 'rx'. (import/no-unresolved)
🚫

/home/circleci/bemuse/packages/bms/features/step_definitions/spacing_steps.js line 4 – Unnecessary escape character: -. (no-useless-escape)

🚫

/home/circleci/bemuse/packages/bms/features/step_definitions/spacing_steps.js line 4 – Unnecessary escape character: .. (no-useless-escape)

🚫

/home/circleci/bemuse/packages/bms/features/step_definitions/spacing_steps.js line 4 – Unnecessary escape character: -. (no-useless-escape)

🚫

/home/circleci/bemuse/packages/bms/features/step_definitions/spacing_steps.js line 4 – Unnecessary escape character: .. (no-useless-escape)

🚫 /home/circleci/bemuse/src/app/ui/ChangelogPanel.jsx line 3 – '$' is defined but never used. (no-unused-vars)
🚫

/home/circleci/bemuse/src/app/ui/ChangelogPanel.jsx line 4 – '_' is defined but never used. (no-unused-vars)

Generated by 🚫 dangerJS

@dtinth
Copy link
Member Author

dtinth commented Dec 8, 2018

[ESLint issue will be fixed in a separate PR...]

@dtinth dtinth merged commit 3faa032 into master Dec 8, 2018
@dtinth dtinth mentioned this pull request Dec 8, 2018
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