Skip to content

@shopify/prefer-class-properties - TypeError: Cannot read properties of undefined (reading 'type') #387

@dimaMachina

Description

@dimaMachina

Overview

Oops! Something went wrong! :(

ESLint: 8.43.0

TypeError: Cannot read properties of undefined (reading 'type')
Occurred while linting /Users/dmytro/Desktop/GUILD/graphiql/packages/graphql-language-service-server/src/MessageProcessor.ts:88
Rule: "@shopify/prefer-class-properties"
    at isSimpleLiteral (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:28:14)
    at isSimpleLiteralProperty (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:23:32)
    at Array.every (<anonymous>)
    at isSimpleLiteral (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:34:27)
    at checkConstructorThisAssignment (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:51:11)
    at Array.forEach (<anonymous>)
    at checkClassDeclaration (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:100:65)
    at ruleErrorHandler (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/eslint/lib/linter/linter.js:1050:28)
    at /Users/dmytro/Desktop/GUILD/graphiql/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)

Consuming repo

What repo were you working in when this issue occurred?

https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service-server/src/MessageProcessor.ts

Labels

  • Add the Type: Bug label to this issue.

Area

  • Add any relevant Area: <area> labels to this issue

Scope

  • Is this issue related to a specific package?

    • Tag it with the Package: @shopify/eslint-plugin label.

Checklist

  • Please delete the labels section before submitting your issue
  • I have described this issue in a way that is actionable (if possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions