Skip to content

Commit

Permalink
fix(deps)!: update prettier to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Jul 11, 2023
1 parent 214411f commit 4724464
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 41 deletions.
3 changes: 0 additions & 3 deletions .prettierrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/no-extraneous-dependencies
export { default } from '@foray1010/prettier-config'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lerna": "7.1.1",
"lint-staged": "13.2.3",
"node-notifier": "10.0.1",
"prettier": "2.8.8",
"prettier": "3.0.0",
"remark-cli": "11.0.0",
"stylelint": "15.10.1",
"typescript": "5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eslint-plugin-jest": "^27.1.3",
"eslint-plugin-jest-dom": "^5.0.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
Expand All @@ -50,7 +50,7 @@
"peerDependencies": {
"@testing-library/dom": "^9.0.0",
"eslint": "^8.38.0",
"prettier": "^2.0.0",
"prettier": "^3.0.0",
"typescript": "^5.0.2"
},
"peerDependenciesMeta": {
Expand Down
11 changes: 11 additions & 0 deletions packages/eslint-config/types/eslint-plugins.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,14 @@ declare module 'eslint-plugin-*' {
}
>
}

declare module 'eslint-plugin-prettier' {
import type { Linter } from 'eslint'

export const configs: Record<
string,
{
readonly rules: Linter.RulesRecord
}
>
}
6 changes: 2 additions & 4 deletions packages/prettier-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

1. `yarn add -DE @foray1010/prettier-config prettier`

1. Create an `.prettierrc.cjs` in the project root
1. Create an `.prettierrc.mjs` in the project root

```js
'use strict'

module.exports = require('@foray1010/prettier-config')
export { default } from '@foray1010/prettier-config'
```

1. Use default prettierignore via npm script
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
'use strict'

/** @type {import('prettier').Config} */
module.exports = {
pluginSearchDirs: false,
const config = {
plugins: ['prettier-plugin-packagejson'],

arrowParens: 'always',
Expand All @@ -28,3 +25,4 @@ module.exports = {
},
],
}
export default config
4 changes: 2 additions & 2 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"directory": "packages/prettier-config"
},
"license": "MIT",
"exports": "./index.cjs",
"exports": "./index.mjs",
"files": [
"**/*.{cjs,js,json,mjs}",
"*.md",
Expand All @@ -26,7 +26,7 @@
"@types/prettier": "2.7.3"
},
"peerDependencies": {
"prettier": "^2.4.0"
"prettier": "^3.0.0"
},
"engines": {
"node": "^16.14.0 || >=18.12.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"stylelint-config-css-modules": "^4.2.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-no-unsupported-browser-features": "^7.0.0",
"stylelint-prettier": "^3.0.0"
"stylelint-prettier": "^4.0.0"
},
"peerDependencies": {
"prettier": "^2.0.0",
"prettier": "^3.0.0",
"stylelint": "^15.10.0"
},
"engines": {
Expand Down
50 changes: 27 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ __metadata:
eslint-plugin-jest: ^27.1.3
eslint-plugin-jest-dom: ^5.0.0
eslint-plugin-n: ^16.0.0
eslint-plugin-prettier: ^4.0.0
eslint-plugin-prettier: ^5.0.0
eslint-plugin-react: ^7.32.2
eslint-plugin-react-hooks: ^4.2.0
eslint-plugin-simple-import-sort: ^10.0.0
Expand All @@ -1872,7 +1872,7 @@ __metadata:
peerDependencies:
"@testing-library/dom": ^9.0.0
eslint: ^8.38.0
prettier: ^2.0.0
prettier: ^3.0.0
typescript: ^5.0.2
peerDependenciesMeta:
"@testing-library/dom":
Expand Down Expand Up @@ -1900,7 +1900,7 @@ __metadata:
"@types/prettier": 2.7.3
prettier-plugin-packagejson: ^2.4.3
peerDependencies:
prettier: ^2.4.0
prettier: ^3.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -1934,9 +1934,9 @@ __metadata:
stylelint-config-css-modules: ^4.2.0
stylelint-config-standard: ^34.0.0
stylelint-no-unsupported-browser-features: ^7.0.0
stylelint-prettier: ^3.0.0
stylelint-prettier: ^4.0.0
peerDependencies:
prettier: ^2.0.0
prettier: ^3.0.0
stylelint: ^15.10.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -4456,7 +4456,7 @@ __metadata:
lerna: 7.1.1
lint-staged: 13.2.3
node-notifier: 10.0.1
prettier: 2.8.8
prettier: 3.0.0
remark-cli: 11.0.0
stylelint: 15.10.1
typescript: 5.1.6
Expand Down Expand Up @@ -5537,18 +5537,22 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.0.0":
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 @@ -10656,12 +10660,12 @@ __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

Expand Down Expand Up @@ -12977,15 +12981,15 @@ __metadata:
languageName: node
linkType: hard

"stylelint-prettier@npm:^3.0.0":
version: 3.0.0
resolution: "stylelint-prettier@npm:3.0.0"
"stylelint-prettier@npm:^4.0.0":
version: 4.0.0
resolution: "stylelint-prettier@npm:4.0.0"
dependencies:
prettier-linter-helpers: ^1.0.0
peerDependencies:
prettier: ">=2.0.0"
stylelint: ">=14.0.0"
checksum: 094f53ef5dbe3806524db7f580b9312ceca444651803fc08c8baa48cd9a270985c709fa4f083681a685310dc347b8e55aa93d462554ba7d4ae6258a3bdf6a278
prettier: ">=3.0.0"
stylelint: ">=15.8.0"
checksum: 3e7cff833e30b1eab9ae6e82f1b0a3596fd3dd214489d71d37b0899e677ae9d50cc74c4c1bbb3b1275903f03c1401b2ca6f8c1cf2631108363d3e7845d7b6300
languageName: node
linkType: hard

Expand Down

0 comments on commit 4724464

Please sign in to comment.