Skip to content

yarn create next-app --ts sets wrong eslint version #29770

@PegasisForever

Description

@PegasisForever

What example does this report relate to?

yarn create next-app --typescript

What version of Next.js are you using?

11.1.2

What version of Node.js are you using?

16.10.0

What browser are you using?

chrome 94

What operating system are you using?

Arch Linux

How are you deploying your application?

N/A

Describe the Bug

When creating a next.js project using yarn create next-app --typescript, eslint version of the project is set to 8.0.0 in package.json, however eslint-config-next depends on eslint ^7.23.0.

When running yarn lint, it errors:

yarn run v1.22.15
$ next lint
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
error - ESLint must be installed: yarn add --dev eslint
Done in 0.86s.

When creating a next.js using npx create-next-app@latest --ts, the eslint version is set correctly.

I didn't test the non-ts version.

Expected Behavior

eslint version of the project should be ^7.23.0

To Reproduce

yarn create next-app --typescript
cd project_name
yarn lint

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.examplesIssue was opened via the examples template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions