@typescript-eslint/parser 8.64.1-alpha.4 → 8.64.1-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.
Files changed (2) hide show
  1. package/dist/parser.js +11 -6
  2. package/package.json +9 -7
package/dist/parser.js CHANGED
@@ -77,15 +77,20 @@ function parseForESLint(code, parserOptions) {
77
77
  if (typeof parserOptions.ecmaFeatures !== 'object') {
78
78
  parserOptions.ecmaFeatures = {};
79
79
  }
80
- /**
81
- * Allow the user to suppress the warning from typescript-estree if they are using an unsupported
82
- * version of TypeScript
83
- */
84
- const warnOnUnsupportedTypeScriptVersion = validateBoolean(parserOptions.warnOnUnsupportedTypeScriptVersion, true);
80
+ if (parserOptions.onUnsupportedTypeScriptVersion != null &&
81
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- read for backwards compatibility
82
+ parserOptions.warnOnUnsupportedTypeScriptVersion != null) {
83
+ throw new Error('Cannot use both the `onUnsupportedTypeScriptVersion` and the deprecated `warnOnUnsupportedTypeScriptVersion` options. Please use only `onUnsupportedTypeScriptVersion`.');
84
+ }
85
+ const onUnsupportedTypeScriptVersion = parserOptions.onUnsupportedTypeScriptVersion ??
86
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- read for backwards compatibility
87
+ (validateBoolean(parserOptions.warnOnUnsupportedTypeScriptVersion, true)
88
+ ? 'warn'
89
+ : 'ignore');
85
90
  const tsestreeOptions = {
86
91
  jsx: validateBoolean(parserOptions.ecmaFeatures.jsx),
87
- ...(!warnOnUnsupportedTypeScriptVersion && { loggerFn: false }),
88
92
  ...parserOptions,
93
+ onUnsupportedTypeScriptVersion,
89
94
  // Override errorOnTypeScriptSyntacticAndSemanticIssues and set it to false to prevent use from user config
90
95
  // https://github.com/typescript-eslint/typescript-eslint/issues/8681#issuecomment-2000411834
91
96
  errorOnTypeScriptSyntacticAndSemanticIssues: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/parser",
3
- "version": "8.64.1-alpha.4",
3
+ "version": "8.64.1-alpha.6",
4
4
  "description": "An ESLint custom parser which leverages TypeScript ESTree",
5
5
  "files": [
6
6
  "dist",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "debug": "^4.4.3",
45
- "@typescript-eslint/types": "8.64.1-alpha.4",
46
- "@typescript-eslint/scope-manager": "8.64.1-alpha.4",
47
- "@typescript-eslint/typescript-estree": "8.64.1-alpha.4",
48
- "@typescript-eslint/visitor-keys": "8.64.1-alpha.4"
45
+ "@typescript-eslint/scope-manager": "8.64.1-alpha.6",
46
+ "@typescript-eslint/types": "8.64.1-alpha.6",
47
+ "@typescript-eslint/typescript-estree": "8.64.1-alpha.6",
48
+ "@typescript-eslint/visitor-keys": "8.64.1-alpha.6"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@typescript/native-preview": "7.0.0-dev.20260518.1",
@@ -69,7 +69,8 @@
69
69
  "lint": {
70
70
  "command": "eslint"
71
71
  },
72
- "typecheck:tsgo": {}
72
+ "typecheck:tsgo": {},
73
+ "attw-check": {}
73
74
  }
74
75
  },
75
76
  "scripts": {
@@ -79,6 +80,7 @@
79
80
  "lint": "pnpm -w exec nx lint",
80
81
  "test": "pnpm -w exec nx test",
81
82
  "typecheck": "pnpm -w exec nx typecheck",
82
- "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
83
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo",
84
+ "attw-check": "pnpm -w exec nx attw-check"
83
85
  }
84
86
  }