feat: Add scripts to format and lint with prettier
This commit is contained in:
committed by
mrugesh
parent
b440851381
commit
b8bdbc7dc8
4
.prettierignore
Normal file
4
.prettierignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
**/.cache
|
||||||
|
**/public
|
||||||
|
client/static
|
||||||
|
fixtures
|
23
package.json
23
package.json
@ -20,11 +20,14 @@
|
|||||||
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
|
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
|
||||||
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js",
|
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js",
|
||||||
"format": "npm run lint:js -- --fix",
|
"format": "npm run lint:js -- --fix",
|
||||||
|
"format:other": "npm run prettier -- --write",
|
||||||
"hooks:install": "node node_modules/husky/husky.js install",
|
"hooks:install": "node node_modules/husky/husky.js install",
|
||||||
"hooks:uninstall": "node node_modules/husky/husky.js uninstall",
|
"hooks:uninstall": "node node_modules/husky/husky.js uninstall",
|
||||||
"lint": "npm-run-all -p lint:*",
|
"lint": "npm-run-all -p lint:*",
|
||||||
"lint:challenges": "cd ./curriculum && npm run lint",
|
"lint:challenges": "cd ./curriculum && npm run lint",
|
||||||
"lint:js": "eslint .",
|
"lint:js": "eslint .",
|
||||||
|
"lint:other": "npm run prettier -- --debug-check",
|
||||||
|
"prettier": "prettier \"**/*.{md,css}\"",
|
||||||
"postinstall": "npm run bootstrap",
|
"postinstall": "npm run bootstrap",
|
||||||
"seed": "npm-run-all -p seed:*",
|
"seed": "npm-run-all -p seed:*",
|
||||||
"seed:auth-user": "cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedAuthUser",
|
"seed:auth-user": "cross-env DEBUG=fcc:* node ./tools/scripts/seed/seedAuthUser",
|
||||||
@ -71,14 +74,18 @@
|
|||||||
"slugg": "^1.2.1"
|
"slugg": "^1.2.1"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.js": [
|
"linters": {
|
||||||
"eslint --fix",
|
"*.js": [
|
||||||
"git add"
|
"eslint --fix",
|
||||||
],
|
"git add"
|
||||||
"./curriculum/challenges/**/*.md": [
|
],
|
||||||
"node ./curriculum/tools/lint",
|
"*.md": "node ./curriculum/tools/lint",
|
||||||
"git add"
|
"*.{md,css}": [
|
||||||
]
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"concurrent": false
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
Reference in New Issue
Block a user