Skip to content

Commit 8fad546

Browse files
committed
Remove "Open tslint.json" which doesn't work with VSCode + use existing
error code otherwise tslint code fix will not work with VSCode.
1 parent be2ea8d commit 8fad546

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tslint-language-service",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "tslint - language services",
55
"main": "out/src/index.js",
66
"author": "Angelo ZERR",

src/index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ if (!isTsLint4) {
4343
return semver.satisfies(version, ">= 4.0.0 || >= 4.0.0-dev");
4444
}*/
4545

46-
const TSLINT_ERROR_CODE = 6999;
46+
//TODO we "steal"" an error code with a registered code fix. 2515 = implement inherited abstract class
47+
const TSLINT_ERROR_CODE = 2515;
4748

4849
function init(modules: { typescript: typeof ts_module }) {
4950
const ts = modules.typescript;
@@ -256,15 +257,18 @@ function init(modules: { typescript: typeof ts_module }) {
256257
}
257258
}
258259
// Add "Go to rule definition" tslint.json codefix
259-
if (configCache && configCache.configFilePath) {
260+
/* Comment this codefix, because it doesn't work with VSCode because textChanges is empty.
261+
Hope one day https://github.com/angelozerr/tslint-language-service/issues/4 will be supported.
262+
263+
if (configCache && configCache.configFilePath) {
260264
prior.push({
261265
description: `Open tslint.json`,
262266
changes: [{
263267
fileName: configCache.configFilePath,
264268
textChanges: []
265269
}]
266270
});
267-
}
271+
}*/
268272
return prior;
269273
};
270274
return proxy;

0 commit comments

Comments
 (0)