@typescript-eslint/rule-tester 8.47.1-alpha.7 → 8.47.1-alpha.8
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/dist/RuleTester.js +4 -22
- package/package.json +4 -4
package/dist/RuleTester.js
CHANGED
|
@@ -179,28 +179,10 @@ class RuleTester extends TestFramework_1.TestFramework {
|
|
|
179
179
|
}
|
|
180
180
|
let linterForBasePath = this.#lintersByBasePath.get(basePath);
|
|
181
181
|
if (!linterForBasePath) {
|
|
182
|
-
linterForBasePath = (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
});
|
|
187
|
-
// This nonsense is a workaround for https://github.com/jestjs/jest/issues/14840
|
|
188
|
-
// see also https://github.com/typescript-eslint/typescript-eslint/issues/8942
|
|
189
|
-
//
|
|
190
|
-
// For some reason rethrowing exceptions skirts around the circular JSON error.
|
|
191
|
-
const oldVerify = linter.verify.bind(linter);
|
|
192
|
-
linter.verify = (...args) => {
|
|
193
|
-
try {
|
|
194
|
-
return oldVerify(...args);
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
throw new Error('Caught an error while linting', {
|
|
198
|
-
cause: error,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
return linter;
|
|
203
|
-
})();
|
|
182
|
+
linterForBasePath = new ts_eslint_1.Linter({
|
|
183
|
+
configType: 'flat',
|
|
184
|
+
cwd: basePath,
|
|
185
|
+
});
|
|
204
186
|
this.#lintersByBasePath.set(basePath, linterForBasePath);
|
|
205
187
|
}
|
|
206
188
|
return linterForBasePath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/rule-tester",
|
|
3
|
-
"version": "8.47.1-alpha.
|
|
3
|
+
"version": "8.47.1-alpha.8",
|
|
4
4
|
"description": "Tooling to test ESLint rules",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/parser": "8.47.1-alpha.
|
|
48
|
-
"@typescript-eslint/typescript-estree": "8.47.1-alpha.
|
|
49
|
-
"@typescript-eslint/utils": "8.47.1-alpha.
|
|
47
|
+
"@typescript-eslint/parser": "8.47.1-alpha.8",
|
|
48
|
+
"@typescript-eslint/typescript-estree": "8.47.1-alpha.8",
|
|
49
|
+
"@typescript-eslint/utils": "8.47.1-alpha.8",
|
|
50
50
|
"ajv": "^6.12.6",
|
|
51
51
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
|
52
52
|
"lodash.merge": "4.6.2",
|