go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.29k stars 196 forks source link

Relevant JS Libraries Changes: #702

Closed mapl closed 4 years ago

mapl commented 4 years ago

Internal Viewer Changes

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 7e1b095c5-PR-702


Files with Coverage Reduction New Missed Lines %
provider/postgis/util.go 10 71.5%
provider/postgis/postgis.go 110 64.86%
<!-- Total: 120 -->
Totals Coverage Status
Change from base Build 0595b4926: -0.01%
Covered Lines: 5294
Relevant Lines: 11704

💛 - Coveralls
mapl commented 4 years ago

As I ran the code formatter "prettier" without any customizations over the .vue files, it uses the defaults, which I wasn't aware of it collided with your coding style.

  1. Singlequotes if set to "false" by default https://prettier.io/docs/en/options.html#quotes
  2. Trailing Commas (hanging commas) is set to "es5" by default https://prettier.io/docs/en/options.html#trailing-commas

https://prettier.io/docs/en/why-prettier.html By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.....

I think it's a great opportunity to agree on a certain code formatting style and let prettier apply it. What do you think?


A simple .prettierrc file written in JSON or YAML (more options available) to do so.

Like: { "trailingComma": "none", "tabWidth": 2, "semi": false, "singleQuote": false }

ARolek commented 4 years ago

I'm a big fan of adopting a linting strategy so everyone can get past the code formatting debates. If you want, you can add that config file to this PR.

ARolek commented 4 years ago

@mapl thanks for adding the config file for prettier. I should have asked this before, but do you mind adding to the README for the ui/ folder instructions around using prettier? I think it will help with anyone else looking to work on this part of the code. I can also add these if you'd like.

mapl commented 4 years ago

Actually, the best would be if no special instructions are needed at all.

To make this work, we should follow the setup guide. https://prettier.io/docs/en/install.html#summary I have not tested this yet.

Perhaps a hint is sufficient that this project is using prettier with the simple styling rules found in .prettierrc

ARolek commented 4 years ago

Good call. Maybe we can weave this into the Vue.js config so we don't need to use the git hooks?

ARolek commented 4 years ago

Closed in #707