@angular-eslint/template-parser 17.3.1-alpha.1 → 17.3.1-alpha.3

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/index.js +6 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -155,6 +155,10 @@ function convertNgAstCommentsToTokens(comments) {
155
155
  return commentTokens.sort((a, b) => a.range[0] - b.range[0]);
156
156
  }
157
157
  class TemplateParseError extends Error {
158
+ fileName;
159
+ index;
160
+ lineNumber;
161
+ column;
158
162
  constructor(message, fileName, index, lineNumber, column) {
159
163
  super(message);
160
164
  this.fileName = fileName;
@@ -179,7 +183,6 @@ function createTemplateParseError(parseError) {
179
183
  }
180
184
  exports.createTemplateParseError = createTemplateParseError;
181
185
  function parseForESLint(code, options) {
182
- var _a, _b;
183
186
  const angularCompilerResult = (0, bundled_angular_compiler_1.parseTemplate)(code, options.filePath, {
184
187
  preserveWhitespaces: true,
185
188
  preserveLineEndings: true,
@@ -216,8 +219,8 @@ function parseForESLint(code, options) {
216
219
  };
217
220
  }
218
221
  // TODO: Stop suppressing parse errors by default in v18
219
- const suppressParseErrors = (_a = options.suppressParseErrors) !== null && _a !== void 0 ? _a : true;
220
- if (!suppressParseErrors && ((_b = angularCompilerResult.errors) === null || _b === void 0 ? void 0 : _b.length)) {
222
+ const suppressParseErrors = options.suppressParseErrors ?? true;
223
+ if (!suppressParseErrors && angularCompilerResult.errors?.length) {
221
224
  throw createTemplateParseError(angularCompilerResult.errors[0]);
222
225
  }
223
226
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/template-parser",
3
- "version": "17.3.1-alpha.1",
3
+ "version": "17.3.1-alpha.3",
4
4
  "description": "Angular Template parser for ESLint",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "LICENSE"
18
18
  ],
19
19
  "dependencies": {
20
- "@angular-eslint/bundled-angular-compiler": "17.3.1-alpha.1",
20
+ "@angular-eslint/bundled-angular-compiler": "17.3.1-alpha.3",
21
21
  "eslint-scope": "^8.0.0"
22
22
  },
23
23
  "peerDependencies": {