Skip to content

[Bug]: 执行命令 pnpm lint => eslint 报错 #40

Closed
@HongDou666

Description

@HongDou666

软件版本

mac系统

运行环境

MacOS

运行架构

None

重现步骤

  1. pull 代码 master分支
  2. 我的系统 node v18.18.0 pnpm 9.12.2
  3. pnpm install
  4. 直接输入 pnpm lint 报错
  5. 报错信息如下eslint . --fix
    Oops! Something went wrong! :(
    ESLint: 9.21.0
    SyntaxError: Unexpected token 'with'
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14)
    at async link (node:internal/modules/esm/module_job:68:21)
     ELIFECYCLE  Command failed with exit code 2.

期望的结果是什么?

期望pnpm lint 之后 没有报错

实际的结果是什么?

eslint . --fix

Oops! Something went wrong! :(

ESLint: 9.21.0

SyntaxError: Unexpected token 'with'
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14)
at async link (node:internal/modules/esm/module_job:68:21)
 ELIFECYCLE  Command failed with exit code 2.

日志记录(可选)

1

补充说明(可选)

1

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