Ant Design pro i18n-remove 报错

报错日志:

* 正在执行任务: pnpm run i18n-remove

> [email protected] i18n-remove /Users/kazoottt/GitHub/KazooTTT/toolkit

> pro i18n-remove --locale=zh-CN --write

✔ 📦 load all locale file and build ts

✔ ✂️ format routes

⠋ ✂️ remove locale for src/components/Footer/index.tsx./Users/kazoottt/GitHub/KazooTTT/toolkit/node_modules/.pnpm/@[email protected]/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:175

throw new Error(message);

^

Error: .eslintrc.js » /Users/kazoottt/GitHub/KazooTTT/toolkit/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/@umijs/lint/dist/config/eslint/index.js:

Environment key "es2022" is unknown


也就是

Environment key “es2022” is unknown

这里报错了

解决方法:注释掉 extends 这里

module.exports = {
  // extends: [require.resolve('@umijs/lint/dist/config/eslint')],
  globals: {
    page: true,
    REACT_APP_ENV: true,
  },
}

参考

yarn run i18n-remove报错🐛 [BUG] · Issue #10620 · ant-design/ant-design-pro · GitHub