UNPKG

829 BMarkdownView Raw
1# prettier-check [![Build Status](https://travis-ci.org/hexacta/prettier-check.svg?branch=master)](https://travis-ci.org/hexacta/prettier-check) [![npm version](https://img.shields.io/npm/v/prettier-check.svg?style=flat)](https://www.npmjs.com/package/prettier-check)
2
3> Check that all files match [prettier](https://github.com/prettier/prettier) code style.
4
5
6## Install
7
8```
9$ npm install --save-dev prettier prettier-check
10```
11
12> Make sure you have `prettier` as a dependency (or globally).
13
14## Usage
15
16Use it in the test script in your package.json:
17
18```json
19 "scripts": {
20 "test": "prettier-check src/**/*.js"
21 },
22```
23
24All args are forwarded to prettier:
25
26```json
27 "scripts": {
28 "test": "prettier-check --single-quote --trailing-comma es5 src/**/*.js"
29 },
30```
31
32## License
33
34MIT © [Hexacta](https://www.hexacta.com)