Skip to content

Commit 64bb4f8

Browse files
committed
add fmt and fix directories
1 parent 4180d5c commit 64bb4f8

File tree

3 files changed

+2469
-126
lines changed

3 files changed

+2469
-126
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,14 @@ fmt/prettier:
389389
echo "--- prettier"
390390
cd site
391391
# Avoid writing files in CI to reduce file write activity
392+
ifdef CI
393+
yarn run format:check
394+
else
395+
yarn run format:write
396+
endif
397+
echo "--- prettier"
398+
cd ../offlinedocs
399+
# Avoid writing files in CI to reduce file write activity
392400
ifdef CI
393401
yarn run format:check
394402
else
@@ -416,8 +424,8 @@ lint: lint/shellcheck lint/go lint/ts lint/helm
416424
lint/ts:
417425
cd site
418426
yarn && yarn lint
419-
cd offlinedocs
420-
yarn & yarn lint
427+
cd ../offlinedocs
428+
yarn && yarn lint
421429
.PHONY: lint/ts
422430

423431
lint/go:

offlinedocs/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
"build": "next build",
88
"start": "next start",
99
"export": "yarn copy-images && next build && next export",
10-
"copy-images": "sh ./scripts/copyImages.sh"
10+
"copy-images": "sh ./scripts/copyImages.sh",
11+
"lint": "yarn run lint:types && jest --selectProjects lint",
12+
"lint:fix": "FIX=true yarn lint",
13+
"lint:types": "tsc --noEmit",
14+
"format:check": "prettier --cache --check './**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'",
15+
"format:write": "prettier --cache --write './**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'"
1116
},
1217
"dependencies": {
1318
"@chakra-ui/react": "2.7.1",
@@ -17,8 +22,10 @@
1722
"framer-motion": "6",
1823
"front-matter": "4.0.2",
1924
"fs-extra": "10.1.0",
25+
"jest": "^29.6.1",
2026
"lodash": "4.17.21",
2127
"next": "12.1.6",
28+
"prettier": "^3.0.0",
2229
"react": "18.2.0",
2330
"react-dom": "18.2.0",
2431
"react-icons": "4.4.0",
@@ -27,10 +34,12 @@
2734
"remark-gfm": "3.0.1"
2835
},
2936
"devDependencies": {
37+
"@react-native-community/eslint-config": "^3.2.0",
38+
"@react-native-community/eslint-plugin": "^1.3.0",
3039
"@types/node": "18.0.0",
3140
"@types/react": "18.0.14",
3241
"@types/react-dom": "18.0.5",
33-
"eslint": "8.17.0",
42+
"eslint": "^8.45.0",
3443
"eslint-config-next": "12.1.6",
3544
"typescript": "4.7.3"
3645
}

0 commit comments

Comments
 (0)