@graphql-eslint/eslint-plugin 3.0.0 → 3.0.1-alpha-8123ea2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/index.js +2 -4
- package/index.mjs +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
@@ -189,10 +189,10 @@ See [docs/deprecated-rules.md](docs/deprecated-rules.md).
|
|
189
189
|
<!-- prettier-ignore-start -->
|
190
190
|
|Name|Description|
|
191
191
|
|:-:|-|
|
192
|
-
|[`schema-recommended`](packages/plugin/src/configs/schema-recommended.ts)|enables
|
193
|
-
|[`
|
194
|
-
|[`
|
195
|
-
|[`operations-all`](packages/plugin/src/configs/operations-all.ts)|enables all rules|
|
192
|
+
|[`schema-recommended`](packages/plugin/src/configs/schema-recommended.ts)|enables recommended rules for schema (SDL) development|
|
193
|
+
|[`schema-all`](packages/plugin/src/configs/schema-all.ts)|enables all rules for schema (SDL) development, except for those that require `parserOptions.operations` option|
|
194
|
+
|[`operations-recommended`](packages/plugin/src/configs/operations-recommended.ts) |enables recommended rules for consuming GraphQL (operations) development|
|
195
|
+
|[`operations-all`](packages/plugin/src/configs/operations-all.ts)|enables all rules for consuming GraphQL (operations) development|
|
196
196
|
<!-- prettier-ignore-end -->
|
197
197
|
|
198
198
|
> If you are in a project that develops the GraphQL schema, you'll need `schema` rules.
|
package/index.js
CHANGED
@@ -2041,13 +2041,11 @@ const rule$b = {
|
|
2041
2041
|
}
|
2042
2042
|
const selector = [
|
2043
2043
|
`:matches(${graphql.Kind.OBJECT_TYPE_DEFINITION}, ${graphql.Kind.OBJECT_TYPE_EXTENSION})[name.value=${mutationType.name}]`,
|
2044
|
-
|
2045
|
-
graphql.Kind.FIELD_DEFINITION,
|
2046
|
-
graphql.Kind.NAMED_TYPE,
|
2044
|
+
`> ${graphql.Kind.FIELD_DEFINITION} > .gqlType ${graphql.Kind.NAME}`,
|
2047
2045
|
].join(' ');
|
2048
2046
|
return {
|
2049
2047
|
[selector](node) {
|
2050
|
-
const typeName = node.
|
2048
|
+
const typeName = node.value;
|
2051
2049
|
const graphQLType = schema.getType(typeName);
|
2052
2050
|
if (graphql.isScalarType(graphQLType)) {
|
2053
2051
|
context.report({
|
package/index.mjs
CHANGED
@@ -2035,13 +2035,11 @@ const rule$b = {
|
|
2035
2035
|
}
|
2036
2036
|
const selector = [
|
2037
2037
|
`:matches(${Kind.OBJECT_TYPE_DEFINITION}, ${Kind.OBJECT_TYPE_EXTENSION})[name.value=${mutationType.name}]`,
|
2038
|
-
|
2039
|
-
Kind.FIELD_DEFINITION,
|
2040
|
-
Kind.NAMED_TYPE,
|
2038
|
+
`> ${Kind.FIELD_DEFINITION} > .gqlType ${Kind.NAME}`,
|
2041
2039
|
].join(' ');
|
2042
2040
|
return {
|
2043
2041
|
[selector](node) {
|
2044
|
-
const typeName = node.
|
2042
|
+
const typeName = node.value;
|
2045
2043
|
const graphQLType = schema.getType(typeName);
|
2046
2044
|
if (isScalarType(graphQLType)) {
|
2047
2045
|
context.report({
|
package/package.json
CHANGED