Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency prettier to v3 #6368

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"hermes-eslint": "^0.15.1",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"prettier": "^2.8.8",
"prettier": "^3.0.1",
"prettier-plugin-hermes-parser": "^0.15.1",
"typescript": "^5.1.6"
},
"packageManager": "yarn@3.6.1"
Expand Down
9 changes: 9 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@ module.exports = {
tabWidth: 2,
trailingComma: 'all',
quoteProps: 'consistent',
plugins: ['prettier-plugin-hermes-parser'],
overrides: [
{
files: ['*.js', '*.jsx', '*.flow'],
options: {
parser: 'hermes',
},
},
],
};
16 changes: 13 additions & 3 deletions src/abacus-kochka/pages/_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@
font-family: 'GidoleKochka';
font-style: normal;
font-weight: 400;
src: local('Gidole'), url('/fonts/Gidole-Regular-subset.ttf') format('truetype');
src:
local('Gidole'),
url('/fonts/Gidole-Regular-subset.ttf') format('truetype');

/* All characters from: "KOCHKA CAFÉ®" */
unicode-range: /*K*/ U+4B, /*O*/ U+4F, /*C*/ U+43, /*H*/ U+48, /*A*/ U+41, /* */ U+20, /*F*/ U+46,
/*É*/ U+C9, /*®*/ U+AE;
unicode-range: /*K*/
U+4B,
/*O*/ U+4F,
/*C*/ U+43,
/*H*/ U+48,
/*A*/ U+41,
/* */ U+20,
/*F*/ U+46,
/*É*/ U+C9,
/*®*/ U+AE;
}

