Skip to content

Project script lint fails #2257

@comatory

Description

@comatory

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    For example, you can start off by editng the
    'basic' example on Stackblitz.

    Please make sure the graphql-eslint version under package.json matches yours.

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

Running pnpm lint on local machine fails with an error:

> eslint --ignore-path .gitignore --cache .

Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

Oops! Something went wrong! :(

ESLint: 8.57.0

Error: Error while loading rule '@typescript-eslint/prefer-optional-chain': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
[...]

To Reproduce Steps to reproduce the behavior:

  1. Pulling repository and checking out at 02208cc0f058691aaddbb89b75a6c8db29775335 (this was latest main branch for me)

  2. Install dependencies with pnpm i

  3. Run pnpm lint

Expected behavior

No error, run the linter succesfully.

Environment:

  • OS: macOS
  • @graphql-eslint/eslint-plugin: N/A
  • Node.js: 20.11.0

Additional context

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