Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint plugin doesn't work in the editor #6558

Closed
maksimr opened this issue Nov 4, 2021 · 7 comments
Closed

ESLint plugin doesn't work in the editor #6558

maksimr opened this issue Nov 4, 2021 · 7 comments
Labels
feature: vscode-extension Having to do with VS Code extensions. team: IDE type: question reporter has a general question

Comments

@maksimr
Copy link

maksimr commented Nov 4, 2021

Bug description

ESLint plugin doesn't show problems in the editor

Steps to reproduce

ER: Editor show the lint problem
AR: No errors

Workspace affected

No response

Expected behavior

Editor shows the lint problem

Example repository

https://github.com/maksimr/uikit

Anything else?

Selected editor is the latest Visual Studio Code

ESLint plugin v2.1.20
Error lens plugin v3.4.0
ESLint npm package used in the project 8.1.0

image

If run lint using terminal, all works fine

image

On desktop version of VSCode all works fine in the example project

Settings:

{
  "workbench.colorTheme": "Default Dark+",
  "workbench.iconTheme": "vs-seti",
  "workbench.activityBar.visible": false,
  "zenMode.centerLayout": false,
  "zenMode.fullScreen": true,
  "editor.fontSize": 24,
  "editor.lineNumbers": "off",
  "editor.minimap.enabled": false,
  "editor.wordBasedSuggestions": true,
  "editor.tabSize": 2,
  "editor.fontLigatures": true,
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  "editor.formatOnSave": true,
  "editor.suggestSelection": "first",
  "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
  "editor.multiCursorModifier": "ctrlCmd",
  "terminal.integrated.fontSize": 22,
  "terminal.integrated.gpuAcceleration": "canvas",
  "javascript.suggest.autoImports": true,
  "javascript.format.insertSpaceBeforeFunctionParenthesis": false,
  "javascript.format.semicolons": "insert",
  "javascript.suggest.completeFunctionCalls": true,
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
  "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "typescript.tsserver.experimental.enableProjectDiagnostics": true,
  "typescript.referencesCodeLens.enabled": true,
  "quokka.suppressExpirationNotifications": true,
  "quokka.suppressGlyphMarginNotifications": true,
  "errorLens.enabledDiagnosticLevels": [
    "error",
    "warning",
    "info",
    "hint"
  ],
  "prettier.singleQuote": true,
  "prettier.trailingComma": "none",
  "prettier.jsxSingleQuote": true,
  "gitlens.codeLens.enabled": false,
  "gitlens.currentLine.enabled": false,
  "git.autofetch": true,
  "git.confirmSync": false,
  "git.enableSmartCommit": true,
  "calva.enableJSCompletions": true,
  "redhat.telemetry.enabled": true,
  "vim.easymotion": true,
  "vim.handleKeys": {
    "<C-d>": true,
  },
  "vim.leader": ",",
  "vim.insertModeKeyBindings": [
    {
      "before": [
        "j",
        "k"
      ],
      "after": [
        "<Esc>"
      ]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [
        "<leader>",
        "f"
      ],
      "commands": [
        "workbench.action.findInFiles"
      ]
    },
    {
      "before": [
        "<leader>",
        "b"
      ],
      "commands": [
        "editor.debug.action.toggleBreakpoint"
      ]
    }
  ]
}
@akosyakov
Copy link
Member

I think eslint has some kind of trust mode in new versions. So you should click on eslint status bar entry and allow it execution of code from workspace. Maybe it can be configured to be always on per user.

@akosyakov akosyakov added feature: vscode-extension Having to do with VS Code extensions. team: IDE type: question reporter has a general question labels Nov 4, 2021
@maksimr
Copy link
Author

maksimr commented Nov 4, 2021

@akosyakov Hm... interesting. Before I saw modal dialogue with such kind of text and yup after accept it worked. But now no dialogue and if click on "ESLint" in bottom status bar it open output panel so I don't see where to enable it.

image

@hm2075
Copy link

hm2075 commented Nov 4, 2021

might be something to do with this

neoclide/coc-eslint#117

i struggled with v8 too so I just dropped back to version 7

@maksimr
Copy link
Author

maksimr commented Nov 4, 2021

@hm2075 looks like you are right. I guess that ESLint version from open vsx is out of date. Visual studio marketplace contains ESLint plugin with latest version 2.2.2 and on open vsx only 2.1.20. This is explaining why it works on desktop version of VSCode which have the latest version of ESLint

microsoft/vscode-eslint#1042

@maksimr maksimr closed this as completed Nov 4, 2021
@akosyakov
Copy link
Member

Thanks for discovering it. We are working on better testing and updates for major extensions.

@akosyakov
Copy link
Member

Could you try again please? It should be fixed.

@maksimr
Copy link
Author

maksimr commented Nov 9, 2021

@akosyakov works perfectly now! Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: vscode-extension Having to do with VS Code extensions. team: IDE type: question reporter has a general question
Projects
None yet
Development

No branches or pull requests

3 participants