Skip to content

Commit 56aa329

Browse files
committed
Add prettier
1 parent a7e65ba commit 56aa329

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

.prettierignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Build artifacts
2+
dist/
3+
4+
.github/
5+
6+
# Test fixtures
7+
__tests__/fixtures/
8+
9+
# Dependencies
10+
node_modules/
11+
12+
# Test coverage
13+
coverage/
14+
15+
# Package manager files
16+
package-lock.json

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"semi": true,
5+
"printWidth": 100,
6+
"tabWidth": 2
7+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
"scripts": {
2121
"build": "vite build --config vite.config.js && vite build --config vite-umd.config.js",
2222
"clean": "rm -rf ./dist",
23+
"format": "prettier --write .",
24+
"format:check": "prettier --check .",
2325
"lint": "node_modules/.bin/eslint ./ && npm run lint:translations && npm run lint:containers",
2426
"lint:containers": "node ./scripts/container-lint.js",
2527
"lint:translations": "node ./scripts/i18n-lint.js",
2628
"size": "bundlewatch --config bundlewatch.config.json",
2729
"start": "vite",
28-
"test": "npm run build && npm run lint && npm run size && vitest run"
30+
"test": "npm run build && npm run lint && npm run format:check && npm run size && vitest run"
2931
},
3032
"license": "Apache-2.0",
3133
"contributors": [
@@ -106,6 +108,7 @@
106108
"glob": "^13.0.6",
107109
"globals": "^15.15.0",
108110
"happy-dom": "^20.0",
111+
"prettier": "^3.8.1",
109112
"react": "^19.0.0",
110113
"react-dnd-test-backend": "^16.0.1",
111114
"react-dom": "^19.0.0",

0 commit comments

Comments
 (0)