Skip to content

Feat beautifier #1230

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

Merged
merged 8 commits into from
Jul 15, 2015
Merged

Feat beautifier #1230

merged 8 commits into from
Jul 15, 2015

Conversation

thaiat
Copy link
Contributor

@thaiat thaiat commented Jul 8, 2015

Motivation
during my first PR to this repo i struggled with the tab convention over space, and had to re push a few times.
the command npm run lint should have told me what was wrong before i pushed to the repo...

Changes

  1. Using better rules in .eslintrc to make it obvious that code adhere to the repo
  2. Add a .jsbeautyrc file following code style so it is easier to reformat the code when contributing (using js-beautify or any code editor plugin built on top of it)
  3. Fix a few of the most obvious lint errors and warnings

@thaiat thaiat force-pushed the feat-beautifier branch from 3c69488 to daff744 Compare July 8, 2015 12:52
@hkal
Copy link
Contributor

hkal commented Jul 8, 2015

An editorconfig exists in the repository, which addresses code style. The fact that you ran into this issue is a documentation problem, in my opinion. I'm not sure if jsbeautify is useful, but the .eslintrc changes are good 👍

@thaiat
Copy link
Contributor Author

thaiat commented Jul 8, 2015

@hkal, the editorconfig is not honored by every editor, that's why i think a jsbeautify does not hurt. that way you are not dependent on the editor but more on your build process or global commands

if you prefer i remove it though i don't have any objection

@sokra
Copy link
Member

sokra commented Jul 12, 2015

Could you add the jsbeatify script to the package.json scripts?

@thaiat
Copy link
Contributor Author

thaiat commented Jul 12, 2015

@sokra not sure what you mean by that...

@sokra
Copy link
Member

sokra commented Jul 12, 2015

Something like npm run beatify, which should beatify the code.

sokra added a commit that referenced this pull request Jul 15, 2015
@sokra sokra merged commit 16f6718 into webpack:master Jul 15, 2015
@sokra
Copy link
Member

sokra commented Jul 15, 2015

Thanks

@sokra
Copy link
Member

sokra commented Jul 15, 2015

I hope I'll be able to merge this with the webpack-2 branch...

@sokra
Copy link
Member

sokra commented Jul 15, 2015

I improved the PR a bit: e68108a

It now checks for beauty files on CI and npm test

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