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

chore: add prettier to project #261

Merged
merged 2 commits into from
Jul 9, 2021
Merged

chore: add prettier to project #261

merged 2 commits into from
Jul 9, 2021

Conversation

redonkulus
Copy link
Contributor

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@redonkulus redonkulus requested a review from lingyan July 9, 2021 18:31
@redonkulus redonkulus merged commit ac2cba9 into master Jul 9, 2021
@redonkulus redonkulus deleted the prettier branch July 9, 2021 20:25
@@ -33,12 +33,15 @@
"chai": "^4.2.0",
"coveralls": "^3.0.5",
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend you to not integrate prettier with eslint. Besides not being the recommended way according to prettier docs, you will not have to maintain 2 extra libraries that will couple eslint and prettier versions.

eslint:recommended preset doesn't stay in the way of prettier and running prettier --check . on CI is enough to prevent ugly code to reach master.

You could also scripts alias to format/check the code to make it easier to run prettier outside of an editor env:

"scripts": {
    "format": "prettier --write .",
    "format:check": "prettier --check ."
}

Copy link
Contributor

Choose a reason for hiding this comment

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

too late :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops haha, I can refactor it, I read that from the docs but stil felt easier to run it via eslint since we already had it setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pablopalacios
Copy link
Contributor

noooo...

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.

2 participants