vite-plugin-checker icon indicating copy to clipboard operation
vite-plugin-checker copied to clipboard

Please create a VSCode problemMatcher to show all findings in Problems panel

Open eyalw opened this issue 3 years ago • 4 comments

Please create a VSCode problemMatcher to show all findings in Problems panel

CleanShot 2022-01-18 at 11 12 19@2x

eyalw avatar Jan 18 '22 21:01 eyalw

So the following can work, except that we need some pattern to indicate START and END of compilation of both the Typescript and ESLINT. e.g.

checking files...
// outputting warning/errors here..........
// ......
check finished!

VSCode Tasks file:

{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Vite Dev Watch",
      "type": "shell",
      "command": "task dev",
      // "command": "./fakeErrors.sh",
      "presentation": {
        "echo": true,
        "reveal": "always",
        "revealProblems": "onProblem",
        "focus": false,
        "showReuseMessage": true,
        "clear": true,
        "panel": "dedicated"
      },
      "problemMatcher": [
        {
          "owner": "typescript",
          "source": "Typescript",
          "fileLocation": "absolute",
          "applyTo": "allDocuments",
          "background": {
            "activeOnStart": true
            // "beginsPattern": "sd",
            // "endsPattern": " > "
          },
          "pattern": [
            {
              "regexp": "(ERROR|WARNING)\\(TypeScript\\)  (.*)",
              "severity": 1,
              "message": 2
            },
            {
              "regexp": "^ FILE  (.*):(\\d*):(\\d*)$",
              "file": 1,
              "line": 2,
              "column": 3
            }
          ]
        },
        {
          "owner": "eslint",
          "source": "ESLint",
          "fileLocation": "absolute",
          "applyTo": "allDocuments",
          "background": {
            "activeOnStart": true
            // "beginsPattern": "sd",
            // "endsPattern": " > "
          },
          "pattern": [
            {
              "regexp": "^ (ERROR|WARNING)\\(ESLint\\)  (.*)$",
              "severity": 1,
              "message": 2
            },
            {
              "regexp": "^ FILE  (.*):(\\d*):(\\d*)$",
              "file": 1,
              "line": 2,
              "column": 3
            }
          ]
        }
      ]
    },
    {
      "label": "Watch: GraphQL Code Generator",
      "type": "npm",
      "script": "codegen:watch",
      "group": "build",
      "problemMatcher": ["$tsc"]
    }
  ]
}

eyalw avatar Jan 18 '22 22:01 eyalw

I'm working on 0.4.x to show all problems in UI view at the same time (almost done!). And the overlay UI is rewritten with Svelte so we can make it more powerful, such as foldable like react-query. So the priority of the enhancement might not be high.

fi3ework avatar Feb 02 '22 14:02 fi3ework

Any update on this?

Ridermansb avatar Feb 22 '23 22:02 Ridermansb