Skip to content

Commit 32438f8

Browse files
committed
update changesets
1 parent a69f0be commit 32438f8

File tree

7 files changed

+64
-19
lines changed

7 files changed

+64
-19
lines changed

.changeset/chatty-shoes-hunt.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,38 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5-
feat: split `recommended` config to two configs `schema-recommended` and `operations-recommended`
5+
❗ BREAKING CHANGE ❗
66

7-
`recommended` and `all` configs were divided to 4 configs `schema-recommended`
8-
, `operations-recommended`, `schema-all` and `operations-all`. This was done in order to
9-
use `recommended` and `all` configs in `schema-only` projects where it is not possible to provide operations.
7+
Split `recommended` config to 2 modes: "schema" and "operations".
8+
9+
> This was done in order to use `recommended` and `all` configs in `schema-only` projects where it is not possible to provide operations.
10+
11+
`recommended` and `all` configs were divided to 4 configs:
12+
* `schema-recommended` - enables recommended rules for schema (SDL) development.
13+
* `schema-all` - enables all recommended rules for schema (SDL) development.
14+
* `operations-recommended` - enables recommended rules for consuming GraphQL (operations) development.
15+
* `operations-all` - enables all rules for consuming GraphQL (operations) development.
16+
17+
If you are migrating from v2 where `recommended` was introdued, please change the following:
18+
19+
```yaml
20+
{
21+
"overrides": [
22+
{
23+
"files": ["*.js"],
24+
"processor": "@graphql-eslint/graphql"
25+
},
26+
{
27+
"files": ["*.graphql"],
28+
- "extends": "plugin:@graphql-eslint/schema",
29+
+ "extends": "plugin:@graphql-eslint/schema-recommended"
30+
}
31+
]
32+
}
33+
```
34+
35+
> If you are in a project that develops the GraphQL schema, you'll need `schema` rules.
36+
37+
> If you are in a project that develops GraphQL operations (query/mutation/subscription), you'll need `operations` rules.
38+
39+
> If you are in a monorepo project, you probably need both sets of rules.

.changeset/polite-pillows-pump.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5-
feat: `description-style` now have default description style `block`
5+
❗ BREAKING CHANGE ❗
6+
7+
feat: `description-style` now have default description style `block`.

.changeset/tame-geese-lick.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5-
feat: remove `query` option in `no-root-type` as it's impossible to have write-only schema
5+
❗ BREAKING CHANGE ❗
6+
7+
feat: remove `query` option in `no-root-type` as it's impossible to have write-only schema.

.changeset/thick-dancers-jump.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5-
feat: rename `avoid` prefix in rules to `no`, remove `avoid-operation-name-prefix`
6-
and `no-operation-name-suffix`
5+
❗ BREAKING CHANGE ❗
76

8-
All rules that had a `avoid` prefix now have a `no` prefix. Rules `avoid-operation-name-prefix`
9-
and `no-operation-name-suffix` were removed because the same things can be validated
10-
by `naming-convention` rule.
7+
- rename `avoid` prefix in rules to `no`.
8+
- remove `avoid-operation-name-prefix` and `no-operation-name-suffix`
119

12-
Before
10+
All rules that had a `avoid` prefix now have a `no` prefix.
11+
12+
Rules `avoid-operation-name-prefix` and `no-operation-name-suffix` were removed because the same things can be validated by `naming-convention` rule.
13+
14+
### Before
1315

1416
```json
1517
{
@@ -23,7 +25,7 @@ Before
2325
}
2426
```
2527

26-
After
28+
### After
2729

2830
```json
2931
{

.changeset/three-shoes-relax.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5+
❗ BREAKING CHANGE ❗
6+
57
feat: add new options for `naming-convention` rule
68

79
Options for `naming-convention` are changed. New option `types` includes the following kinds:
@@ -19,10 +21,9 @@ Added new options:
1921
- `DirectiveDefinition`
2022
- `VariableDefinition`
2123

22-
Option `QueryDefinition` was removed in favor of `AST` specific
23-
selector `FieldDefinition[parent.name.value=Query]`.
24+
Option `QueryDefinition` was removed in favor of `AST` specific selector `FieldDefinition[parent.name.value=Query]`.
2425

25-
Before
26+
### Before
2627

2728
```json
2829
{
@@ -47,7 +48,7 @@ Before
4748
}
4849
```
4950

50-
After
51+
### After
5152

5253
```json
5354
{

.changeset/twenty-bottles-care.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
'@graphql-eslint/eslint-plugin': major
33
---
44

5+
❗ BREAKING CHANGE ❗
6+
57
feat: add new options for `require-description` rule
68

79
Options for `require-description` are changed. New option `types` includes the following kinds:
@@ -13,7 +15,7 @@ Options for `require-description` are changed. New option `types` includes the f
1315
- `InputObjectTypeDefinition`
1416
- `UnionTypeDefinition`
1517

16-
Before
18+
### Before
1719

1820
```json
1921
{
@@ -36,7 +38,7 @@ Before
3638
}
3739
```
3840

39-
After
41+
### After
4042

4143
```json
4244
{

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ See [docs/deprecated-rules.md](docs/deprecated-rules.md).
195195
|[`operations-all`](packages/plugin/src/configs/operations-all.ts)|enables all rules|
196196
<!-- prettier-ignore-end -->
197197

198+
> If you are in a project that develops the GraphQL schema, you'll need `schema` rules.
199+
200+
> If you are in a project that develops GraphQL operations (query/mutation/subscription), you'll need `operations` rules.
201+
202+
> If you are in a monorepo project, you probably need both sets of rules.
203+
198204
## Config usage
199205

200206
For example, to enable the `schema-recommended` config, enable it in your `.eslintrc` file with the `extends` option:

0 commit comments

Comments
 (0)