astro-eslint-parser 0.2.0 → 0.2.1
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 +5 -5
- package/lib/ast/astro.d.ts +1 -1
- package/lib/ast/jsx.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,8 +33,6 @@ This parser allows us to lint the script of `.astro` files.
|
|
|
33
33
|
|
|
34
34
|
ESLint plugin for Astro component.
|
|
35
35
|
|
|
36
|
-
[eslint-plugin-astro]: https://ota-meshi.github.io/eslint-plugin-astro/
|
|
37
|
-
|
|
38
36
|
## 💿 Installation
|
|
39
37
|
|
|
40
38
|
```bash
|
|
@@ -167,11 +165,11 @@ See also [`@typescript-eslint/parser` readme](https://github.com/typescript-esli
|
|
|
167
165
|
|
|
168
166
|
## :hammer_and_wrench: Usage for Custom Rules / Plugins
|
|
169
167
|
|
|
168
|
+
<!-- - [AST.md](./docs/AST.md) is AST specification. You can check it on the [Online DEMO](https://ota-meshi.github.io/astro-eslint-parser/). -->
|
|
169
|
+
|
|
170
170
|
- TBA
|
|
171
171
|
- You can check the AST in the [Online DEMO](https://ota-meshi.github.io/astro-eslint-parser/). However, AST is subject to major changes in the future.
|
|
172
|
-
|
|
173
|
-
<!-- - [AST.md](./docs/AST.md) is AST specification. You can check it on the [Online DEMO](https://ota-meshi.github.io/astro-eslint-parser/). -->
|
|
174
|
-
<!-- - I have already [implemented some rules] in the [`@ota-meshi/eslint-plugin-astro`]. The source code for these rules will be helpful to you. -->
|
|
172
|
+
- I have already [implemented some rules] in the [eslint-plugin-astro]. The source code for these rules will be helpful to you.
|
|
175
173
|
|
|
176
174
|
## :beers: Contributing
|
|
177
175
|
|
|
@@ -191,3 +189,5 @@ See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
|
|
|
191
189
|
|
|
192
190
|
[Astro]: https://astro.build/
|
|
193
191
|
[ESLint]: https://eslint.org/
|
|
192
|
+
[eslint-plugin-astro]: https://ota-meshi.github.io/eslint-plugin-astro/
|
|
193
|
+
[implemented some rules]: https://ota-meshi.github.io/eslint-plugin-astro/rules/
|
package/lib/ast/astro.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { JSXAttribute, JSXElement, JSXExpression, JSXExpressionContainer, J
|
|
|
2
2
|
import type { TSESTree as ES } from "@typescript-eslint/types";
|
|
3
3
|
import type { BaseNode } from "./base";
|
|
4
4
|
export declare type AstroNode = AstroProgram | AstroFragment | AstroHTMLComment | AstroDoctype | AstroShorthandAttribute | AstroTemplateLiteralAttribute | AstroRawText;
|
|
5
|
-
export declare type AstroChild = JSXElement | JSXFragment | JSXExpression | JSXText | AstroHTMLComment;
|
|
5
|
+
export declare type AstroChild = JSXElement | JSXFragment | JSXExpression | JSXText | AstroHTMLComment | AstroRawText;
|
|
6
6
|
export declare type AstroParentNode = JSXElement | JSXFragment | AstroFragment;
|
|
7
7
|
/** Node of Astro program root */
|
|
8
8
|
export interface AstroProgram extends Omit<ES.Program, "type" | "body"> {
|
package/lib/ast/jsx.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TSESTree as ES } from "@typescript-eslint/types";
|
|
2
|
-
import type { AstroFragment, AstroHTMLComment, AstroShorthandAttribute, AstroTemplateLiteralAttribute } from "./astro";
|
|
2
|
+
import type { AstroFragment, AstroHTMLComment, AstroRawText, AstroShorthandAttribute, AstroTemplateLiteralAttribute } from "./astro";
|
|
3
3
|
import type { BaseNode } from "./base";
|
|
4
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;
|
|
5
|
+
export declare type JSXChild = JSXElement | JSXFragment | JSXExpression | JSXText | AstroHTMLComment | AstroRawText;
|
|
6
6
|
export declare type JSXParentNode = JSXElement | JSXFragment | AstroFragment;
|
|
7
7
|
export interface JSXElement extends BaseNode {
|
|
8
8
|
type: "JSXElement";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-eslint-parser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Astro component parser for ESLint",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"eslint": "^8.15.0",
|
|
71
71
|
"eslint-config-prettier": "^8.3.0",
|
|
72
72
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
73
|
-
"eslint-plugin-astro": "^0.
|
|
73
|
+
"eslint-plugin-astro": "^0.4.0",
|
|
74
74
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
75
75
|
"eslint-plugin-json-schema-validator": "^3.0.0",
|
|
76
76
|
"eslint-plugin-jsonc": "^2.0.0",
|