chainpoint / chainpoint-gateway

Chainpoint Gateway
https://chainpoint.org
Apache License 2.0
27 stars 12 forks source link

New Prettier+ESLint+EditorConfig setup. h/t @filoozom #15

Closed grempe closed 6 years ago

grempe commented 6 years ago

Proposed replacement of StandardJS/JSLint in VS Code with Prettier + ESLint + EditorConfig.

See the development section of the README.md for info and which plugins you should install. You should disable the existing plugins for linting and code formatting for this project.

Once we shake out any issues here this config would be intended to be applied across all repositories.

This can be configured to run source code re-formatting on save of file with the following entry in VSCode user prefs:

{
...
  "eslint.autoFixOnSave": true
...
}

See:

https://eslint.org/ https://prettier.io/ https://editorconfig.org/

grempe commented 6 years ago

Hat tip to @filoozom for starting the discussion on this and opening PR #14 .

filoozom commented 6 years ago

Don't forget to add a pre-commit hook that fixes files before commiting to make sure that the code is correct for developers that don't use VS Code or don't have the right plugins installed. With husky and lint-staged for example. 😉

grempe commented 6 years ago

Pull request complete. Thanks all! Now we'll settle in with this for a bit and see if any issues arise.