Skip to content

Commit

Permalink
chore: use prettier to format json files (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 authored Jul 29, 2024
1 parent bba1bb3 commit f8965f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ compiled
doc_build

# ignore all JS/TS files, use Biome
**/*[.js,.ts,.jsx,.tsx.json,.json5]
**/*.js
**/*.ts
**/*.jsx
**/*.tsx
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"editor.defaultFormatter": "biomejs.biome"
},
"[json5]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
Expand Down
5 changes: 5 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"quoteStyle": "single"
}
},
"json": {
"formatter": {
"enabled": false
}
},
"linter": {
"enabled": true,
"ignore": ["./e2e/cases/**/*/src/*"],
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
"pre-commit": "npx nano-staged"
},
"nano-staged": {
"*.{md,mdx,css,less,scss}": "prettier --write",
"*.{js,jsx,ts,tsx,mjs,cjs,json,jsonc,json5}": ["biome check --write"],
"*.{md,mdx,css,less,scss,json,jsonc,json5}": "prettier --write",
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"biome check --write"
],
"package.json": "pnpm run check-dependency-version"
},
"devDependencies": {
Expand Down

0 comments on commit f8965f1

Please sign in to comment.