html,
Expand Down
5 changes: 3 additions & 2 deletions src/eslint-config-adeira/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-monorepo": "^0.3.2",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-relay": "^1.8.3",
"eslint-plugin-sx": "^0.14.0",
"eslint-plugin-testing-library": "^5.11.1",
"prettier": "^2.8.8"
"prettier": "^3.0.1",
"prettier-plugin-hermes-parser": "^0.15.1"
},
"devDependencies": {
"deep-diff": "^1.0.2",
Expand Down
9 changes: 9 additions & 0 deletions src/eslint-config-adeira/src/getCommonConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ module.exports = function getCommonConfig(
tabWidth: 2,
trailingComma: 'all',
quoteProps: 'consistent',
plugins: ['prettier-plugin-hermes-parser'],
overrides: [
{
files: ['*.js', '*.jsx', '*.flow'],
options: {
parser: 'hermes',
},
},
],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@svgr/plugin-jsx": "^8.0.1",
"@svgr/plugin-svgo": "^8.0.1",
"change-case": "^4.1.2",
"prettier": "^2.8.8"
"prettier": "^3.0.0"
},
"peerDependencies": {
"react": "^18.2.0"
Expand Down
10 changes: 5 additions & 5 deletions src/mrtnzlml-meta/docs/relay/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ The following error is being thrown otherwise:

In return the following code is being generated:

<!-- prettier-ignore-start -->
```js
module.exports.validate = function validate(
value /*: {
module.exports.validate = function validate(value/*: {
+__id: string,
+$fragmentSpreads: Location$fragmentType,
+__typename: string,
...
}*/,
) /*: {
}*/)/*: {
+__id: string,
+$fragmentSpreads: Location$fragmentType,
+__typename: "Location",
...
} | false*/ {
return value.__typename === 'Location' ? (value /*: any*/) : false;
mrtnzlml marked this conversation as resolved.
Show resolved Hide resolved
return value.__typename === 'Location' ? (value/*: any*/) : false;
};
```
<!-- prettier-ignore-end -->

I am not sure about the use-cases yet.

Expand Down
2 changes: 1 addition & 1 deletion src/sx-jest-snapshot-serializer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@adeira/sx": "^0.29.1",
"@babel/runtime": "^7.22.10",
"prettier": "^2.8.8",
"prettier": "^3.0.1",
"pretty-format": "^29.6.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/sx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const styles = sx.create({
});
```

This makes it very predictable and easy to use. Always call `className={styles('red', 'blue')}` instead of `` className={`${styles('red')} ${styles('blue')}`} ``! This is very important because the first call guarantees to resolve the CSS precedence correctly as opposed to the second call which does not and might behave unpredictably.
This makes it very predictable and easy to use. Always call `className={styles('red', 'blue')}` instead of ``className={`${styles('red')} ${styles('blue')}`}``! This is very important because the first call guarantees to resolve the CSS precedence correctly as opposed to the second call which does not and might behave unpredictably.

It works similarly for shorthand CSS properties (however, try to avoid them - see below):

Expand Down
2 changes: 1 addition & 1 deletion src/sx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"fast-levenshtein": "^3.0.0",
"json-stable-stringify": "^1.0.2",
"mdn-data": "^2.0.32",
"prettier": "^2.8.8"
"prettier": "^3.0.0"
},
"peerDependencies": {
"react": "^18.2.0"
Expand Down
4 changes: 3 additions & 1 deletion src/typescript-test/src/app/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0);
transition: background 200ms, border 200ms;
transition:
background 200ms,
border 200ms;
}

.card span {
Expand Down
62 changes: 45 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,16 @@ __metadata:
eslint-plugin-jsx-a11y: ^6.7.1
eslint-plugin-monorepo: ^0.3.2
eslint-plugin-n: ^16.0.1
eslint-plugin-prettier: ^4.2.1
eslint-plugin-prettier: ^5.0.0
eslint-plugin-promise: ^6.1.1
eslint-plugin-react: ^7.33.1
eslint-plugin-react-hooks: ^4.6.0
eslint-plugin-react-native: ^4.0.0
eslint-plugin-relay: ^1.8.3
eslint-plugin-sx: ^0.14.0
eslint-plugin-testing-library: ^5.11.1
prettier: ^2.8.8
prettier: ^3.0.1
prettier-plugin-hermes-parser: ^0.15.1
snapshot-diff: ^0.10.0
peerDependencies:
eslint: ">=8.47.0"
Expand Down Expand Up @@ -253,7 +254,7 @@ __metadata:
"@svgr/plugin-jsx": ^8.0.1
"@svgr/plugin-svgo": ^8.0.1
change-case: ^4.1.2
prettier: ^2.8.8
prettier: ^3.0.0
peerDependencies:
react: ^18.2.0
languageName: unknown
Expand Down Expand Up @@ -503,7 +504,7 @@ __metadata:
"@adeira/sx": ^0.29.1
"@babel/runtime": ^7.22.10
"@testing-library/react": ^13.4.0
prettier: ^2.8.8
prettier: ^3.0.1
pretty-format: ^29.6.2
react-test-renderer: ^18.2.0
languageName: unknown
Expand All @@ -525,7 +526,7 @@ __metadata:
fast-levenshtein: ^3.0.0
json-stable-stringify: ^1.0.2
mdn-data: ^2.0.32
prettier: ^2.8.8
prettier: ^3.0.0
react: ^18.2.0
react-test-renderer: ^18.2.0
snapshot-diff: ^0.10.0
Expand Down Expand Up @@ -11803,18 +11804,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.0":
version: 5.0.0
resolution: "eslint-plugin-prettier@npm:5.0.0"
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: 84e88744b9050f2d5ef31b94e85294dda16f3a53c2449f9d33eac8ae6264889b459bf35a68e438fb6b329c2a1d6491aac4bfa00d86317e7009de3dad0311bec6
languageName: node
linkType: hard

Expand Down Expand Up @@ -19601,6 +19606,19 @@ __metadata:
languageName: node
linkType: hard

"prettier-plugin-hermes-parser@npm:0.15.1, prettier-plugin-hermes-parser@npm:^0.15.1":
version: 0.15.1
resolution: "prettier-plugin-hermes-parser@npm:0.15.1"
dependencies:
hermes-estree: 0.15.1
hermes-parser: 0.15.1
prettier-plugin-hermes-parser: 0.15.1
peerDependencies:
prettier: ^3.0.0 || ^2.7.1
checksum: dc95abef4099ef561c2afe10c80badda0e165f069196e90029d32b9bef1b4f36dc82a17543e739fedd37d6b57950dffafad8f69daa61fb28c358d533ac99937b
languageName: node
linkType: hard

"prettier@npm:>=2.2.1 <=2.3.0":
version: 2.3.0
resolution: "prettier@npm:2.3.0"
Expand All @@ -19610,12 +19628,21 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.8.8":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
"prettier@npm:^3.0.0":
version: 3.0.0
resolution: "prettier@npm:3.0.0"
bin:
prettier: bin-prettier.js
checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8
prettier: bin/prettier.cjs
checksum: 6a832876a1552dc58330d2467874e5a0b46b9ccbfc5d3531eb69d15684743e7f83dc9fbd202db6270446deba9c82b79d24383d09924c462b457136a759425e33
languageName: node
linkType: hard

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

Expand Down Expand Up @@ -21274,7 +21301,8 @@ __metadata:
hermes-eslint: ^0.15.1
jest: ^29.6.2
jest-environment-jsdom: ^29.6.2
prettier: ^2.8.8
prettier: ^3.0.1
prettier-plugin-hermes-parser: ^0.15.1
typescript: ^5.1.6
languageName: unknown
linkType: soft
Expand Down
Loading