Skip to content

Commit b25ce90

Browse files
authored
chore: upgrade eslint-plugin-prettier to 4.1.0 (#1098)
1 parent 29b52b0 commit b25ce90

File tree

4 files changed

+6
-28
lines changed

4 files changed

+6
-28
lines changed

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ For example, to enable the `schema-recommended` config, enable it in your `.esli
219219

220220
### `prettier` rule
221221

222-
`eslint-plugin-prettier` supports `.graphql` files. You need to do the following:
222+
`eslint-plugin-prettier` supports `.graphql` files, and `v4.1.0` supports `graphql` blocks event better. You need to do the following:
223223

224224
```js
225225
module.exports = {
@@ -236,26 +236,13 @@ module.exports = {
236236
rules: {
237237
'prettier/prettier': 'error'
238238
}
239-
},
240-
// the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily
241-
// after https://github.com/prettier/eslint-plugin-prettier/pull/415
242-
// been merged and released, it can be deleted safely
243-
{
244-
files: ['*.js/*.graphql'],
245-
rules: {
246-
'prettier/prettier': 'off'
247-
}
248239
}
249240
]
250241
}
251242
```
252243

253244
You can take [`examples/prettier`](examples/prettier/.eslintrc.js) as example.
254245

255-
It could be better to remove the unnecessary `*.js/*.graphql` override setting if <https://github.com/prettier/eslint-plugin-prettier/pull/415> will be merged and released.
256-
257-
Please help to vote up if you want to speed up the progress.
258-
259246
## Further Reading
260247

261248
If you wish to learn more about this project, how the parser works, how to add custom rules and more please refer to the below links:

examples/prettier/.eslintrc.cjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,5 @@ module.exports = {
1717
'prettier/prettier': 'error',
1818
},
1919
},
20-
// the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily
21-
// after https://github.com/prettier/eslint-plugin-prettier/pull/415
22-
// been merged and released, it can be deleted safely
23-
{
24-
files: ['*.js/*.graphql'],
25-
rules: {
26-
'prettier/prettier': 'off',
27-
},
28-
},
2920
],
3021
};

examples/prettier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@graphql-eslint/eslint-plugin": "3.10.4",
1616
"eslint": "8.17.0",
1717
"eslint-config-prettier": "8.5.0",
18-
"eslint-plugin-prettier": "4.0.0",
18+
"eslint-plugin-prettier": "4.1.0",
1919
"prettier": "2.7.0"
2020
}
2121
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,10 +3245,10 @@ [email protected]:
32453245
resolve "^1.10.1"
32463246
semver "^7.3.7"
32473247

3248-
eslint-plugin-prettier@4.0.0:
3249-
version "4.0.0"
3250-
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0"
3251-
integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==
3248+
eslint-plugin-prettier@4.1.0:
3249+
version "4.1.0"
3250+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.1.0.tgz#1cd4b3fadf3b3cdb30b1874b55e7f93f85eb43ad"
3251+
integrity sha512-A3AXIEfTnq3D5qDFjWJdQ9c4BLhw/TqhSR+6+SVaoPJBAWciFEuJiNQh275OnjRrAi7yssZzuWBRw66VG2g6UA==
32523252
dependencies:
32533253
prettier-linter-helpers "^1.0.0"
32543254

0 commit comments

Comments
 (0)