@typescript-eslint/eslint-plugin 8.64.1-alpha.6 → 8.64.1-alpha.7

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.
@@ -73,8 +73,6 @@ declare const _default: {
73
73
  '@typescript-eslint/no-redeclare': "error";
74
74
  '@typescript-eslint/no-redundant-type-constituents': "error";
75
75
  '@typescript-eslint/no-require-imports': "error";
76
- 'no-restricted-imports': "off";
77
- '@typescript-eslint/no-restricted-imports': "error";
78
76
  '@typescript-eslint/no-restricted-types': "error";
79
77
  'no-shadow': "off";
80
78
  '@typescript-eslint/no-shadow': "error";
@@ -80,8 +80,6 @@ module.exports = {
80
80
  '@typescript-eslint/no-redeclare': 'error',
81
81
  '@typescript-eslint/no-redundant-type-constituents': 'error',
82
82
  '@typescript-eslint/no-require-imports': 'error',
83
- 'no-restricted-imports': 'off',
84
- '@typescript-eslint/no-restricted-imports': 'error',
85
83
  '@typescript-eslint/no-restricted-types': 'error',
86
84
  'no-shadow': 'off',
87
85
  '@typescript-eslint/no-shadow': 'error',
@@ -93,8 +93,6 @@ exports.default = (plugin, parser) => [
93
93
  '@typescript-eslint/no-redeclare': 'error',
94
94
  '@typescript-eslint/no-redundant-type-constituents': 'error',
95
95
  '@typescript-eslint/no-require-imports': 'error',
96
- 'no-restricted-imports': 'off',
97
- '@typescript-eslint/no-restricted-imports': 'error',
98
96
  '@typescript-eslint/no-restricted-types': 'error',
99
97
  'no-shadow': 'off',
100
98
  '@typescript-eslint/no-shadow': 'error',
package/dist/index.d.ts CHANGED
@@ -75,8 +75,6 @@ declare const _default: {
75
75
  '@typescript-eslint/no-redeclare': "error";
76
76
  '@typescript-eslint/no-redundant-type-constituents': "error";
77
77
  '@typescript-eslint/no-require-imports': "error";
78
- 'no-restricted-imports': "off";
79
- '@typescript-eslint/no-restricted-imports': "error";
80
78
  '@typescript-eslint/no-restricted-types': "error";
81
79
  'no-shadow': "off";
82
80
  '@typescript-eslint/no-shadow': "error";
package/dist/index.js CHANGED
@@ -1,6 +1,53 @@
1
1
  "use strict";
2
+ /* eslint-disable import/first -- intentionally executing code before rest of the require()s. This will not work with ESM. */
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
2
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
38
  };
39
+ const ts = __importStar(require("typescript"));
40
+ const [versionMajor, _versionMinor] = ts.versionMajorMinor
41
+ .split('.')
42
+ .map(Number);
43
+ if (versionMajor >= 7) {
44
+ // eslint-disable-next-line no-console
45
+ console.error([
46
+ 'typescript-eslint does not support TS 7.0.',
47
+ 'Please see https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0 to run typescript-eslint using the TS 6 API.',
48
+ "See also https://github.com/typescript-eslint/typescript-eslint/issues/10940 for tracking typescript-eslint's support for TS >=7.1",
49
+ ].join('\n'));
50
+ throw new Error('typescript-eslint does not support TS 7.0.');
51
+ }
5
52
  const raw_plugin_1 = __importDefault(require("./raw-plugin"));
6
53
  module.exports = raw_plugin_1.default.plugin;
@@ -97,8 +97,6 @@ declare const _default: {
97
97
  '@typescript-eslint/no-redeclare': "error";
98
98
  '@typescript-eslint/no-redundant-type-constituents': "error";
99
99
  '@typescript-eslint/no-require-imports': "error";
100
- 'no-restricted-imports': "off";
101
- '@typescript-eslint/no-restricted-imports': "error";
102
100
  '@typescript-eslint/no-restricted-types': "error";
103
101
  'no-shadow': "off";
104
102
  '@typescript-eslint/no-shadow': "error";
@@ -135,6 +135,18 @@ exports.default = (0, util_1.createRule)({
135
135
  meta: {
136
136
  type: 'suggestion',
137
137
  // defaultOptions, -- base rule does not use defaultOptions
138
+ deprecated: {
139
+ deprecatedSince: '8.64.0',
140
+ replacedBy: [
141
+ {
142
+ rule: {
143
+ name: 'no-restricted-imports',
144
+ url: 'https://eslint.org/docs/latest/rules/no-restricted-imports',
145
+ },
146
+ },
147
+ ],
148
+ url: 'https://github.com/typescript-eslint/typescript-eslint/pull/12527',
149
+ },
138
150
  docs: {
139
151
  description: 'Disallow specified modules when loaded by `import`',
140
152
  extendsBaseRule: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.64.1-alpha.6",
3
+ "version": "8.64.1-alpha.7",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -49,10 +49,10 @@
49
49
  "ignore": "^7.0.5",
50
50
  "natural-compare": "^1.4.0",
51
51
  "ts-api-utils": "^2.5.0",
52
- "@typescript-eslint/scope-manager": "8.64.1-alpha.6",
53
- "@typescript-eslint/type-utils": "8.64.1-alpha.6",
54
- "@typescript-eslint/utils": "8.64.1-alpha.6",
55
- "@typescript-eslint/visitor-keys": "8.64.1-alpha.6"
52
+ "@typescript-eslint/scope-manager": "8.64.1-alpha.7",
53
+ "@typescript-eslint/utils": "8.64.1-alpha.7",
54
+ "@typescript-eslint/visitor-keys": "8.64.1-alpha.7",
55
+ "@typescript-eslint/type-utils": "8.64.1-alpha.7"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/json-schema": "^7.0.15",
@@ -76,13 +76,13 @@
76
76
  "typescript": ">=4.8.4 <6.1.0",
77
77
  "unist-util-visit": "^5.0.0",
78
78
  "vitest": "^4.0.18",
79
- "@typescript-eslint/rule-schema-to-typescript-types": "8.64.1-alpha.6",
80
- "@typescript-eslint/rule-tester": "8.64.1-alpha.6"
79
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.64.1-alpha.7",
80
+ "@typescript-eslint/rule-tester": "8.64.1-alpha.7"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
84
84
  "typescript": ">=4.8.4 <6.1.0",
85
- "@typescript-eslint/parser": "^8.64.1-alpha.6"
85
+ "@typescript-eslint/parser": "^8.64.1-alpha.7"
86
86
  },
87
87
  "funding": {
88
88
  "type": "opencollective",