@tsslint/typescript-plugin 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -12
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -36,14 +36,12 @@ function decorateLanguageService(ts, tsconfig, info) {
|
|
|
36
36
|
if (configFileDiagnostics.length) {
|
|
37
37
|
const sourceFile = info.languageService.getProgram()?.getSourceFile(fileName);
|
|
38
38
|
if (sourceFile) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})));
|
|
46
|
-
}
|
|
39
|
+
result = result.concat(configFileDiagnostics.map(diagnostic => ({
|
|
40
|
+
...diagnostic,
|
|
41
|
+
file: sourceFile,
|
|
42
|
+
start: 0,
|
|
43
|
+
length: 0,
|
|
44
|
+
})));
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
if (linter) {
|
|
@@ -162,21 +160,23 @@ function decorateLanguageService(ts, tsconfig, info) {
|
|
|
162
160
|
category,
|
|
163
161
|
source: 'tsslint',
|
|
164
162
|
code: 0,
|
|
165
|
-
messageText:
|
|
163
|
+
messageText: `Failed to build/load TSSLint config. (${error.text})`,
|
|
166
164
|
file: jsonConfigFile,
|
|
167
165
|
start: configOptionSpan.start,
|
|
168
166
|
length: configOptionSpan.length,
|
|
169
167
|
};
|
|
170
168
|
if (error.location) {
|
|
171
|
-
const fileName = path.resolve(error.location.file);
|
|
169
|
+
const fileName = path.resolve(error.location.file).replace('http-url:', '');
|
|
172
170
|
const fileText = ts.sys.readFile(error.location.file);
|
|
173
|
-
const sourceFile =
|
|
171
|
+
const sourceFile = fileText !== undefined
|
|
172
|
+
? ts.createSourceFile(fileName, fileText, ts.ScriptTarget.Latest, true)
|
|
173
|
+
: undefined;
|
|
174
174
|
diag.relatedInformation = [{
|
|
175
175
|
category,
|
|
176
176
|
code: error.id,
|
|
177
177
|
messageText: error.text,
|
|
178
178
|
file: sourceFile,
|
|
179
|
-
start: sourceFile
|
|
179
|
+
start: sourceFile?.getPositionOfLineAndCharacter(error.location.line - 1, error.location.column),
|
|
180
180
|
length: error.location.lineText.length,
|
|
181
181
|
}];
|
|
182
182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsslint/typescript-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"directory": "packages/typescript-plugin"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@tsslint/core": "1.0.
|
|
15
|
+
"@tsslint/core": "1.0.18"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@tsslint/config": "1.0.
|
|
18
|
+
"@tsslint/config": "1.0.18"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "95545c63940a9b57651c785cf4d730d6c3d22b99"
|
|
21
21
|
}
|