Skip to content

Commit

Permalink
chore: upgrade Prettier to v3
Browse files Browse the repository at this point in the history
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 committed Nov 6, 2023
1 parent 1a61ba5 commit a8ddf27
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": ^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 @@ -2642,10 +2641,10 @@ __metadata:
clsx: ^1.2.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
graphemer: ^1.4.0
Expand All @@ -2665,7 +2664,8 @@ __metadata:
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-beautiful-dnd: ^13.1.1
react-children-by-type: ^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: ^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: ^6.12.4
debug: ^4.3.2
Expand All @@ -3237,14 +3226,14 @@ __metadata:
js-yaml: ^4.1.0
minimatch: ^3.1.2
strip-json-comments: ^3.1.1
checksum: bc742a1e3b361f06fedb4afb6bf32cbd27171292ef7924f61c62f2aed73048367bcc7ac68f98c06d4245cd3fabc43270f844e3c1699936d4734b3ac5398814a7
checksum: 5c6c3878192fe0ddffa9aff08b4e2f3bcc8f1c10d6449b7295a5f58b662019896deabfc19890455ffd7e60a5bd28d25d0eaefb2f78b2d230aae3879af92b89e5
languageName: node
linkType: hard

"@eslint/js@npm:8.52.0":
version: 8.52.0
resolution: "@eslint/js@npm:8.52.0"
checksum: 490893b8091a66415f4ac98b963d23eb287264ea3bd6af7ec788f0570705cf64fd6ab84b717785980f55e39d08ff5c7fde6d8e4391ccb507169370ce3a6d091a
"@eslint/js@npm:8.53.0":
version: 8.53.0
resolution: "@eslint/js@npm:8.53.0"
checksum: e0d5cfb0000aaee237c8e6d6d6e366faa60b1ef7f928ce17778373aa44d3b886368f6d5e1f97f913f0f16801aad016db8b8df78418c9d18825c15590328028af
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: 153266badd477e49b0759816246b2132f1dbdb6c7f313ca60a9af5822fd1071c2bc5684a3720d78b725452bbac04bb130878b2513aea5e72b1b792de5a69fec8
checksum: 362e991b6cb343f79362bada2d97c202e5303e6865888918a7445c555fb75e4c078b01278e90be98aa98ae22f8597d8e93d48314bec6824f540f7efcab3ce451
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: ^1.0.0
synckit: ^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: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6
checksum: c2261033b97bafe99ccb7cc47c2fac6fa85b8bbc8b128042e52631f906b69e12afed2cdd9d7e3021cc892ee8dd4204a3574e1f32a0b718b4bb3b440944b6983b
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": ^4.2.0
"@eslint-community/regexpp": ^4.6.1
"@eslint/eslintrc": ^2.1.2
"@eslint/js": 8.52.0
"@eslint/eslintrc": ^2.1.3
"@eslint/js": 8.53.0
"@humanwhocodes/config-array": ^0.11.13
"@humanwhocodes/module-importer": ^1.0.1
"@nodelib/fs.walk": ^1.2.8
Expand Down Expand Up @@ -11291,7 +11284,7 @@ __metadata:
text-table: ^0.2.0
bin:
eslint: bin/eslint.js
checksum: fd22d1e9bd7090e31b00cbc7a3b98f3b76020a4c4641f987ae7d0c8f52e1b88c3b268bdfdabac2e1a93513e5d11339b718ff45cbff48a44c35d7e52feba510ed
checksum: 2da808655c7aa4b33f8970ba30d96b453c3071cc4d6cd60d367163430677e32ff186b65270816b662d29139283138bff81f28dddeb2e73265495245a316ed02c
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: 0c99295f1f47b4d35a3e19d88e6b1aac58a60479a4317fb3c3a6522b51f6b5a28cfd9c03545749354b01ca4f8ec3edf7ba2a34596c5cc58a7022b1d850bbe6be
checksum: ea5b18daf8727ee77eb6f10e5ceb43416aedee48350b838faae5764083dadb93edba33b84ed5c6ce606de33c875fc444ca979e669f340373fa0f0b76a5cafeac
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: e10b9af02b281f6c617362ebd2571b1d7fc9fb8a3bd17e371754428cda992e5e8d8b7a046e8f7d3e2da1dcd21aa001e2e3c797402ebb6111b5cd19609dd228e0
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 a8ddf27

Please sign in to comment.