VS Code 中的红色波浪线

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

我的 Visual Studio 代码编辑器总是错误地在我的代码下划线,我不知道如何停止它。

这是我的 JavaScript 的一个例子:

我尝试安装 prettier、eslint,但它没有解决这个问题。

如何阻止这些波浪线错误地显示?如果它们是正确的,我想要它们。

如果我单击问题选项卡,它会显示以下内容:

javascript reactjs visual-studio visual-studio-code editor
3个回答
3
投票

解决了!感谢zscoop98的回答,我能够找到this page,其中显示settings.json中存在一个选项

standard.enable
,将其从
true
设置为
false
后,它解决了问题,并且不再有这些烦人的红色波浪线。


2
投票

您可以在 VS Code 中卸载 ESLint 扩展来摆脱红线。您可以在 VSCode 的 extions 文件夹中搜索 ESLint 扩展


0
投票

帮我去掉 vb net 代码上的这些红线:

公开课表格1 Private Sub Button1_Click(sender As Object, e As EventArgs) 处理 Button1.Click Dim Grade As Char = txtGrade.Text

    Dim OldPrice As Double
    OldPrice = txtOldPrice.Text

    'If Double.TryParse(txtNewValue.Text, NewValuePrice) Then

    Select Case Grade
        Case "A"
            txtNewValue.Text = OldPrice * 2
            MessageBox.Show("Your New price is:R" & txtNewValue.Text)
        Case "B"
            txtNewValue.Text = OldPrice + 14 / 100
            MessageBox.Show("Your New price is:R" & txtNewValue.Text")

            Case "C"
                txtNewValue.Text = OldPrice - 8.75 / 100
                MssageBox.Show("Your New price is:R" & txtNewValue.Text)
                    
            Case  Else
                 If OldPrice <= 50 Then
                 txtnewValue.Text = OldPrice + 5
                 MessageBox.Show("Your New price is:R" & txtNewValue.Text)
              ElseIf OldPrice <= 50 Then
                 txtNewValue.Text = OldPrice - 4
                 MessageBox.Show("Your New price is:R" & txtNewValue.Text)

                End If
        'End Select


    'End If'
End Sub

下课

© www.soinside.com 2019 - 2024. All rights reserved.