Skip to content

Commit c69ec47

Browse files
committed
Use prettier@2
1 parent fdcb2cc commit c69ec47

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage/
2+
pkg/
3+
site/
4+
coverage/
5+
.nyc_output/
6+
tmp/
7+
out/
8+
types/
9+
CHANGES.md

.prettierrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This project uses Prettier defaults, the config file is present in
2+
# order to trigger editor plugins to allow format on save behaviour

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"url": "https://github.com/sinonjs/samsam.git"
1313
},
1414
"lint-staged": {
15+
"*.{js,css,md}": "prettier --check",
1516
"*.js": "eslint"
1617
},
1718
"scripts": {
@@ -25,6 +26,8 @@
2526
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
2627
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test",
2728
"test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"",
29+
"prettier:check": "prettier --check '**/*.{js,css,md}'",
30+
"prettier:write": "prettier --write '**/*.{js,css,md}'",
2831
"preversion": "npm run test-check-coverage",
2932
"version": "changes --commits --footer",
3033
"postversion": "git push --follow-tags && npm publish --access public"
@@ -67,7 +70,7 @@
6770
"mocha": "^7.0.1",
6871
"mochify": "^6.6.0",
6972
"nyc": "^15.0.0",
70-
"prettier": "^1.18.2",
73+
"prettier": "^2.2.1",
7174
"proxyquire": "^2.1.3",
7275
"proxyquire-universal": "^2.1.0",
7376
"proxyquireify": "^3.2.1",

0 commit comments

Comments
 (0)