Skip to content

Commit

Permalink
chore: update Prettier to v3 (#1799)
Browse files Browse the repository at this point in the history
chore: upgrade Prettier to v3

Required inlining our shared Edu prettier config, because its latest
versions are only published to the private Github package registry,
which EDS can't access.
  • Loading branch information
ahuth authored Nov 6, 2023
1 parent 76c8f4b commit 946d962
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 56 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"@chanzuckerberg/eslint-config-edu-ts": "^1.0.9",
"@chanzuckerberg/eslint-plugin-edu-react": "^1.1.9",
"@chanzuckerberg/eslint-plugin-stories": "^3.2.14",
"@chanzuckerberg/prettier-config-edu": "^1.0.5",
"@chanzuckerberg/story-utils": "^4.0.0",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
Expand Down Expand Up @@ -146,10 +145,10 @@
"chromatic": "^6.24.1",
"codecov": "^3.8.3",
"copyfiles": "^2.4.1",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-testing-library": "^5.11.1",
"husky": "^8.0.3",
Expand All @@ -166,7 +165,8 @@
"postcss-mixins": "^9.0.4",
"postcss-nested": "^6.0.1",
"postcss-simple-vars": "^7.0.1",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.29.4",
Expand Down
11 changes: 7 additions & 4 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const config = require('@chanzuckerberg/prettier-config-edu');

module.exports = {
...config,
// Shared Edu config from https://github.com/chanzuckerberg/edu-libs/tree/main/packages/prettier-config-edu.
// Copied here, because EDS is open source and can't use the private package directly.
arrowParens: 'always',
plugins: ['prettier-plugin-tailwindcss'],
singleQuote: true,
trailingComma: 'all',

// Override of our shared config. Should we remove this and use the same config as our other
// Override of our shared config. Should we change this and use the same config as our other
// repos? Doing so would result in a large diff (every file would be updated).
bracketSpacing: true,
};
97 changes: 50 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,6 @@ __metadata:
"@chanzuckerberg/eslint-config-edu-ts": "npm:^1.0.9"
"@chanzuckerberg/eslint-plugin-edu-react": "npm:^1.1.9"
"@chanzuckerberg/eslint-plugin-stories": "npm:^3.2.14"
"@chanzuckerberg/prettier-config-edu": "npm:^1.0.5"
"@chanzuckerberg/story-utils": "npm:^4.0.0"
"@commitlint/cli": "npm:^17.8.1"
"@commitlint/config-conventional": "npm:^17.8.1"
Expand Down Expand Up @@ -2642,10 +2641,10 @@ __metadata:
clsx: "npm:^1.2.1"
codecov: "npm:^3.8.3"
copyfiles: "npm:^2.4.1"
eslint: "npm:^8.52.0"
eslint-config-prettier: "npm:^8.10.0"
eslint: "npm:^8.53.0"
eslint-config-prettier: "npm:^9.0.0"
eslint-plugin-jest: "npm:^27.6.0"
eslint-plugin-prettier: "npm:^4.2.1"
eslint-plugin-prettier: "npm:^5.0.1"
eslint-plugin-storybook: "npm:^0.6.13"
eslint-plugin-testing-library: "npm:^5.11.1"
graphemer: "npm:^1.4.0"
Expand All @@ -2665,7 +2664,8 @@ __metadata:
postcss-mixins: "npm:^9.0.4"
postcss-nested: "npm:^6.0.1"
postcss-simple-vars: "npm:^7.0.1"
prettier: "npm:^2.8.8"
prettier: "npm:^3.0.3"
prettier-plugin-tailwindcss: "npm:^0.5.6"
react: "npm:^18.2.0"
react-beautiful-dnd: "npm:^13.1.1"
react-children-by-type: "npm:^1.1.0"
Expand Down Expand Up @@ -2741,17 +2741,6 @@ __metadata:
languageName: node
linkType: hard

"@chanzuckerberg/prettier-config-edu@npm:^1.0.5":
version: 1.0.5
resolution: "@chanzuckerberg/prettier-config-edu@npm:1.0.5"
dependencies:
prettier-plugin-tailwindcss: "npm:^0.2.6"
peerDependencies:
prettier: ">= 2"
checksum: bd72832793558c2d958901c583bc158a9fe6612939e7b30ea80936b633ea7d80725900a189320596b6921916635965c823669349d3f01c14bcc2fbc541821488
languageName: node
linkType: hard

"@chanzuckerberg/story-utils@npm:^4.0.0":
version: 4.0.0
resolution: "@chanzuckerberg/story-utils@npm:4.0.0"
Expand Down Expand Up @@ -3224,9 +3213,9 @@ __metadata:
languageName: node
linkType: hard

"@eslint/eslintrc@npm:^2.1.2":
version: 2.1.2
resolution: "@eslint/eslintrc@npm:2.1.2"
"@eslint/eslintrc@npm:^2.1.3":
version: 2.1.3
resolution: "@eslint/eslintrc@npm:2.1.3"
dependencies:
ajv: "npm:^6.12.4"
debug: "npm:^4.3.2"
Expand All @@ -3237,14 +3226,14 @@ __metadata:
js-yaml: "npm:^4.1.0"
minimatch: "npm:^3.1.2"
strip-json-comments: "npm:^3.1.1"
checksum: fa25638f2666cac6810f98ee7d0f4b912f191806467c1b40d72bac759fffef0b3357f12a1869817286837b258e4de3517e0c7408520e156ca860fc53a1fbaed9
checksum: 77b70a89232fe702c2f765b5b92970f5e4224b55363b923238b996c66fcd991504f40d3663c0543ae17d6c5049ab9b07ab90b65d7601e6f25e8bcd4caf69ac75
languageName: node
linkType: hard

"@eslint/js@npm:8.52.0":
version: 8.52.0
resolution: "@eslint/js@npm:8.52.0"
checksum: 86beff213d0ae4ced203a922b74e2cc4d767d109e7815f985bf648946ba072198977102e32afc9fa04f7825a6de83a831874f6b6675ba0c1d0743ade2dc2d53d
"@eslint/js@npm:8.53.0":
version: 8.53.0
resolution: "@eslint/js@npm:8.53.0"
checksum: a372d55aa2bbe0d9399acc8de3c892dcfe507fd914d29fde6826ae54a13452619be626aa7eb70b1ec4d4da5302b6ed8e8ac9bf1f830003f15c0ad56c30b4f520
languageName: node
linkType: hard

Expand Down Expand Up @@ -10992,14 +10981,14 @@ __metadata:
languageName: node
linkType: hard

"eslint-config-prettier@npm:^8.10.0":
version: 8.10.0
resolution: "eslint-config-prettier@npm:8.10.0"
"eslint-config-prettier@npm:^9.0.0":
version: 9.0.0
resolution: "eslint-config-prettier@npm:9.0.0"
peerDependencies:
eslint: ">=7.0.0"
bin:
eslint-config-prettier: bin/cli.js
checksum: 0a51ab1417cbf80fabcf7a406960a142663539c8140fdb0a187b78f3d708b9d137a62a4bc4e689150e290b667750ddabd1740a516623b0cb4adb6cc1962cfe2c
checksum: 276b0b5b5b19066962a9ff3a16a553bdad28e1c0a2ea33a1d75d65c0428bb7b37f6e85ac111ebefcc9bdefb544385856dbe6eaeda5279c639e5549c113d27dda
languageName: node
linkType: hard

Expand Down Expand Up @@ -11114,18 +11103,22 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.1
resolution: "eslint-plugin-prettier@npm:4.2.1"
"eslint-plugin-prettier@npm:^5.0.1":
version: 5.0.1
resolution: "eslint-plugin-prettier@npm:5.0.1"
dependencies:
prettier-linter-helpers: "npm:^1.0.0"
synckit: "npm:^0.8.5"
peerDependencies:
eslint: ">=7.28.0"
prettier: ">=2.0.0"
"@types/eslint": ">=8.0.0"
eslint: ">=8.0.0"
prettier: ">=3.0.0"
peerDependenciesMeta:
"@types/eslint":
optional: true
eslint-config-prettier:
optional: true
checksum: d387f85dd1bfcb6bc6b794845fee6afb9ebb2375653de6bcde6e615892fb97f85121a7c012a4651b181fc09953bdf54c9bc70cab7ad297019d89ae87dd007e28
checksum: 1a43dcca90f61fde0167347e0e870b579835ba6b9d697a862c29c76097a7bb0e8f07a7cf88be33517ca11203d9d4aa335d794c377640c2fe5acd06871db67d34
languageName: node
linkType: hard

Expand Down Expand Up @@ -11247,14 +11240,14 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:^8.52.0":
version: 8.52.0
resolution: "eslint@npm:8.52.0"
"eslint@npm:^8.53.0":
version: 8.53.0
resolution: "eslint@npm:8.53.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.2.0"
"@eslint-community/regexpp": "npm:^4.6.1"
"@eslint/eslintrc": "npm:^2.1.2"
"@eslint/js": "npm:8.52.0"
"@eslint/eslintrc": "npm:^2.1.3"
"@eslint/js": "npm:8.53.0"
"@humanwhocodes/config-array": "npm:^0.11.13"
"@humanwhocodes/module-importer": "npm:^1.0.1"
"@nodelib/fs.walk": "npm:^1.2.8"
Expand Down Expand Up @@ -11291,7 +11284,7 @@ __metadata:
text-table: "npm:^0.2.0"
bin:
eslint: bin/eslint.js
checksum: 01784ab15351d749bc95446039ed7acd5124f7cc84acdbf98c7199272eae06212a8f3ea4a9b47e7cc54ab17ca094c3a664bbfc3002c7de27936220e278b5028a
checksum: e305a71ce2b9a8631b293266fe53e346c76f28bc8d004af33f10e537cf133db1fb87af3599376e70ed6e0f89a78be10c4f08ddd0c1c9c0c497cd143b4a270420
languageName: node
linkType: hard

Expand Down Expand Up @@ -17815,16 +17808,16 @@ __metadata:
languageName: node
linkType: hard

"prettier-plugin-tailwindcss@npm:^0.2.6":
version: 0.2.8
resolution: "prettier-plugin-tailwindcss@npm:0.2.8"
"prettier-plugin-tailwindcss@npm:^0.5.6":
version: 0.5.6
resolution: "prettier-plugin-tailwindcss@npm:0.5.6"
peerDependencies:
"@ianvs/prettier-plugin-sort-imports": "*"
"@prettier/plugin-pug": "*"
"@shopify/prettier-plugin-liquid": "*"
"@shufo/prettier-plugin-blade": "*"
"@trivago/prettier-plugin-sort-imports": "*"
prettier: ">=2.2.0"
prettier: ^3.0
prettier-plugin-astro: "*"
prettier-plugin-css-order: "*"
prettier-plugin-import-sort: "*"
Expand All @@ -17833,7 +17826,6 @@ __metadata:
prettier-plugin-organize-imports: "*"
prettier-plugin-style-order: "*"
prettier-plugin-svelte: "*"
prettier-plugin-twig-melody: "*"
peerDependenciesMeta:
"@ianvs/prettier-plugin-sort-imports":
optional: true
Expand All @@ -17853,6 +17845,8 @@ __metadata:
optional: true
prettier-plugin-jsdoc:
optional: true
prettier-plugin-marko:
optional: true
prettier-plugin-organize-attributes:
optional: true
prettier-plugin-organize-imports:
Expand All @@ -17863,11 +17857,11 @@ __metadata:
optional: true
prettier-plugin-twig-melody:
optional: true
checksum: 308f90082504aab4579a028eb7e9c6f56fed460e0ddcf2da9b9185ebff831274711ad6dacaf842963cf635e5bfb7743ab013aa0a2233eacc9c5ad5c6cdfd2b8c
checksum: 95c9f736b8b170c42101e8a97b938a48a909281135d17d4b7ddefca1891fa9f3dc596f4fdde0c4cea10828545ce89241ec8e4879c093f1a8192b98dad08f08d5
languageName: node
linkType: hard

"prettier@npm:^2.8.0, prettier@npm:^2.8.8":
"prettier@npm:^2.8.0":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
bin:
Expand All @@ -17876,6 +17870,15 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.0.3":
version: 3.0.3
resolution: "prettier@npm:3.0.3"
bin:
prettier: bin/prettier.cjs
checksum: ccf1ead9794b017be6b42d0873f459070beef2069eb393c8b4c0d11aa3430acefc54f6d5f44a5b7ce9af05ad8daf694b912f0aa2808d1c22dfa86e61e9d563f8
languageName: node
linkType: hard

"pretty-error@npm:^4.0.0":
version: 4.0.0
resolution: "pretty-error@npm:4.0.0"
Expand Down

0 comments on commit 946d962

Please sign in to comment.