@angular-eslint/template-parser 18.1.1-alpha.1 → 18.1.1-alpha.2
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.convertNodeSourceSpanToLoc = convertNodeSourceSpanToLoc;
|
|
4
|
+
exports.convertElementSourceSpanToLoc = convertElementSourceSpanToLoc;
|
|
4
5
|
const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
|
|
5
6
|
function convertNodeSourceSpanToLoc(sourceSpan) {
|
|
6
7
|
return {
|
|
@@ -14,7 +15,6 @@ function convertNodeSourceSpanToLoc(sourceSpan) {
|
|
|
14
15
|
},
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
exports.convertNodeSourceSpanToLoc = convertNodeSourceSpanToLoc;
|
|
18
18
|
function convertElementSourceSpanToLoc(context, node) {
|
|
19
19
|
if (node.type !== 'Element$1') {
|
|
20
20
|
// We explicitly throw an exception since this function should not be used
|
|
@@ -32,7 +32,6 @@ function convertElementSourceSpanToLoc(context, node) {
|
|
|
32
32
|
}
|
|
33
33
|
return convertNodeSourceSpanToLoc(node.sourceSpan);
|
|
34
34
|
}
|
|
35
|
-
exports.convertElementSourceSpanToLoc = convertElementSourceSpanToLoc;
|
|
36
35
|
function tryToFindTheVoidNodeThatMatchesTheSourceSpan(context, node) {
|
|
37
36
|
// Previously, `codelyzer` used `TemplateParser` to parse a template into an AST tree.
|
|
38
37
|
// The `TemplateParser` used `HtmlParser`, because `HtmlParser` still sets the end span
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.meta = exports.version = exports.
|
|
3
|
+
exports.meta = exports.version = exports.TemplateParseError = void 0;
|
|
4
|
+
exports.createTemplateParseError = createTemplateParseError;
|
|
5
|
+
exports.parseForESLint = parseForESLint;
|
|
6
|
+
exports.parse = parse;
|
|
4
7
|
const bundled_angular_compiler_1 = require("@angular-eslint/bundled-angular-compiler");
|
|
5
8
|
const eslint_scope_1 = require("eslint-scope");
|
|
6
9
|
const convert_source_span_to_loc_1 = require("./convert-source-span-to-loc");
|
|
@@ -181,7 +184,6 @@ function createTemplateParseError(parseError) {
|
|
|
181
184
|
const column = parseError.span.start.col + 1;
|
|
182
185
|
return new TemplateParseError(message, fileName, index, lineNumber, column);
|
|
183
186
|
}
|
|
184
|
-
exports.createTemplateParseError = createTemplateParseError;
|
|
185
187
|
function parseForESLint(code, options) {
|
|
186
188
|
const angularCompilerResult = (0, bundled_angular_compiler_1.parseTemplate)(code, options.filePath, {
|
|
187
189
|
preserveWhitespaces: true,
|
|
@@ -233,11 +235,9 @@ function parseForESLint(code, options) {
|
|
|
233
235
|
},
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
|
-
exports.parseForESLint = parseForESLint;
|
|
237
238
|
function parse(code, options) {
|
|
238
239
|
return parseForESLint(code, options).ast;
|
|
239
240
|
}
|
|
240
|
-
exports.parse = parse;
|
|
241
241
|
// NOTE - we cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
|
|
242
242
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
243
243
|
exports.version = require('../package.json').version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/template-parser",
|
|
3
|
-
"version": "18.1.1-alpha.
|
|
3
|
+
"version": "18.1.1-alpha.2",
|
|
4
4
|
"description": "Angular Template parser for ESLint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.
|
|
21
|
+
"@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.2",
|
|
22
22
|
"eslint-scope": "^8.0.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|