@tsslint/core 1.0.3 → 1.0.4
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 +3 -21
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -9,7 +9,6 @@ function createLinter(ctx, config, withStack) {
|
|
|
9
9
|
const ts = ctx.typescript;
|
|
10
10
|
const fileFixes = new Map();
|
|
11
11
|
const sourceFiles = new Map();
|
|
12
|
-
const configSourceFile = ts.createSourceFile(ctx.configFile, ts.sys.readFile(ctx.configFile) ?? '', ts.ScriptTarget.Latest, true);
|
|
13
12
|
const plugins = (config.plugins ?? []).map(plugin => plugin(ctx));
|
|
14
13
|
let rules = { ...config.rules };
|
|
15
14
|
for (const plugin of plugins) {
|
|
@@ -80,26 +79,9 @@ function createLinter(ctx, config, withStack) {
|
|
|
80
79
|
: ErrorStackParser.parse(new Error());
|
|
81
80
|
if (typeof traceOffset === 'number') {
|
|
82
81
|
const baseOffset = 2 + traceOffset;
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
pushRelatedInformation(error, stacks[i]);
|
|
86
|
-
}
|
|
82
|
+
if (stacks.length > baseOffset) {
|
|
83
|
+
pushRelatedInformation(error, stacks[baseOffset]);
|
|
87
84
|
}
|
|
88
|
-
else {
|
|
89
|
-
if (stacks.length > baseOffset) {
|
|
90
|
-
pushRelatedInformation(error, stacks[baseOffset]);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (withStack) {
|
|
95
|
-
error.relatedInformation?.push({
|
|
96
|
-
category: ts.DiagnosticCategory.Message,
|
|
97
|
-
code: 0,
|
|
98
|
-
file: configSourceFile,
|
|
99
|
-
start: 0,
|
|
100
|
-
length: 0,
|
|
101
|
-
messageText: 'TSSLint configuration file',
|
|
102
|
-
});
|
|
103
85
|
}
|
|
104
86
|
}
|
|
105
87
|
result.push(error);
|
|
@@ -152,7 +134,7 @@ function createLinter(ctx, config, withStack) {
|
|
|
152
134
|
file: stackFile,
|
|
153
135
|
start: pos,
|
|
154
136
|
length: 0,
|
|
155
|
-
messageText: '
|
|
137
|
+
messageText: ' at ' + stack.functionName,
|
|
156
138
|
});
|
|
157
139
|
}
|
|
158
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsslint/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"source-map-support": "^0.5.21"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@tsslint/config": "1.0.
|
|
19
|
+
"@tsslint/config": "1.0.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "97aa785e584757ed01f65a5bd838c468b0240788"
|
|
22
22
|
}
|