chore: Runs prettier as a pre-commit hook

This commit is contained in:
Marais Rossouw 2020-02-10 07:02:20 +10:00
parent 5100c7bbf2
commit 87e3dd52ce
No known key found for this signature in database
GPG Key ID: B87842CB66A230FF
6 changed files with 13 additions and 9 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
dist/

View File

@ -14,6 +14,7 @@
"lint": "eslint src",
"test": "npm run -s lint && npm run -s build && cross-env BABEL_ENV=test jest",
"jest": "cross-env BABEL_ENV=test jest",
"format": "prettier --write \"{*,{src,test}/**/*}.+(js|css)\"",
"release": "npm run -s prepare && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
},
"repository": "developit/microbundle",
@ -25,11 +26,13 @@
"lint-staged": {
"{src,test}/**/*.js": [
"eslint --fix",
"git add"
"prettier --write"
],
"{*,{src,test}/**/*}.+(js|css)": [
"prettier --write"
],
"*.md": [
"prettier --write",
"git add"
"prettier --write"
]
},
"jest": {
@ -106,9 +109,9 @@
"eslint-plugin-prettier": "^3.1.2",
"esm": "^3.2.22",
"fs-extra": "^8.1.0",
"husky": "^3.1.0",
"husky": "^4.2.1",
"jest": "^24.8.0",
"lint-staged": "^9.5.0",
"lint-staged": "^10.0.7",
"npm-merge-driver-install": "^1.1.1",
"prettier": "^1.19.1",
"regenerator-runtime": "^0.13.3",

View File

@ -1,3 +1,3 @@
.not_scoped_class {
color: pink;
color: pink;
}

View File

@ -1,3 +1,3 @@
.scoped_class {
color: pink;
color: pink;
}

View File

@ -1,3 +1,3 @@
.scoped_class {
color: pink;
color: pink;
}

View File

@ -1,3 +1,3 @@
.scoped_class {
color: pink;
color: pink;
}