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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettify #253

Merged
merged 11 commits into from Jul 1, 2019
Merged

Prettify #253

merged 11 commits into from Jul 1, 2019

Conversation

dgdavid
Copy link
Collaborator

@dgdavid dgdavid commented Jun 29, 2019

This PR does basically four five things (related in some way):

  • updates the entire codebase written during the HackWeek to have the same code style (using Prettier and Stylelint)

  • adjust a bit more the rules and configuration used for that purpose

      "arrowParens": "always",
      "jsxBracketSameLine": true,
      "printWidth": 100,
      "singleQuote": true
  • fixes present copyright headers

  • adds missing copyright headers

  • reintroduces the LICENSE.txt file


Regarding the common code style, there are a few choices that I do not like either. But, if I understood correctly, we did not want to waste time discussing or reaching agreements about what we prefer. That's the reason why I introduced Prettier (now with a couple of rules tuning).

I also added a pre-commit hook and a combination of tools (lint-staged and precise-commits) with the intention to

ensure that the staged code is formatted consistently.

In other words, to format automatically the stated coded (precise-commit) and add the changes to the same commit (lint-staged).

That way,

after enough time has passed, our codebase will be formatted consistently

But something went wrong and this goodwill turned in small headaches (#243, #248, #249). Sorry guys! 馃槄

However, the hook is still there (now also fixing automatically the CSS 馃檮), because I think the mentioned headaches were because a mistake in the configuration. Nevertheless, we need to discuss if we will keep the hook as it is (fixing things silently) or change it to abort the commit.

And... THAT'S ALL! 馃槣

@dgdavid dgdavid marked this pull request as ready for review June 30, 2019 09:55
@dgdavid dgdavid changed the title Prettify [WIP] Prettify Jun 30, 2019
@dgdavid dgdavid changed the title [WIP] Prettify Prettify Jun 30, 2019
@dgdavid dgdavid merged commit 297200e into rewrite-using-react-redux Jul 1, 2019
@dgdavid dgdavid deleted the feature/prettify branch July 1, 2019 07:57
dgdavid added a commit that referenced this pull request Feb 7, 2020
Also removes the precise-commits[1] package which is no longer necessary
according to the migration guide for lint-staged v10[2].

Related to #253.

[1] https://github.com/nrwl/precise-commits
[2] https://github.com/okonet/lint-staged#v10
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.

None yet

2 participants