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

[wct] Fixing formatting #214

Closed
merlinnot opened this issue Apr 24, 2018 · 6 comments
Closed

[wct] Fixing formatting #214

merlinnot opened this issue Apr 24, 2018 · 6 comments

Comments

@merlinnot
Copy link
Contributor

Hi, in the coming days I'll be working on some issues with WCT. Do you mind if I make a PR with Prettier configuration?

@TimvdLippe
Copy link
Contributor

This repository is formatted with CLang (for example https://github.com/Polymer/tools/blob/master/packages/bundler/.clang-format) However it appears that the root folder does not have this configuration yet. Instead, I would say that standardizing the formatting across all packages would be a more appropriate change, rather than changing CLang to Prettier.

@merlinnot
Copy link
Contributor Author

merlinnot commented Apr 24, 2018

Oh, ok. Than I'd like to:

  • make a precommit hook to run clang format
  • make a configuration compatible with tslint

Is that ok?

I've noticed some misformatted files:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ yarn format
yarn run v1.5.1
$ find runner test | grep '\.js$\|\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i
Done in 0.73s.
$ git diff --name-only
packages/web-component-tester/runner/webserver.ts
packages/web-component-tester/test/fixtures/integration/query-string/test/tests.js
packages/web-component-tester/test/integration/setup_test_dir.ts
packages/web-component-tester/test/unit/cli.ts
packages/web-component-tester/test/unit/config.ts
packages/web-component-tester/test/unit/context.ts
packages/web-component-tester/test/unit/grunt.ts
packages/web-component-tester/test/unit/gulp.ts
packages/web-component-tester/test/unit/paths.ts

@TimvdLippe
Copy link
Contributor

I am not a member of the tools team, so they might have a different view. In any case, recently @e111077 has pushed https://github.com/PolymerLabs/webmat to auto-format all the element repositories (see PolymerElements/paper-input#648 with an example on how to fail the Travis build). Maybe that tool can be used for this repository as well.

Let's see what the tools team thinks of this before taking any action.

@merlinnot
Copy link
Contributor Author

That's exactly why I created an issue before making any PR.

@merlinnot merlinnot changed the title [wct] Prettier formatting [wct] Fixing formatting Apr 25, 2018
@merlinnot
Copy link
Contributor Author

Related issue: #224

@merlinnot
Copy link
Contributor Author

Closing due to inactivity.

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

No branches or pull requests

2 participants