Skip to content

Commit

Permalink
tasks.json, problemMatcher: ForkTsCheckerPlugin
Browse files Browse the repository at this point in the history
yarn add -D fork-ts-checker-webpack-plugin

tasks.json: "problemMatcher": ["$ts-checker5-webpack-watch", "$ts-checker5-eslint-webpack-watch"],
removed type: "npm", script, "test-watch"

webpack.config.js: ForkTsCheckerPlugin copied from gitlens
  • Loading branch information
FuPeiJiang committed Feb 8, 2021
1 parent 3daa2ca commit c90e0e1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 30 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.json
Expand Up @@ -15,6 +15,7 @@
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"skipFiles": ["<node_internals>/**", "**/node_modules/**", "**/resources/app/out/vs/**", "**/we've come a long way/**"],
"preLaunchTask": "${defaultBuildTask}"
},
{
Expand Down
35 changes: 9 additions & 26 deletions .vscode/tasks.json
Expand Up @@ -2,31 +2,14 @@
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": [
"$ts-webpack-watch",
],
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
"tasks": [{
"type": "npm",
"script": "watch",
"group": {
"kind": "build",
"isDefault": true
},
{
"type": "npm",
"script": "test-watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": "build"
}
]
"isBackground": true,
"problemMatcher": ["$ts-checker5-webpack-watch", "$ts-checker5-eslint-webpack-watch"],
}]
}
16 changes: 12 additions & 4 deletions build/node-extension.webpack.config.js
@@ -1,8 +1,9 @@
//@ts-check

'use strict';
'use strict'

const path = require('path');
const path = require('path')
const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin')

/**@type {import('webpack').Configuration}*/
const config = {
Expand Down Expand Up @@ -37,5 +38,12 @@ const config = {
},
],
},
};
module.exports = config;
plugins : [
new ForkTsCheckerPlugin({
async: false,
eslint: { enabled: true, files: 'src/**/*.ts', options: { cache: true } },
formatter: 'basic',
}),
],
}
module.exports = config
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -67,6 +67,7 @@
"@typescript-eslint/parser": "^4.14.2",
"eslint": "^7.19.0",
"eslint-plugin-mocha": "^8.0.0",
"fork-ts-checker-webpack-plugin": "^6.1.0",
"glob": "^7.1.6",
"mocha": "^8.2.1",
"ts-loader": "^8.0.14",
Expand Down

0 comments on commit c90e0e1

Please sign in to comment.