Jac*_*ack 4 node.js typescript eslint typescript-eslint
当我运行时eslint .出现错误:
Error: .eslintrc.js \xc2\xbb eslint-config-standard-with-typescript:\n Configuration for rule "@typescript-eslint/restrict-plus-operands" is invalid:\n Value {"skipCompoundAssignments":false} should NOT have additional properties.\nRun Code Online (Sandbox Code Playgroud)\n我在配置中禁用了“@typescript-eslint/restrict-plus-operands”规则:
\nrules: {\n ...\n '@typescript-eslint/restrict-plus-operands': 'off',\n}\nRun Code Online (Sandbox Code Playgroud)\n但它不起作用,我得到同样的错误。
\n有什么问题?
\n软件包版本:
\n"@typescript-eslint/eslint-plugin": "^5.62.0",\n"@typescript-eslint/parser": "^6.4.1",\n"eslint": "^8.48.0",\n"eslint-config-prettier": "^9.0.0",\n"eslint-config-standard-with-typescript": "^39.0.0",\n"eslint-plugin-import": "^2.28.1",\n"eslint-plugin-n": "^16.0.2",\n"eslint-plugin-prettier": "^5.0.0",\n"eslint-plugin-promise": "^6.1.1",\n"typescript": "^5.2.2",\nRun Code Online (Sandbox Code Playgroud)\n节点 v14.18.2
\nnpm v6.14.15
\nUPD
\n将“@typescript-eslint/eslint-plugin”更新到6.4.1版本后,出现了新的错误:
\n/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js:123\n withMethodDecorators ||=\n ^^^\nSyntaxError: Unexpected token '||='\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
5141 次 |
| 最近记录: |