线错误:无法读取未定义的属性(读取'lashershortcircuit')

问题描述 投票:0回答:1

npm run lint


TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit') Occurred while linting /path-to-project/cdk/bin/cdk.ts at Object.create (/path-to-project/node_modules/eslint/lib/rules/no-unused-expressions.js:75:13) at create (/path-to-project/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:28:32) ...
我已经尝试了:

重新安装所有节点模块(RM -RF node_modules && npm install)

使用兼容版本安装了所有相关软件包(@typecript-eslint/eslint-plugin,eslint及其配置) 有人对可能导致此问题的原因有什么建议,或者如何进一步调试?

  • ESLINT.CONFIG.MJS
  • // ref: https://typescript-eslint.io/getting-started/ import eslint from '@eslint/js'; import tseslint from 'typescript-eslint'; export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, { ignores: ['node_modules/', 'dist/', 'cdk.out/', 'build/'], });

提前感谢您的帮助!

我有同样的问题。 trone this:
npm update eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser

然后
typescript eslint typescript-eslint
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.