@typescript-eslint/utils 8.53.2-alpha.5 → 8.53.2-alpha.6

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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "FlatESLint", { enumerable: true, get: function (
6
6
  var FlatESLint_2 = require("./eslint/FlatESLint");
7
7
  Object.defineProperty(exports, "ESLint", { enumerable: true, get: function () { return FlatESLint_2.FlatESLint; } });
8
8
  var LegacyESLint_1 = require("./eslint/LegacyESLint");
9
- // TODO(eslint@v10) - remove this in the next major
9
+ // TODO(typescript-eslint@v9) - remove this in the next major release
10
10
  /**
11
11
  * @deprecated - use ESLint instead
12
12
  */
@@ -1,14 +1,19 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.FlatESLint = void 0;
4
7
  /* eslint-disable @typescript-eslint/no-namespace */
5
- const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk");
8
+ const eslint_1 = require("eslint");
9
+ const use_at_your_own_risk_1 = __importDefault(require("eslint/use-at-your-own-risk"));
6
10
  /**
7
11
  * The ESLint class is the primary class to use in Node.js applications.
8
12
  * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
9
13
  *
10
14
  * If you want to lint code on browsers, use the Linter class instead.
11
15
  */
12
- class FlatESLint extends use_at_your_own_risk_1.FlatESLint {
16
+ class FlatESLint extends (use_at_your_own_risk_1.default.FlatESLint ??
17
+ eslint_1.ESLint) {
13
18
  }
14
19
  exports.FlatESLint = FlatESLint;
@@ -1,14 +1,36 @@
1
1
  "use strict";
2
2
  /* eslint-disable @typescript-eslint/no-namespace */
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
4
7
  exports.LegacyESLint = void 0;
5
- const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk");
8
+ const eslint_1 = require("eslint");
9
+ const use_at_your_own_risk_1 = __importDefault(require("eslint/use-at-your-own-risk"));
10
+ function throwMissingLegacyESLintError() {
11
+ throw new Error('LegacyESLint is not available with the current version of ESLint.');
12
+ }
13
+ /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
14
+ class MissingLegacyESLint {
15
+ static configType = 'eslintrc';
16
+ static version = eslint_1.ESLint.version;
17
+ constructor() {
18
+ throwMissingLegacyESLintError();
19
+ }
20
+ static getErrorResults() {
21
+ throwMissingLegacyESLintError();
22
+ }
23
+ static outputFixes() {
24
+ throwMissingLegacyESLintError();
25
+ }
26
+ }
6
27
  /**
7
28
  * The ESLint class is the primary class to use in Node.js applications.
8
29
  * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
9
30
  *
10
31
  * If you want to lint code on browsers, use the Linter class instead.
11
32
  */
12
- class LegacyESLint extends use_at_your_own_risk_1.LegacyESLint {
33
+ class LegacyESLint extends (use_at_your_own_risk_1.default.LegacyESLint ??
34
+ MissingLegacyESLint) {
13
35
  }
14
36
  exports.LegacyESLint = LegacyESLint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/utils",
3
- "version": "8.53.2-alpha.5",
3
+ "version": "8.53.2-alpha.6",
4
4
  "description": "Utilities for working with TypeScript + ESLint together",
5
5
  "files": [
6
6
  "dist",
@@ -62,9 +62,9 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@eslint-community/eslint-utils": "^4.9.1",
65
- "@typescript-eslint/scope-manager": "8.53.2-alpha.5",
66
- "@typescript-eslint/types": "8.53.2-alpha.5",
67
- "@typescript-eslint/typescript-estree": "8.53.2-alpha.5"
65
+ "@typescript-eslint/scope-manager": "8.53.2-alpha.6",
66
+ "@typescript-eslint/types": "8.53.2-alpha.6",
67
+ "@typescript-eslint/typescript-estree": "8.53.2-alpha.6"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "eslint": "^8.57.0 || ^9.0.0",