Disable wavy underline in VS Code

前端 未结 5 1475
情书的邮戳
情书的邮戳 2020-12-08 00:41


I\'m using Visual Studio Code (v1.11.2).
Is there any way to disable wavy underline at all?

相关标签:
5条回答
  • 2020-12-08 01:21

    VSC Version: 1.45.1

    Solution: Disable "JavaScript ESLint Enable" for JavaScript files.

    1. Open Command Palette by 'Ctrl+Shift+P'.
    2. From Command Palette find and click: 'Preferences: Open Workspace Settings'.
    3. From 'Workspace Settings' into search field type 'javascript'. From left sidebar look for Extensions -> ESLint.
    4. Click 'ESLint' and from right look for 'ESLint: Enable'.
    5. Uncheck 'ESLint Enable'.

    0 讨论(0)
  • 2020-12-08 01:24

    To disable wavy/squiggly underline in vscode, go to preferences and set underline color to fully transparent:

    {
        "workbench.colorCustomizations": {
            "editorError.foreground":   "#00000000",
            "editorWarning.foreground": "#00000000",
            "editorInfo.foreground":    "#00000000"
        }
    }
    

    Though it may be better to make underline color just less vibrant:

    {
        "workbench.colorCustomizations": {
            "editorError.foreground":   "#ff000088",
            "editorWarning.foreground": "#ffe60033",
            "editorInfo.foreground":    "#00ff0088"
        }
    }
    
    0 讨论(0)
  • 2020-12-08 01:30

    In VSCode, those green squiggly lines mean a warning in your code. VSCode performs background code analysis(Linting) in order to provide you feedback about syntax and compilation errors.

    In your particular case it is caused because of an empty CSS ruleset (declaring a selector but no properties). You can see the warning message by hovering mouse pointer over code with the green squiggly line underneath.

    You can disable the wavyline by disabling linting for CSS.

    Go to File --> Preferences --> Settings and then place following line in Settings.json

    "css.validate": false
    

    Alternatively you can also change default behavior of empty ruleset which is "css.lint.emptyRules": "warning" to ignore There are also options to disable validating HTML and JavaScript code.

    0 讨论(0)
  • 2020-12-08 01:32

    Disable wavy underline in VS Code in C on mac

    1. Press command+shift+p (open command pallete)
    2. Then type Disable Error Squiggles
    3. And click on that Disable Error Squiggles

    Your squiggles are no more

    If you want to restart squiggles for some reason then in command pallete type Enable Error Squiggles

    0 讨论(0)
  • 2020-12-08 01:39

    Scenario: VScode 1.35.1 with installed extension "StandardJS - JavaScript Standard Style".

    1. The extension in javascript files: underlines some code, checks for indent spaces, etc.

    2. How to stop javascript code style validation ?

    Solution: Disable "JavaScript Standard Style" for JavaScript files.

    1. Open Command Palette by 'Ctrl+Shift+P'.

    2. From Command Palette find and click: 'Preferences: Open Workspace Settings'.

    3. From 'Workspace Settings' into search field type 'javascript'. From left sidebar look for Extensions -> JavaScript Standard Style.

    4. Click 'JavaScript Standard Style' and from right look for 'Standard: Enable'.

    5. Uncheck 'Standard Enable'.

    0 讨论(0)
提交回复
热议问题