Skip to content

Commit 32cee36

Browse files
feat: add prettier format script (#637)
* feat: add prettier format script to package.json * fix: format eslint config * fix: increase scope for prettier
1 parent 58e2ddd commit 32cee36

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.eslintrc.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
},
1616
"extends": ["eslint:recommended", "prettier"],
1717
"rules": {
18-
"no-unused-vars": ["warn", {
19-
"argsIgnorePattern": "^_",
20-
"varsIgnorePattern": "^_",
21-
"caughtErrorsIgnorePattern": "^_"
22-
}]
18+
"no-unused-vars": [
19+
"warn",
20+
{
21+
"argsIgnorePattern": "^_",
22+
"varsIgnorePattern": "^_",
23+
"caughtErrorsIgnorePattern": "^_"
24+
}
25+
]
2326
},
2427
"overrides": [
2528
{

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
},
88
"description": "Example projects for the freeCodeCamp.org curriculum",
99
"scripts": {
10-
"lint": "eslint apps test --max-warnings 0 && prettier apps test --check",
10+
"lint": "eslint apps test --max-warnings 0 && prettier --check .",
1111
"prebuild": "npm run create-caddyfile && node scripts/copy-dockerignore.js",
1212
"prestart": "npm run create-caddyfile && node scripts/copy-dockerignore.js",
1313
"build": "docker compose build",
1414
"create-caddyfile": "node scripts/create-caddyfile.js",
1515
"start": "docker compose up -d",
1616
"stop": "docker compose down",
17+
"format": "prettier --write .",
1718
"prepare": "husky install",
1819
"test": "jest"
1920
},

0 commit comments

Comments
 (0)