astro-eslint-parser 0.4.5 → 0.6.0
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.
- package/README.md +8 -10
- package/lib/index.d.ts +345 -10
- package/lib/index.js +1744 -47
- package/lib/index.mjs +1719 -0
- package/package.json +22 -17
- package/lib/ast/astro.d.ts +0 -49
- package/lib/ast/astro.js +0 -2
- package/lib/ast/base.d.ts +0 -6
- package/lib/ast/base.js +0 -2
- package/lib/ast/index.d.ts +0 -8
- package/lib/ast/index.js +0 -18
- package/lib/ast/jsx.d.ts +0 -91
- package/lib/ast/jsx.js +0 -2
- package/lib/astro/index.d.ts +0 -56
- package/lib/astro/index.js +0 -357
- package/lib/astro-tools/index.d.ts +0 -21
- package/lib/astro-tools/index.js +0 -26
- package/lib/context/index.d.ts +0 -55
- package/lib/context/index.js +0 -158
- package/lib/context/parser-options.d.ts +0 -8
- package/lib/context/parser-options.js +0 -71
- package/lib/context/resolve-parser/espree.d.ts +0 -6
- package/lib/context/resolve-parser/espree.js +0 -41
- package/lib/context/resolve-parser/index.d.ts +0 -5
- package/lib/context/resolve-parser/index.js +0 -30
- package/lib/context/script.d.ts +0 -34
- package/lib/context/script.js +0 -178
- package/lib/debug.d.ts +0 -2
- package/lib/debug.js +0 -8
- package/lib/errors.d.ts +0 -14
- package/lib/errors.js +0 -20
- package/lib/markdown/frontmatter.d.ts +0 -9
- package/lib/markdown/frontmatter.js +0 -53
- package/lib/markdown/index.d.ts +0 -19
- package/lib/markdown/index.js +0 -60
- package/lib/markdown/mdast-util-from-markdown-service.d.ts +0 -5
- package/lib/markdown/mdast-util-from-markdown-service.js +0 -12
- package/lib/markdown/mdast-util-from-markdown-worker.d.ts +0 -2
- package/lib/markdown/mdast-util-from-markdown-worker.js +0 -8
- package/lib/markdown/process-markdown.d.ts +0 -6
- package/lib/markdown/process-markdown.js +0 -82
- package/lib/markdown/yaml.d.ts +0 -9
- package/lib/markdown/yaml.js +0 -86
- package/lib/parser/astro-parser/astrojs-compiler-service.d.ts +0 -5
- package/lib/parser/astro-parser/astrojs-compiler-service.js +0 -12
- package/lib/parser/astro-parser/astrojs-compiler-worker.d.ts +0 -1
- package/lib/parser/astro-parser/astrojs-compiler-worker.js +0 -11
- package/lib/parser/astro-parser/parse.d.ts +0 -6
- package/lib/parser/astro-parser/parse.js +0 -267
- package/lib/parser/index.d.ts +0 -21
- package/lib/parser/index.js +0 -72
- package/lib/parser/lru-cache.d.ts +0 -7
- package/lib/parser/lru-cache.js +0 -32
- package/lib/parser/process-template.d.ts +0 -7
- package/lib/parser/process-template.js +0 -381
- package/lib/parser/script.d.ts +0 -7
- package/lib/parser/script.js +0 -42
- package/lib/parser/sort.d.ts +0 -6
- package/lib/parser/sort.js +0 -15
- package/lib/parser/template.d.ts +0 -10
- package/lib/parser/template.js +0 -102
- package/lib/parser/ts-patch.d.ts +0 -8
- package/lib/parser/ts-patch.js +0 -65
- package/lib/traverse.d.ts +0 -27
- package/lib/traverse.js +0 -93
- package/lib/types.d.ts +0 -21
- package/lib/types.js +0 -2
- package/lib/visitor-keys.d.ts +0 -2
- package/lib/visitor-keys.js +0 -14
package/package.json
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-eslint-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Astro component parser for ESLint",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
+
"module": "lib/index.mjs",
|
|
6
7
|
"files": [
|
|
7
8
|
"lib"
|
|
8
9
|
],
|
|
9
10
|
"engines": {
|
|
10
|
-
"node": "^14.
|
|
11
|
+
"node": "^14.18.0 || >=16.0.0"
|
|
11
12
|
},
|
|
12
13
|
"scripts": {
|
|
13
14
|
"prebuild": "npm run -s clean",
|
|
14
|
-
"build": "
|
|
15
|
+
"build": "tsup",
|
|
15
16
|
"clean": "rimraf .nyc_output lib coverage",
|
|
16
17
|
"lint": "eslint . --ext .js,.ts,.json,.astro,.svelte",
|
|
17
18
|
"eslint-fix": "npm run lint -- --fix",
|
|
18
|
-
"test": "mocha --
|
|
19
|
+
"test": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
19
20
|
"cover": "nyc --reporter=lcov npm run test",
|
|
20
|
-
"debug": "mocha --
|
|
21
|
+
"debug": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
21
22
|
"preversion": "npm run lint && npm test",
|
|
22
|
-
"update-fixtures": "
|
|
23
|
-
"debug-parser": "ts
|
|
23
|
+
"update-fixtures": "env-cmd -e debug npm run ts -- ./tools/update-fixtures.ts",
|
|
24
|
+
"debug-parser": "npm run ts -- ./tools/parser-test.ts",
|
|
24
25
|
"eslint-playground": "eslint tests/fixtures --ext .astro --config .eslintrc-for-playground.js --format codeframe",
|
|
25
|
-
"benchmark": "ts
|
|
26
|
+
"benchmark": "npm run ts -- benchmark/index.ts",
|
|
27
|
+
"ts": "env-cmd -e basic node -r esbuild-register",
|
|
28
|
+
"mocha": "npm run ts -- ./node_modules/mocha/bin/mocha.js"
|
|
26
29
|
},
|
|
27
30
|
"repository": {
|
|
28
31
|
"type": "git",
|
|
@@ -44,15 +47,13 @@
|
|
|
44
47
|
"dependencies": {
|
|
45
48
|
"@astrojs/compiler": "0.18.0 - 0.23.0 || ^0.23.0",
|
|
46
49
|
"@typescript-eslint/types": "^5.25.0",
|
|
50
|
+
"astrojs-compiler-sync": "^0.2.0",
|
|
47
51
|
"debug": "^4.3.4",
|
|
48
52
|
"eslint-visitor-keys": "^3.0.0",
|
|
49
|
-
"espree": "^9.0.0"
|
|
50
|
-
"mdast-util-from-markdown": "^1.2.0",
|
|
51
|
-
"synckit": "^0.7.1",
|
|
52
|
-
"yaml": "^2.1.1"
|
|
53
|
+
"espree": "^9.0.0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@ota-meshi/eslint-plugin": "^0.
|
|
56
|
+
"@ota-meshi/eslint-plugin": "^0.12.0",
|
|
56
57
|
"@types/benchmark": "^2.1.1",
|
|
57
58
|
"@types/chai": "^4.3.0",
|
|
58
59
|
"@types/debug": "^4.1.7",
|
|
@@ -68,10 +69,13 @@
|
|
|
68
69
|
"benchmark": "^2.1.4",
|
|
69
70
|
"chai": "^4.3.4",
|
|
70
71
|
"code-red": "^0.2.3",
|
|
72
|
+
"env-cmd": "^10.1.0",
|
|
73
|
+
"esbuild": "^0.15.0",
|
|
74
|
+
"esbuild-register": "^3.3.3",
|
|
71
75
|
"eslint": "^8.15.0",
|
|
72
76
|
"eslint-config-prettier": "^8.3.0",
|
|
73
77
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
74
|
-
"eslint-plugin-astro": "^0.
|
|
78
|
+
"eslint-plugin-astro": "^0.17.0",
|
|
75
79
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
76
80
|
"eslint-plugin-json-schema-validator": "^4.0.0",
|
|
77
81
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
@@ -81,6 +85,7 @@
|
|
|
81
85
|
"eslint-plugin-prettier": "^4.0.0",
|
|
82
86
|
"eslint-plugin-react": "^7.29.4",
|
|
83
87
|
"eslint-plugin-regexp": "^1.5.0",
|
|
88
|
+
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
84
89
|
"eslint-plugin-svelte": "^2.0.0",
|
|
85
90
|
"estree-walker": "^3.0.0",
|
|
86
91
|
"locate-character": "^2.0.5",
|
|
@@ -89,12 +94,12 @@
|
|
|
89
94
|
"mocha-chai-jest-snapshot": "^1.1.3",
|
|
90
95
|
"nyc": "^15.1.0",
|
|
91
96
|
"prettier": "^2.0.5",
|
|
92
|
-
"prettier-plugin-astro": "^0.
|
|
97
|
+
"prettier-plugin-astro": "^0.5.0",
|
|
93
98
|
"prettier-plugin-svelte": "^2.7.0",
|
|
94
99
|
"semver": "^7.3.5",
|
|
95
100
|
"string-replace-loader": "^3.0.3",
|
|
96
101
|
"svelte": "^3.48.0",
|
|
97
|
-
"
|
|
98
|
-
"typescript": "~4.
|
|
102
|
+
"tsup": "^6.2.3",
|
|
103
|
+
"typescript": "~4.8.0"
|
|
99
104
|
}
|
|
100
105
|
}
|
package/lib/ast/astro.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { JSXAttribute, JSXElement, JSXExpression, JSXExpressionContainer, JSXFragment, JSXText } from "./jsx";
|
|
2
|
-
import type { TSESTree as ES } from "@typescript-eslint/types";
|
|
3
|
-
import type { BaseNode } from "./base";
|
|
4
|
-
export declare type AstroNode = AstroProgram | AstroFragment | AstroHTMLComment | AstroDoctype | AstroShorthandAttribute | AstroTemplateLiteralAttribute | AstroRawText;
|
|
5
|
-
export declare type AstroChild = JSXElement | JSXFragment | JSXExpression | JSXText | AstroHTMLComment | AstroRawText;
|
|
6
|
-
export declare type AstroParentNode = JSXElement | JSXFragment | AstroFragment;
|
|
7
|
-
/** Node of Astro program root */
|
|
8
|
-
export interface AstroProgram extends Omit<ES.Program, "type" | "body"> {
|
|
9
|
-
type: "Program";
|
|
10
|
-
body: (ES.Program["body"][number] | AstroFragment)[];
|
|
11
|
-
sourceType: "script" | "module";
|
|
12
|
-
comments: ES.Comment[];
|
|
13
|
-
tokens: ES.Token[];
|
|
14
|
-
parent?: undefined;
|
|
15
|
-
}
|
|
16
|
-
/** Node of Astro fragment */
|
|
17
|
-
export interface AstroFragment extends BaseNode {
|
|
18
|
-
type: "AstroFragment";
|
|
19
|
-
children: AstroChild[];
|
|
20
|
-
parent?: AstroParentNode;
|
|
21
|
-
}
|
|
22
|
-
/** Node of Astro html comment */
|
|
23
|
-
export interface AstroHTMLComment extends BaseNode {
|
|
24
|
-
type: "AstroHTMLComment";
|
|
25
|
-
value: string;
|
|
26
|
-
parent?: AstroParentNode;
|
|
27
|
-
}
|
|
28
|
-
/** Node of Astro doctype */
|
|
29
|
-
export interface AstroDoctype extends BaseNode {
|
|
30
|
-
type: "AstroDoctype";
|
|
31
|
-
parent?: AstroFragment;
|
|
32
|
-
}
|
|
33
|
-
/** Node of Astro shorthand attribute */
|
|
34
|
-
export interface AstroShorthandAttribute extends Omit<JSXAttribute, "type"> {
|
|
35
|
-
type: "AstroShorthandAttribute";
|
|
36
|
-
value: JSXExpressionContainer;
|
|
37
|
-
}
|
|
38
|
-
/** Node of Astro template-literal attribute */
|
|
39
|
-
export interface AstroTemplateLiteralAttribute extends Omit<JSXAttribute, "type"> {
|
|
40
|
-
type: "AstroTemplateLiteralAttribute";
|
|
41
|
-
value: JSXExpressionContainer & {
|
|
42
|
-
expression: ES.TemplateLiteral;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/** Node of Astro raw text */
|
|
46
|
-
export interface AstroRawText extends Omit<JSXText, "type"> {
|
|
47
|
-
type: "AstroRawText";
|
|
48
|
-
parent?: JSXElement;
|
|
49
|
-
}
|
package/lib/ast/astro.js
DELETED
package/lib/ast/base.d.ts
DELETED
package/lib/ast/base.js
DELETED
package/lib/ast/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./astro";
|
|
2
|
-
export * from "./jsx";
|
|
3
|
-
import type { TSESTree } from "@typescript-eslint/types";
|
|
4
|
-
export declare type Comment = TSESTree.Comment;
|
|
5
|
-
export declare type Token = TSESTree.Token;
|
|
6
|
-
export declare type SourceLocation = TSESTree.SourceLocation;
|
|
7
|
-
export declare type Range = TSESTree.Range;
|
|
8
|
-
export declare type Position = TSESTree.Position;
|
package/lib/ast/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./astro"), exports);
|
|
18
|
-
__exportStar(require("./jsx"), exports);
|
package/lib/ast/jsx.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { TSESTree as ES } from "@typescript-eslint/types";
|
|
2
|
-
import type { AstroFragment, AstroHTMLComment, AstroRawText, AstroShorthandAttribute, AstroTemplateLiteralAttribute } from "./astro";
|
|
3
|
-
import type { BaseNode } from "./base";
|
|
4
|
-
export declare type JSXNode = JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText;
|
|
5
|
-
export declare type JSXChild = JSXElement | JSXFragment | JSXExpression | JSXText | AstroHTMLComment | AstroRawText;
|
|
6
|
-
export declare type JSXParentNode = JSXElement | JSXFragment | AstroFragment;
|
|
7
|
-
export interface JSXElement extends BaseNode {
|
|
8
|
-
type: "JSXElement";
|
|
9
|
-
openingElement: JSXOpeningElement;
|
|
10
|
-
closingElement: JSXClosingElement | null;
|
|
11
|
-
children: JSXChild[];
|
|
12
|
-
parent?: JSXParentNode;
|
|
13
|
-
}
|
|
14
|
-
export interface JSXFragment extends BaseNode {
|
|
15
|
-
type: "JSXFragment";
|
|
16
|
-
openingFragment: JSXOpeningFragment;
|
|
17
|
-
closingFragment: JSXClosingFragment;
|
|
18
|
-
children: JSXChild[];
|
|
19
|
-
parent?: JSXParentNode;
|
|
20
|
-
}
|
|
21
|
-
export interface JSXOpeningElement extends BaseNode {
|
|
22
|
-
type: "JSXOpeningElement";
|
|
23
|
-
typeParameters?: ES.TSTypeParameterInstantiation;
|
|
24
|
-
selfClosing: boolean;
|
|
25
|
-
name: JSXTagNameExpression;
|
|
26
|
-
attributes: (JSXAttribute | JSXSpreadAttribute | AstroShorthandAttribute | AstroTemplateLiteralAttribute)[];
|
|
27
|
-
parent?: JSXElement;
|
|
28
|
-
}
|
|
29
|
-
export interface JSXClosingElement extends BaseNode {
|
|
30
|
-
type: "JSXClosingElement";
|
|
31
|
-
name: JSXTagNameExpression;
|
|
32
|
-
parent?: JSXElement;
|
|
33
|
-
}
|
|
34
|
-
export interface JSXClosingFragment extends BaseNode {
|
|
35
|
-
type: "JSXClosingFragment";
|
|
36
|
-
parent?: JSXFragment;
|
|
37
|
-
}
|
|
38
|
-
export interface JSXOpeningFragment extends BaseNode {
|
|
39
|
-
type: "JSXOpeningFragment";
|
|
40
|
-
parent?: JSXFragment;
|
|
41
|
-
}
|
|
42
|
-
export interface JSXAttribute extends BaseNode {
|
|
43
|
-
type: "JSXAttribute";
|
|
44
|
-
name: JSXIdentifier | JSXNamespacedName;
|
|
45
|
-
value: JSXExpression | ES.Literal | null;
|
|
46
|
-
parent?: JSXOpeningElement;
|
|
47
|
-
}
|
|
48
|
-
export interface JSXSpreadAttribute extends BaseNode {
|
|
49
|
-
type: "JSXSpreadAttribute";
|
|
50
|
-
argument: ES.Expression;
|
|
51
|
-
parent?: JSXOpeningElement;
|
|
52
|
-
}
|
|
53
|
-
export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
|
|
54
|
-
export interface JSXIdentifier extends BaseNode {
|
|
55
|
-
type: "JSXIdentifier";
|
|
56
|
-
name: string;
|
|
57
|
-
parent?: JSXAttribute | AstroShorthandAttribute | AstroTemplateLiteralAttribute | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXClosingElement;
|
|
58
|
-
}
|
|
59
|
-
export interface JSXMemberExpression extends BaseNode {
|
|
60
|
-
type: "JSXMemberExpression";
|
|
61
|
-
object: JSXTagNameExpression;
|
|
62
|
-
property: JSXIdentifier;
|
|
63
|
-
parent?: JSXMemberExpression | JSXOpeningElement | JSXClosingElement;
|
|
64
|
-
}
|
|
65
|
-
export interface JSXNamespacedName extends BaseNode {
|
|
66
|
-
type: "JSXNamespacedName";
|
|
67
|
-
namespace: JSXIdentifier;
|
|
68
|
-
name: JSXIdentifier;
|
|
69
|
-
parent?: JSXAttribute | AstroShorthandAttribute | AstroTemplateLiteralAttribute | JSXMemberExpression | JSXOpeningElement | JSXClosingElement;
|
|
70
|
-
}
|
|
71
|
-
export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild;
|
|
72
|
-
export interface JSXExpressionContainer extends BaseNode {
|
|
73
|
-
type: "JSXExpressionContainer";
|
|
74
|
-
expression: ES.Expression | JSXEmptyExpression;
|
|
75
|
-
parent?: JSXAttribute | AstroShorthandAttribute | AstroTemplateLiteralAttribute | JSXParentNode;
|
|
76
|
-
}
|
|
77
|
-
export interface JSXSpreadChild extends BaseNode {
|
|
78
|
-
type: "JSXSpreadChild";
|
|
79
|
-
expression: ES.Expression;
|
|
80
|
-
parent?: JSXAttribute | JSXParentNode;
|
|
81
|
-
}
|
|
82
|
-
export interface JSXEmptyExpression extends BaseNode {
|
|
83
|
-
type: "JSXEmptyExpression";
|
|
84
|
-
parent?: JSXExpressionContainer;
|
|
85
|
-
}
|
|
86
|
-
export interface JSXText extends BaseNode {
|
|
87
|
-
type: "JSXText";
|
|
88
|
-
value: string;
|
|
89
|
-
raw: string;
|
|
90
|
-
parent?: JSXParentNode;
|
|
91
|
-
}
|
package/lib/ast/jsx.js
DELETED
package/lib/astro/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { AttributeNode, CommentNode, Node, ParentNode, TagLikeNode } from "@astrojs/compiler/types";
|
|
2
|
-
import type { Context } from "../context";
|
|
3
|
-
/**
|
|
4
|
-
* Checks if the given node is TagLikeNode
|
|
5
|
-
*/
|
|
6
|
-
export declare function isTag(node: Node): node is Node & TagLikeNode;
|
|
7
|
-
/**
|
|
8
|
-
* Checks if the given node is ParentNode
|
|
9
|
-
*/
|
|
10
|
-
export declare function isParent(node: Node): node is ParentNode;
|
|
11
|
-
/** walk element nodes */
|
|
12
|
-
export declare function walkElements(parent: ParentNode, code: string, enter: (n: Node, parents: ParentNode[]) => void, leave: (n: Node, parents: ParentNode[]) => void, parents?: ParentNode[]): void;
|
|
13
|
-
/** walk nodes */
|
|
14
|
-
export declare function walk(parent: ParentNode, code: string, enter: (n: Node | AttributeNode, parents: ParentNode[]) => void, leave: (n: Node | AttributeNode, parents: ParentNode[]) => void): void;
|
|
15
|
-
/**
|
|
16
|
-
* Get end offset of start tag
|
|
17
|
-
*/
|
|
18
|
-
export declare function calcStartTagEndOffset(node: TagLikeNode, ctx: Context): number;
|
|
19
|
-
/**
|
|
20
|
-
* Get end offset of attribute
|
|
21
|
-
*/
|
|
22
|
-
export declare function calcAttributeEndOffset(node: AttributeNode, ctx: Context): number;
|
|
23
|
-
/**
|
|
24
|
-
* Get start offset of attribute value
|
|
25
|
-
*/
|
|
26
|
-
export declare function calcAttributeValueStartOffset(node: AttributeNode, ctx: Context): number;
|
|
27
|
-
/**
|
|
28
|
-
* Get end offset of tag
|
|
29
|
-
*/
|
|
30
|
-
export declare function getEndOffset(node: Node, ctx: Context): number;
|
|
31
|
-
/**
|
|
32
|
-
* Get content end offset
|
|
33
|
-
*/
|
|
34
|
-
export declare function calcContentEndOffset(parent: ParentNode, ctx: Context): number;
|
|
35
|
-
/**
|
|
36
|
-
* If the given tag is a self-close tag, get the self-closing tag.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getSelfClosingTag(node: TagLikeNode, ctx: Context): null | {
|
|
39
|
-
offset: number;
|
|
40
|
-
end: "/>" | ">";
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* If the given tag has a end tag, get the end tag.
|
|
44
|
-
*/
|
|
45
|
-
export declare function getEndTag(node: TagLikeNode, ctx: Context): null | {
|
|
46
|
-
offset: number;
|
|
47
|
-
tag: string;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Get end offset of comment
|
|
51
|
-
*/
|
|
52
|
-
export declare function calcCommentEndOffset(node: CommentNode, ctx: Context): number;
|
|
53
|
-
/**
|
|
54
|
-
* Skip spaces
|
|
55
|
-
*/
|
|
56
|
-
export declare function skipSpaces(string: string, position: number): number;
|