Skip to content

Commit

Permalink
Fix linting of package.json files (#2742)
Browse files Browse the repository at this point in the history
It seems that our versions of `prettier` and/or
`prettier-plugin-packagejson` didn't work properly, because
`package.json` files weren't being linted. I've updated both, and now it
works again.
  • Loading branch information
Mrtenz authored Sep 19, 2024
1 parent 9c208ac commit c825683
Show file tree
Hide file tree
Showing 50 changed files with 605 additions and 604 deletions.
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
"packages/*"
],
"scripts": {
"postinstall": "simple-git-hooks",
"build": "ts-bridge --project tsconfig.build.json --verbose && yarn build:examples",
"build:ci": "ts-bridge --project tsconfig.build.json --verbose --clean",
"build:examples": "yarn workspace @metamask/example-snaps build",
"changelog:update": "yarn workspaces foreach --all --parallel --interlaced --verbose run changelog:update",
"changelog:validate": "yarn workspaces foreach --all --parallel --interlaced --verbose run changelog:validate",
"child-workspace-package-names-as-json": "ts-node scripts/child-workspace-package-names-as-json.ts",
"clean": "yarn workspaces foreach --all --parallel --verbose run clean",
"get-release-tag": "ts-node --swc scripts/get-release-tag.ts",
"postinstall": "simple-git-hooks",
"install-chrome": "./scripts/install-chrome.sh",
"lint": "yarn workspaces foreach --all --parallel run lint:eslint && yarn lint:misc --check && yarn lint:tsconfig && yarn constraints && yarn lint:dependencies",
"lint:ci": "yarn lint:eslint && yarn lint:misc --check && yarn lint:tsconfig && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "yarn workspaces foreach --all --parallel --verbose run lint:dependencies && yarn dedupe --check",
"lint:eslint": "eslint . --cache --ext js,jsx,ts,tsx",
"lint:fix": "yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn lint:tsconfig && yarn constraints --fix && yarn dedupe",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' '**/*.html'",
"lint:dependencies": "yarn workspaces foreach --all --parallel --verbose run lint:dependencies && yarn dedupe --check",
"lint:tsconfig": "node scripts/verify-tsconfig.mjs",
"lint": "yarn workspaces foreach --all --parallel run lint:eslint && yarn lint:misc --check && yarn lint:tsconfig && yarn constraints && yarn lint:dependencies",
"lint:fix": "yarn workspaces foreach --all --parallel run lint:eslint --fix && yarn lint:misc --write && yarn lint:tsconfig && yarn constraints --fix && yarn dedupe",
"lint:ci": "yarn lint:eslint && yarn lint:misc --check && yarn lint:tsconfig && yarn constraints && yarn lint:dependencies",
"build": "ts-bridge --project tsconfig.build.json --verbose && yarn build:examples",
"build:ci": "ts-bridge --project tsconfig.build.json --verbose --clean",
"build:examples": "yarn workspace @metamask/example-snaps build",
"clean": "yarn workspaces foreach --all --parallel --verbose run clean",
"test": "yarn workspaces foreach --all --parallel --verbose run test",
"test:browser": "yarn workspaces foreach --all --verbose run test:browser",
"child-workspace-package-names-as-json": "ts-node scripts/child-workspace-package-names-as-json.ts",
"prepare-preview-builds": "./scripts/prepare-preview-builds.sh",
"publish-previews": "yarn workspaces foreach --all --parallel --verbose run publish:preview",
"install-chrome": "./scripts/install-chrome.sh",
"get-release-tag": "ts-node --swc scripts/get-release-tag.ts",
"test": "yarn workspaces foreach --all --parallel --verbose run test",
"test:browser": "yarn workspaces foreach --all --verbose run test:browser",
"test:e2e": "yarn workspaces foreach --all --verbose --exclude root run test:e2e"
},
"simple-git-hooks": {
Expand Down Expand Up @@ -96,15 +96,16 @@
"jest": "^29.0.2",
"lint-staged": "^12.4.1",
"minimatch": "^7.4.1",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"rimraf": "^4.1.2",
"semver": "^7.5.4",
"simple-git-hooks": "^2.7.0",
"ts-node": "^10.9.1",
"typescript": "~5.3.3",
"vite": "^4.3.9"
},
"packageManager": "[email protected]",
"engines": {
"node": "^18.16 || >=20"
},
Expand All @@ -121,6 +122,5 @@
"favicons>sharp": true,
"vite>esbuild": true
}
},
"packageManager": "[email protected]"
}
}
24 changes: 12 additions & 12 deletions packages/create-snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
"build:chmod": "chmod +x ./dist/main.mjs && chmod +x ./dist/main.js",
"build:clean": "yarn clean && yarn build",
"build:watch": "tsc-watch --onSuccess 'yarn build:chmod'",
"test": "jest && yarn posttest",
"posttest": "jest-it-up",
"test:watch": "yarn test --watch",
"test:ci": "yarn test",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" --ignore-path ../../.gitignore",
"changelog:update": "../../scripts/update-changelog.sh @metamask/create-snap",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/create-snap",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" --ignore-path ../../.gitignore",
"publish:package": "../../scripts/publish-package.sh",
"lint:ci": "yarn lint",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../scripts/update-changelog.sh @metamask/create-snap",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/create-snap"
"test": "jest && yarn posttest",
"posttest": "jest-it-up",
"test:ci": "yarn test",
"test:watch": "yarn test --watch"
},
"dependencies": {
"@metamask/snaps-utils": "workspace:^",
Expand Down Expand Up @@ -81,8 +81,8 @@
"jest": "^29.0.2",
"jest-it-up": "^2.0.0",
"memfs": "^3.4.13",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"ts-node": "^10.9.1",
"tsc-watch": "^4.5.0",
"typescript": "~5.3.3"
Expand Down
18 changes: 9 additions & 9 deletions packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"scripts": {
"build": "yarn workspaces foreach --worktree --parallel --verbose --no-private run build",
"build:clean": "yarn clean && yarn build",
"changelog:validates": "yarn workspaces foreach --worktree --parallel --verbose run changelog:validate",
"clean": "yarn workspaces foreach --worktree --parallel --verbose --no-private run clean",
"start": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private --jobs unlimited run start",
"start:test": "yarn start",
"test": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private run test",
"lint": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private run lint && yarn lint:dependencies",
"lint:ci": "yarn lint:eslint && yarn lint:misc --check",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!packages/**\" --ignore-path ../../.gitignore",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:ci": "yarn lint:eslint && yarn lint:misc --check",
"changelog:validates": "yarn workspaces foreach --worktree --parallel --verbose run changelog:validate",
"lint:dependencies": "depcheck"
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!packages/**\" --ignore-path ../../.gitignore",
"start": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private --jobs unlimited run start",
"start:test": "yarn start",
"test": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private run test"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.0.4",
Expand All @@ -44,8 +44,8 @@
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/bip32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"scripts": {
"build": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/bip32-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/bip32-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
"start": "mm-snap watch",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/bip32-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/bip32-example-snap"
"test:e2e": "jest"
},
"dependencies": {
"@metamask/key-tree": "^9.1.2",
Expand Down Expand Up @@ -62,8 +62,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/bip44/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"scripts": {
"build": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/bip44-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/bip44-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
"start": "mm-snap watch",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/bip44-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/bip44-example-snap"
"test:e2e": "jest"
},
"dependencies": {
"@metamask/key-tree": "^9.1.2",
Expand Down Expand Up @@ -61,8 +61,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/browserify-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"scripts": {
"build": "ts-node --swc scripts/build.ts",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/browserify-plugin-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/browserify-plugin-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/browserify-plugin-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/browserify-plugin-example-snap"
"test": "yarn test:e2e",
"test:e2e": "jest"
},
"dependencies": {
"@metamask/snaps-sdk": "workspace:^"
Expand Down Expand Up @@ -59,8 +59,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"scripts": {
"build": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/browserify-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/browserify-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
"start": "mm-snap watch",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/browserify-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/browserify-example-snap"
"test:e2e": "jest"
},
"dependencies": {
"@metamask/snaps-sdk": "workspace:^"
Expand Down Expand Up @@ -58,8 +58,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/client-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"scripts": {
"build": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/client-status-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/client-status-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
"start": "mm-snap watch",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/client-status-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/client-status-example-snap"
"test:e2e": "jest"
},
"dependencies": {
"@metamask/snaps-sdk": "workspace:^"
Expand Down Expand Up @@ -58,8 +58,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
Expand Down
14 changes: 7 additions & 7 deletions packages/examples/packages/cronjobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"scripts": {
"build": "mm-snap build",
"build:clean": "yarn clean && yarn build",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/cronjob-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/cronjob-example-snap",
"clean": "rimraf \"dist\"",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
"lint:ci": "yarn lint",
"lint:dependencies": "depcheck",
"lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
"publish:preview": "yarn npm publish --tag preview",
"start": "mm-snap watch",
"test": "yarn test:e2e",
"test:e2e": "jest",
"publish:preview": "yarn npm publish --tag preview",
"lint:dependencies": "depcheck",
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/cronjob-example-snap",
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/cronjob-example-snap"
"test:e2e": "jest"
},
"dependencies": {
"@metamask/snaps-sdk": "workspace:^"
Expand Down Expand Up @@ -58,8 +58,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.5.2",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",
"typescript": "~5.3.3"
Expand Down
Loading

0 comments on commit c825683

Please sign in to comment.