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

Update code formatting tools #95

Closed
macklinu opened this issue Feb 8, 2018 · 1 comment · Fixed by #96
Closed

Update code formatting tools #95

macklinu opened this issue Feb 8, 2018 · 1 comment · Fixed by #96

Comments

@macklinu
Copy link
Contributor

macklinu commented Feb 8, 2018

#91 introduced an ESLint config to validate the ESLint rules, and as a result, this codebase now uses Standard (formatting and linting) as well as ESLint (linting).

#91 (comment) makes a good point that Standard is ESLint under the hood, so some options I see moving forward:

  • update the ESLint config to extend eslint-config-standard and stop executing the standard CLI tool altogether
  • migrate to Prettier for code formatting, and use ESLint strictly for code linting

As a personal preference and having more experience with Prettier, I would choose the latter. I prefer having a file formatted the same way across IDEs and computers, either by saving a file or formatting in a precommit hook - standard doesn't necessarily enforce consistent line length and bracket spacing, from my experience.

Either way, part of resolving this issue would be to introduce lint-staged into the codebase, so that code formatting and linting would run as a precommit hook.

I will leave this open for a bit in case other contributors/maintainers have anything to add.

macklinu added a commit that referenced this issue Feb 9, 2018
macklinu added a commit that referenced this issue Feb 9, 2018
macklinu added a commit that referenced this issue Feb 10, 2018
@xjamundx
Copy link
Contributor

Yeah I love prettier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants