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

Format Code with Prettier and use Stricter Linter #464

Merged
merged 19 commits into from
Jul 23, 2018

Conversation

hipstersmoothie
Copy link
Collaborator

@hipstersmoothie hipstersmoothie commented Jul 21, 2018

  • Add prettier for consistent code formatting. Make contributing and reading the code a lot easier
    • took out editor config in favor of prettier
  • Switch from eslint to XO. provides a far stricter linter and conforms better to modern JS practices.
  • Add babel-preset-env to get ES features. I haven't actually modified the code to be to ESexy yet. That'll come in another PR

@edi9999 Would you like to review?

Copy link
Contributor

@edi9999 edi9999 left a comment

Choose a reason for hiding this comment

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

I think in your changes, the files browser/lib/jimp.js should not be changed (they seem to be parsed by prettier/eslint)

.editorconfig Outdated
# See http://editorconfig.org/ for valid options and editor plugins.

# Prevents EditorConfig from searching higher in the tree
root = true
Copy link
Contributor

Choose a reason for hiding this comment

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

editorconfig still makes sense (it is used so that from any text editor, you already have the config well setup for that project).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

putting it back

"browserify": "^14.3.0",
"envify": "^3.4.0",
"eslint": "^3.14.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why eslint-config-xo-react ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. fixing this. moving babel dep all to dev as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this comment has been addressed

@hipstersmoothie
Copy link
Collaborator Author

@edi9999 hwo you you feel about me adding the browser/lib/*.js to the gitignore. It is really weird that the built versions of those files are committed. this would fix #433. I could set it up to only do it before a publish

@edi9999
Copy link
Contributor

edi9999 commented Jul 22, 2018

@edi9999 hwo you you feel about me adding the browser/lib/*.js to the gitignore. It is really weird that the built versions of those files are committed. this would fix #433. I could set it up to only do it before a publish

yes, +1 on this, I don't see why this would be commited each time.

@hipstersmoothie
Copy link
Collaborator Author

@edi9999 I'll exclude browser/lib/*.js in another PR. how does this one look now?

  • I put back the editorconfig and reformatted
  • Made prettier run on commit and ignore the built files for now
  • Made sure all linting and testing passes

can you approve the changes?

@edi9999 edi9999 merged commit 5286008 into jimp-dev:master Jul 23, 2018
@edi9999
Copy link
Contributor

edi9999 commented Jul 23, 2018

Thanks @hipstersmoothie !

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