mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added prettierignore and check script
This commit is contained in:
parent
cfea8bdcae
commit
ac9129c2b7
8
.prettierignore
Normal file
8
.prettierignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
dist/
|
||||||
|
pkg/
|
||||||
|
node_modules
|
||||||
|
public/vendor/
|
||||||
|
vendor/
|
||||||
|
|
@ -120,7 +120,8 @@
|
|||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"jest": "jest --notify --watch",
|
"jest": "jest --notify --watch",
|
||||||
"api-tests": "jest --notify --watch --config=tests/api/jest.js",
|
"api-tests": "jest --notify --watch --config=tests/api/jest.js",
|
||||||
"storybook": "cd packages/grafana-ui && yarn storybook"
|
"storybook": "cd packages/grafana-ui && yarn storybook",
|
||||||
|
"prettier:check": "prettier -- --list-different \"**/*.{ts,tsx,scss}\""
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
@ -128,11 +129,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx}": [
|
"*.{ts,tsx,json,scss}": [
|
||||||
"prettier --write",
|
|
||||||
"git add"
|
|
||||||
],
|
|
||||||
"*.scss": [
|
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
"git add"
|
"git add"
|
||||||
],
|
],
|
||||||
|
@ -10,4 +10,5 @@ function exit_if_fail {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit_if_fail npm run prettier:check
|
||||||
exit_if_fail npm run test
|
exit_if_fail npm run test
|
||||||
|
Loading…
Reference in New Issue
Block a user