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

add tslint, prettier, lint-staged for complete "tooling package" #16

Open
Hotell opened this issue Oct 2, 2017 · 2 comments
Open

add tslint, prettier, lint-staged for complete "tooling package" #16

Hotell opened this issue Oct 2, 2017 · 2 comments
Labels

Comments

@Hotell
Copy link

Hotell commented Oct 2, 2017

It would be nice to follow best practices from js and ts programming paradigm, which could be enforced by providing tslint.

also united formatting and automatically handling all in pre commit hooks via lint-staged is very good idea and DX IMHO

I can submit all of these via PR if you're ok with that :)

@adamdbradley
Copy link
Contributor

Yeah this is a great question and something we've been debating how to best do it. Basically we love tslint, and personally use it, but we don't want to place every and all 3rd party tools inside of our build process. Instead we'd like to make it easy to add in whatever you want (default would be tslint for sure). The real challenge is the watch process, and making it easy to have rebuilds kick off 3rd party code.

Webpack would do this via plugins, which is certainly a possibility, but our big goal is to not generate, or at least reduce any custom configs. So we'd love to come up with an easy way to hook into the watch/rebuild process, but want to make sure it's clean and simple, and any 3rd party tooling can hook into it without us having to add it to the system.

So open ended question: What's the best way to meet the above goals?

@jgw96 jgw96 added the question label Oct 6, 2017
@Hotell
Copy link
Author

Hotell commented Oct 7, 2017

What I meant is not incorporating all mentioned tooling within stencil server, rather creating separate npm-scripts tags within this project -> prettier + tslint with applied fixes would be triggered from within precommit hook powered by lint-staged/husky.

From my experience it is rather distracting seeing lint/formatting errors during writing code

  • editor should be able to autofix them on save
  • as a generic check CLI tools that are run during pre-commit should handle this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants