|
2 | 2 | '@graphql-eslint/eslint-plugin': major
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -feat: split `recommended` config to two configs `schema-recommended` and `operations-recommended` |
| 5 | +❗ BREAKING CHANGE ❗ |
6 | 6 |
|
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. |
0 commit comments