Skip to content

Commit 608e5f6

Browse files
authored
chore: add errors key for parseForESLint function (#7)
* chore: add visitorKeys config * feat: prettier format
1 parent dc05d6a commit 608e5f6

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.1.1] - 2021-10-20
10+
### Added
11+
- Add `errors` visitor key for `parseForESLint`
12+
913
## [0.1.0] - 2021-10-19
1014
### Added
1115
- Add more useful info on README.md

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wxml/parser",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A fast and tolerant wxml parser",
55
"type": "commonjs",
66
"main": "lib/index.js",

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function parseForESLint(code: string) {
1212
ast: buildAst(cst, tokenVector, lexErrors, parseErrors, true),
1313
services: {},
1414
scopeManager: null,
15-
visitorKeys: null,
15+
visitorKeys: {
16+
Program: ["errors", "body"],
17+
},
1618
};
1719
}
1820

0 commit comments

Comments
 (0)