Skip to content

Commit

Permalink
Add Prettier with tslint plugin and precommit hook (#9)
Browse files Browse the repository at this point in the history
* Add prettier, pre-commit hook, config and docs

* Add prettier ignore for templates as failed to parse

* Format codebase using prettier

* fix errors

* remove the tslint prettier plugin

* package-lock.json
  • Loading branch information
agubler committed Feb 5, 2018
1 parent ff96166 commit cdb69c5
Show file tree
Hide file tree
Showing 15 changed files with 1,401 additions and 630 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -3,7 +3,7 @@
The following has been addressed in the PR:

* [ ] There is a related issue
* [ ] All code matches the [style guide](https://github.com/dojo/meta/blob/master/STYLE.md)
* [ ] All code has been formatted with [`prettier`](https://prettier.io/) as per the [readme code style guidelines](./../#code-style)
* [ ] Unit or Functional tests are included in the PR

<!--
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
@@ -0,0 +1 @@
src/templates
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -47,7 +47,17 @@ It's also possible to generate a [Custom Element](https://www.w3.org/TR/2016/WD-
## How do I contribute?

We appreciate your interest! Please see the [Dojo 2 Meta Repository](https://github.com/dojo/meta#readme) for the
Contributing Guidelines and Style Guide.
Contributing Guidelines.

### Code Style

This repository uses [`prettier`](https://prettier.io/) for code styling rules and formatting. A pre-commit hook is installed automatically and configured to run `prettier` against all staged files as per the configuration in the projects `package.json`.

An additional npm script to run `prettier` (with write set to `true`) against all `src` and `test` project files is available by running:

```bash
npm run prettier
```

### Installation

Expand Down

0 comments on commit cdb69c5

Please sign in to comment.