@graphql-eslint/eslint-plugin 3.14.4-alpha-20230107211856-2fb064a → 3.14.4-alpha-20230107211953-e852513

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,7 @@ exports.convertToken = convertToken;
40
40
  function getLexer(source) {
41
41
  // GraphQL v14
42
42
  const gqlLanguage = require('graphql/language');
43
- if (gqlLanguage && gqlLanguage.createLexer) {
43
+ if (gqlLanguage === null || gqlLanguage === void 0 ? void 0 : gqlLanguage.createLexer) {
44
44
  return gqlLanguage.createLexer(source, {});
45
45
  }
46
46
  // GraphQL v15
@@ -40,7 +40,7 @@ const rule: GraphQLESLintRule = {
40
40
  create(context) {
41
41
  return {
42
42
  OperationDefinition(node) {
43
- if (!node.name || !node.name.value) {
43
+ if (!node.name?.value) {
44
44
  context.report({
45
45
  node,
46
46
  message: 'Oops, name is required!'
@@ -36,7 +36,7 @@ export function convertToken(token, type) {
36
36
  function getLexer(source) {
37
37
  // GraphQL v14
38
38
  const gqlLanguage = require('graphql/language');
39
- if (gqlLanguage && gqlLanguage.createLexer) {
39
+ if (gqlLanguage === null || gqlLanguage === void 0 ? void 0 : gqlLanguage.createLexer) {
40
40
  return gqlLanguage.createLexer(source, {});
41
41
  }
42
42
  // GraphQL v15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.14.4-alpha-20230107211856-2fb064a",
3
+ "version": "3.14.4-alpha-20230107211953-e852513",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {