@graphql-eslint/eslint-plugin 3.14.0-alpha-20221220231958-65e0a4a → 3.14.0-alpha-20221221130615-24bd69e
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/index.js +4 -1
- package/index.mjs +4 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1267,6 +1267,7 @@ const rule$2 = {
|
|
1267
1267
|
};
|
1268
1268
|
|
1269
1269
|
const RULE_ID$1 = 'lone-executable-definition';
|
1270
|
+
const definitionTypes = ['fragment', 'query', 'mutation', 'subscription'];
|
1270
1271
|
const schema$3 = {
|
1271
1272
|
type: 'array',
|
1272
1273
|
maxItems: 1,
|
@@ -1279,7 +1280,7 @@ const schema$3 = {
|
|
1279
1280
|
...ARRAY_DEFAULT_OPTIONS,
|
1280
1281
|
maxItems: 3,
|
1281
1282
|
items: {
|
1282
|
-
enum:
|
1283
|
+
enum: definitionTypes,
|
1283
1284
|
},
|
1284
1285
|
description: 'Allow certain definitions to be placed alongside others.',
|
1285
1286
|
},
|
@@ -4905,7 +4906,9 @@ class GraphQLRuleTester extends eslint.RuleTester {
|
|
4905
4906
|
messageForSnapshot.push('#### 🔧 Autofix output', indentCode(printCode(output)));
|
4906
4907
|
}
|
4907
4908
|
}
|
4909
|
+
// @ts-expect-error -- we should import `vitest` but somebody could use globals from `jest`
|
4908
4910
|
it(name || `Invalid #${idx + 1}`, () => {
|
4911
|
+
// @ts-expect-error -- ^ same
|
4909
4912
|
expect(messageForSnapshot.join('\n\n')).toMatchSnapshot();
|
4910
4913
|
});
|
4911
4914
|
}
|
package/index.mjs
CHANGED
@@ -1261,6 +1261,7 @@ const rule$2 = {
|
|
1261
1261
|
};
|
1262
1262
|
|
1263
1263
|
const RULE_ID$1 = 'lone-executable-definition';
|
1264
|
+
const definitionTypes = ['fragment', 'query', 'mutation', 'subscription'];
|
1264
1265
|
const schema$3 = {
|
1265
1266
|
type: 'array',
|
1266
1267
|
maxItems: 1,
|
@@ -1273,7 +1274,7 @@ const schema$3 = {
|
|
1273
1274
|
...ARRAY_DEFAULT_OPTIONS,
|
1274
1275
|
maxItems: 3,
|
1275
1276
|
items: {
|
1276
|
-
enum:
|
1277
|
+
enum: definitionTypes,
|
1277
1278
|
},
|
1278
1279
|
description: 'Allow certain definitions to be placed alongside others.',
|
1279
1280
|
},
|
@@ -4899,7 +4900,9 @@ class GraphQLRuleTester extends RuleTester {
|
|
4899
4900
|
messageForSnapshot.push('#### 🔧 Autofix output', indentCode(printCode(output)));
|
4900
4901
|
}
|
4901
4902
|
}
|
4903
|
+
// @ts-expect-error -- we should import `vitest` but somebody could use globals from `jest`
|
4902
4904
|
it(name || `Invalid #${idx + 1}`, () => {
|
4905
|
+
// @ts-expect-error -- ^ same
|
4903
4906
|
expect(messageForSnapshot.join('\n\n')).toMatchSnapshot();
|
4904
4907
|
});
|
4905
4908
|
}
|
package/package.json
CHANGED