【问题标题】:VS Code ESLint Checking for quick fixes... not workingVS Code ESLint 检查快速修复...不工作
【发布时间】:2021-08-13 03:34:51
【问题描述】:

我不确定这是否是最近的更新,但由于某种原因,我不再获得 ESLint 的快速修复。它会说“正在检查快速修复...”,但我不会显示任何内容。在 ESLint 服务器中,我可以看到可用的修复程序,但是 VS Code 中缺少该命令。

[Trace - 5:30:49 PM] Received response 'textDocument/codeAction - (13)' in 0ms.
Result: [
    {
        "title": "Disable no-unused-vars for this line",
        "command": {
            "title": "Disable no-unused-vars for this line",
            "command": "eslint.applyDisableLine",
            "arguments": [
                {
                    "uri": "file:///d%3A/Development/sfdx/insider/force-app/main/default/lwc/apexImperativeMethod/apexImperativeMethod.js",
                    "version": 14,
                    "ruleId": "no-unused-vars"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Disable no-unused-vars for the entire file",
        "command": {
            "title": "Disable no-unused-vars for the entire file",
            "command": "eslint.applyDisableFile",
            "arguments": [
                {
                    "uri": "file:///",
                    "version": 14,
                    "ruleId": "no-unused-vars"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Show documentation for no-unused-vars",
        "command": {
            "title": "Show documentation for no-unused-vars",
            "command": "eslint.openRuleDoc",
            "arguments": [
                {
                    "uri": "file:///",
                    "version": 14,
                    "ruleId": "no-unused-vars"
                }
            ]
        },
        "kind": "quickfix"
    }
]

【问题讨论】:

    标签: visual-studio-code eslint


    【解决方案1】:

    同样的事情也发生在我身上,在尝试了多种方法之后,对我有用的是干净地重新安装 Code,这意味着卸载 Code,删除扩展文件夹并安装代码,然后安装扩展。快速修复又回来了。

    【讨论】:

    • 谢谢。我也会尝试一下。
    猜你喜欢
    • 2019-09-24
    • 1970-01-01
    • 2017-12-18
    • 2019-12-12
    • 2022-12-06
    • 2020-10-23
    • 1970-01-01
    • 2022-11-28
    • 2022-11-26
    相关资源
    最近更新 更多