Skip to content

Commit

Permalink
chore: add prettier-plugin-packagejson (#6155)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Apr 2, 2024
1 parent 5ba26a5 commit 8f7fe70
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"semi": false,
"printWidth": 100,
"bracketSpacing": false,
"singleQuote": true
"singleQuote": true,
"plugins": ["prettier-plugin-packagejson"]
}
4 changes: 2 additions & 2 deletions dev/embedded-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "embedded-studio",
"private": true,
"version": "3.36.2",
"private": true,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"dev": "vite",
"preview": "vite preview"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions dev/studio-e2e-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "studio-e2e-testing",
"private": true,
"version": "3.36.2",
"private": true,
"keywords": [
"sanity"
],
"license": "MIT",
"author": "Sanity.io <[email protected]>",
"scripts": {
Expand All @@ -10,9 +13,6 @@
"lint": "eslint .",
"start": "sanity start --port 3339"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/google-maps-input": "^3.0.1",
"@sanity/icons": "^2.11.0",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"perf:studio:build": "pnpm build --filter=perf-studio",
"perf:studio:dev": "cd perf/studio && pnpm dev",
"perf:test": "cd perf/tests && pnpm perf:test",
"postinstall": "husky",
"preinstall": "npx only-allow pnpm",
"postinstall": "husky",
"prettier": "prettier --cache .",
"prettify": "lerna run clean && prettier --write .",
"prettify:dts": "prettier --loglevel warn --write packages/@sanity/*/lib/dts && prettier --loglevel warn --write packages/*/lib/dts",
Expand Down Expand Up @@ -144,6 +144,7 @@
"npm-run-all": "^4.1.5",
"ora": "^6.3.1",
"prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.14",
"rimraf": "^3.0.2",
"rxjs": "^7.8.1",
"sanity": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions packages/@sanity/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"bugs": {
"url": "https://github.com/sanity-io/sanity/issues"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git",
Expand Down Expand Up @@ -55,8 +52,8 @@
"check:package": "pkg-utils --strict --tsconfig tsconfig.lib.json",
"clean": "rimraf lib coverage",
"lint": "eslint .",
"watch": "pkg-utils watch --tsconfig tsconfig.lib.json",
"test": "jest"
"test": "jest",
"watch": "pkg-utils watch --tsconfig tsconfig.lib.json"
},
"dependencies": {
"@babel/core": "^7.23.9",
Expand Down Expand Up @@ -86,5 +83,8 @@
},
"engines": {
"node": ">=18"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/@sanity/import-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"files": [
"src"
],
"scripts": {
"lint": "eslint ."
},
"dependencies": {
"@sanity/client": "^6.15.7",
"@sanity/import": "3.36.2",
Expand All @@ -40,8 +43,5 @@
},
"engines": {
"node": ">=18"
},
"scripts": {
"lint": "eslint ."
}
}
12 changes: 6 additions & 6 deletions packages/@sanity/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
},
"./package.json": "./package.json"
},
"main": "./lib/_exports/index.js",
"module": "./lib/_exports/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/dts/src/_exports/index.d.ts",
"typesVersions": {
"*": {
"mutations": [
"./lib/dts/src/_exports/mutations.d.ts"
]
}
},
"main": "./lib/_exports/index.js",
"module": "./lib/_exports/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/dts/src/_exports/index.d.ts",
"files": [
"lib",
"src",
Expand All @@ -59,8 +59,8 @@
"check:package": "pkg-utils --strict --tsconfig tsconfig.lib.json",
"clean": "rimraf lib coverage",
"lint": "eslint .",
"watch": "pkg-utils watch --tsconfig tsconfig.lib.json",
"test": "jest"
"test": "jest",
"watch": "pkg-utils watch --tsconfig tsconfig.lib.json"
},
"dependencies": {
"@bjoerge/mutiny": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/portable-text-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"postbuild": "run-s check:package",
"check:package": "pkg-utils --strict --tsconfig tsconfig.lib.json",
"clean": "rimraf lib",
"dev": "cd ./e2e-tests/ && ts-node serve",
"lint": "eslint .",
"prettier": "prettier --write './**/*.{ts,tsx,js,css,html}'",
"dev": "cd ./e2e-tests/ && ts-node serve",
"test": "jest",
"test:e2e": "jest --config=e2e-tests/e2e.config.cjs",
"test:watch": "jest --watch",
Expand Down
4 changes: 2 additions & 2 deletions perf/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"clean": "rimraf .sanity dist",
"dev": "sanity dev --port 3300",
"lint": "eslint .",
"start": "sanity start --port 3300",
"preview": "pnpm build && pnpm start"
"preview": "pnpm build && pnpm start",
"start": "sanity start --port 3300"
},
"dependencies": {
"react": "^18.2.0",
Expand Down
18 changes: 9 additions & 9 deletions perf/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,13 @@
"author": "Sanity.io <[email protected]>",
"scripts": {
"build": "pnpm build:cli && (cd studio && pnpm build)",
"lint": "eslint .",
"perf:codegen": "ts-node --files -r dotenv/config codegen",
"perf:test": "ts-node --files cli",
"perf:test:ci": "ts-node --files cli",
"lint": "eslint .",
"studio": "cd perf/studio && (pnpm build && pnpm start)",
"studio:dev": "cd perf/studio && SANITY_STUDIO_DATASET=dev pnpm dev"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/lodash": "^4.14.149",
"@types/node": "^18.15.3",
"esbuild": "^0.20.2",
"ts-node": "^10.9.1",
"typescript": "^5.4.2"
},
"dependencies": {
"@playwright/test": "^1.41.2",
"@sanity/client": "^6.15.7",
Expand All @@ -32,5 +24,13 @@
"lodash": "^4.17.21",
"rxjs": "^7.8.0",
"sanity": "workspace:*"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/lodash": "^4.14.149",
"@types/node": "^18.15.3",
"esbuild": "^0.20.2",
"ts-node": "^10.9.1",
"typescript": "^5.4.2"
}
}
40 changes: 39 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f7fe70

Please sign in to comment.