Skip to content

Commit c7c3496

Browse files
committed
Adds fork-ts-checker matcher w/ & w/o eslint
Adds warnings to ts-webpack & ts-webpack-watch
1 parent 09d7a65 commit c7c3496

File tree

3 files changed

+122
-33
lines changed

3 files changed

+122
-33
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.1.0]
8+
9+
### Added
10+
11+
- Adds new **\$ts-checker-webpack** and **\$ts-checker-webpack-watch** problem matchers to support errors and warnings reported by the [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin)
12+
- Adds new **\$ts-checker-eslint-webpack** and **\$ts-checker-eslint-webpack-watch** problem matchers to support errors and warnings reported by [ESLint](https://eslint.org/) via the [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin)
13+
- Adds warning support to **\$ts-webpack** and **\$ts-webpack-watch**
14+
715
## [0.0.4]
816

917
### Added
@@ -20,7 +28,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2028

2129
### Fixed
2230

23-
- Fixes issue **$ts-webpack-watch** not handling absolute paths properly — Watch out for 🐛[Microsoft/vscode#56721](https://github.com/Microsoft/vscode/issues/56721) if you are basing a problem matcher on another
31+
- Fixes issue **\$ts-webpack-watch** not handling absolute paths properly — Watch out for 🐛[Microsoft/vscode#56721](https://github.com/Microsoft/vscode/issues/56721) if you are basing a problem matcher on another
2432
- Fixes issues with multi-root folders and tslint warnings
2533
- Fixes some issues with errors overlapping with language services
2634

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# TypeScript + Webpack Problem Matchers for Visual Studio Code
1+
# TypeScript + Webpack Problem Matchers for VS Code
22

3-
Provides [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_processing-task-output-with-problem-matchers) for use with TypeScript projects using [Webpack](https://webpack.js.org/) with [ts-loader](https://github.com/TypeStrong/ts-loader) and/or [tslint-loader](https://github.com/wbuchwalter/tslint-loader).
3+
Provides [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_processing-task-output-with-problem-matchers) for use with TypeScript projects using [Webpack](https://webpack.js.org/) with [ts-loader](https://github.com/TypeStrong/ts-loader), [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) with or without [ESLint](https://eslint.org/), and/or [tslint-loader](https://github.com/wbuchwalter/tslint-loader).
44

55
## Features
66

77
Provides the following problem matchers:
88

9-
- **$ts-webpack** — adds errors reported by ts-loader
10-
- **$tslint-webpack** — adds lint warnings reported by tslint-loader
11-
- **$ts-webpack-watch** — adds errors reported by ts-loader while in watch mode
12-
- **$tslint-webpack-watch** — adds lint warnings reported by tslint-loader while in watch mode
9+
- **\$ts-webpack** — adds errors and warnings reported by ts-loader
10+
- **\$ts-webpack-watch** — adds errors and warnings reported by ts-loader while in watch mode
11+
- **\$ts-checker-webpack** — adds errors and warnings reported by the fork-ts-checker-webpack-plugin
12+
- **\$ts-checker-webpack-watch** — adds errors and warnings reported by the fork-ts-checker-webpack-plugin while in watch mode
13+
- **\$ts-checker-eslint-webpack** — adds errors and warnings reported by the fork-ts-checker-webpack-plugin with ESLint
14+
- **\$ts-checker-eslint-webpack-watch** — adds errors and warnings reported by the fork-ts-checker-webpack-plugin with ESLint while in watch mode
15+
- **\$tslint-webpack** — adds lint warnings reported by tslint-loader
16+
- **\$tslint-webpack-watch** — adds lint warnings reported by tslint-loader while in watch mode
1317

1418
## Usage
1519

@@ -36,9 +40,9 @@ The following example shows how to add problem matchers to your project:
3640
}
3741
```
3842

39-
👉 In order for **$ts-webpack-watch** and **$tslint-webpack-watch** to work properly, you must add `--info-verbosity verbose` to your webpack watch command e.g. `webpack --watch --env.development --info-verbosity verbose` as this instructs webpack to output lifecycle event messages for each re-compile
43+
👉 In order for **\$ts-webpack-watch**, **\$ts-checker-webpack-watch**, **\$ts-checker-eslint-webpack-watch** and **\$tslint-webpack-watch** to work properly, you must add `--info-verbosity verbose` to your webpack watch command e.g. `webpack --watch --env.development --info-verbosity verbose` as this instructs webpack to output lifecycle event messages for each re-compile
4044

41-
You can also use **$ts-webpack-watch** and **$tslint-webpack-watch** as a base problem matcher for your own custom needs:
45+
You can also use any of the problem matchers as a base problem matcher for your own custom needs:
4246

4347
```json
4448
{

package.json

Lines changed: 101 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "tsl-problem-matcher",
33
"displayName": "TypeScript + Webpack Problem Matchers",
4-
"description": "Provides problem matchers for TypeScript projects using Webpack with ts-loader and/or tslint-loader",
5-
"version": "0.0.4",
4+
"description": "Provides problem matchers for TypeScript projects using Webpack with ts-loader, fork-ts-checker-webpack-plugin with or without eslint, and/or tslint-loader",
5+
"version": "0.1.0",
66
"author": {
77
"name": "Eric Amodio",
88
"email": "eamodio@gmail.com"
@@ -42,20 +42,113 @@
4242
"severity": "error",
4343
"pattern": [
4444
{
45-
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
46-
"file": 1,
47-
"line": 2,
48-
"column": 3
45+
"regexp": "\\[tsl\\] (ERROR|WARNING) in (.*)?\\((\\d+),(\\d+)\\)",
46+
"severity": 1,
47+
"file": 2,
48+
"line": 3,
49+
"column": 4
4950
},
5051
{
5152
"regexp": "\\s*TS\\d+:\\s*(.*)",
5253
"message": 1
5354
}
5455
]
5556
},
57+
{
58+
"base": "$ts-webpack",
59+
"name": "ts-webpack-watch",
60+
"label": "TypeScript + Webpack Watch Problem Matcher (ts-loader)",
61+
"applyTo": "closedDocuments",
62+
"fileLocation": "absolute",
63+
"background": {
64+
"activeOnStart": true,
65+
"beginsPattern": {
66+
"regexp": "Compilation (.*?)starting…"
67+
},
68+
"endsPattern": {
69+
"regexp": "Compilation (.*?)finished"
70+
}
71+
}
72+
},
73+
{
74+
"name": "ts-checker-webpack",
75+
"label": "TypeScript + Webpack Problem Matcher (ts-loader + fork-ts-checker-webpack-plugin)",
76+
"owner": "typescript",
77+
"source": "ts",
78+
"applyTo": "closedDocuments",
79+
"fileLocation": "absolute",
80+
"severity": "error",
81+
"pattern": [
82+
{
83+
"regexp": "(ERROR|WARNING) in (.*)?\\((\\d+),(\\d+)\\)",
84+
"severity": 1,
85+
"file": 2,
86+
"line": 3,
87+
"column": 4
88+
},
89+
{
90+
"regexp": "\\s*TS\\d+:\\s*(.*)",
91+
"message": 1
92+
}
93+
]
94+
},
95+
{
96+
"base": "$ts-checker-webpack",
97+
"name": "ts-checker-webpack-watch",
98+
"label": "TypeScript + Webpack Watch Problem Matcher (ts-loader + fork-ts-checker-webpack-plugin)",
99+
"applyTo": "closedDocuments",
100+
"fileLocation": "absolute",
101+
"background": {
102+
"activeOnStart": true,
103+
"beginsPattern": {
104+
"regexp": "Compilation (.*?)starting…"
105+
},
106+
"endsPattern": {
107+
"regexp": "Compilation (.*?)finished"
108+
}
109+
}
110+
},
111+
{
112+
"name": "ts-checker-eslint-webpack",
113+
"label": "TypeScript + Webpack ESLint Problem Matcher (ts-loader + fork-ts-checker-webpack-plugin w/ eslint)",
114+
"owner": "typescript",
115+
"source": "eslint",
116+
"applyTo": "closedDocuments",
117+
"fileLocation": "absolute",
118+
"severity": "warning",
119+
"pattern": [
120+
{
121+
"regexp": "(ERROR|WARNING) in (.*)?\\((\\d+),(\\d+)\\)",
122+
"severity": 1,
123+
"file": 2,
124+
"line": 3,
125+
"column": 4
126+
},
127+
{
128+
"regexp": "\\s*(?:@typscript-eslint/)?.+?:\\s*(.*)",
129+
"message": 1
130+
}
131+
]
132+
},
133+
{
134+
"base": "$ts-checker-eslint-webpack",
135+
"name": "ts-checker-eslint-webpack-watch",
136+
"label": "TypeScript + Webpack ESLint Watch Problem Matcher (ts-loader + fork-ts-checker-webpack-plugin w/ eslint)",
137+
"applyTo": "closedDocuments",
138+
"fileLocation": "absolute",
139+
"background": {
140+
"activeOnStart": true,
141+
"beginsPattern": {
142+
"regexp": "Compilation (.*?)starting…"
143+
},
144+
"endsPattern": {
145+
"regexp": "Compilation (.*?)finished"
146+
}
147+
}
148+
},
56149
{
57150
"name": "tslint-webpack",
58-
"label": "TypeScript + Webpack Lint Problem Matcher (tslint-loader)",
151+
"label": "TypeScript + Webpack TSLint Problem Matcher (tslint-loader)",
59152
"owner": "typescript",
60153
"source": "tslint",
61154
"applyTo": "closedDocuments",
@@ -81,26 +174,10 @@
81174
}
82175
]
83176
},
84-
{
85-
"base": "$ts-webpack",
86-
"name": "ts-webpack-watch",
87-
"label": "TypeScript + Webpack Watch Problem Matcher (ts-loader)",
88-
"applyTo": "closedDocuments",
89-
"fileLocation": "absolute",
90-
"background": {
91-
"activeOnStart": true,
92-
"beginsPattern": {
93-
"regexp": "Compilation (.*?)starting…"
94-
},
95-
"endsPattern": {
96-
"regexp": "Compilation (.*?)finished"
97-
}
98-
}
99-
},
100177
{
101178
"base": "$tslint-webpack",
102179
"name": "tslint-webpack-watch",
103-
"label": "TypeScript + Webpack Lint Watch Problem Matcher (tslint-loader)",
180+
"label": "TypeScript + Webpack TSLint Watch Problem Matcher (tslint-loader)",
104181
"applyTo": "closedDocuments",
105182
"fileLocation": [
106183
"relative",

0 commit comments

Comments
 (0)