Skip to content

Chapter 13: Linter setup steps are outdated; cause circular reference issues #1137

@turkycat

Description

@turkycat

Issue:
Running next lint as suggested by in chapter 13 produces circular dependency issues caused by outdated configurations installed by next lint.

This version of the tool produces an .eslintrc.json file which is out of date with eslint 9^

{
  "extends": [
    "next/core-web-vitals",
    "next/typescript"
  ]
}

running pnpm lint after setting it up results in:

$ pnpm lint

> @ lint /home/turkycat/scratch/nextjs/learn/nextjs-dashboard
> next lint

Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'configs' -> object with constructor 'Object'
    |     property 'flat' -> object with constructor 'Object'
    |     ...
    |     property 'plugins' -> object with constructor 'Object'
    --- property 'react' closes the circle
Referenced from: /<path-to>/nextjs/learn/nextjs-dashboard/.eslintrc.json

Resolved by:
following setup in this path https://nextjs.org/docs/app/api-reference/config/eslint

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