Skip to content

Commit 5aaf0e1

Browse files
authored
Fix: add Literal type to visitorKeys (babel#562)
* Fix: add Literal type to visitorKeys * Fix: use ./visitor-keys
1 parent bf9092a commit 5aaf0e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/parse-with-scope.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"use strict";
22

3-
const t = require("@babel/types");
3+
const visitorKeys = require("./visitor-keys");
44
const analyzeScope = require("./analyze-scope");
55
const parse = require("./parse");
66

77
module.exports = function(code, options) {
88
const ast = parse(code, options);
99
const scopeManager = analyzeScope(ast, options);
10-
const visitorKeys = t.VISITOR_KEYS;
1110

1211
return { ast, scopeManager, visitorKeys };
1312
};

lib/visitor-keys.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const ESLINT_VISITOR_KEYS = require("eslint-visitor-keys").KEYS;
55

66
module.exports = Object.assign(
77
{
8+
Literal: ESLINT_VISITOR_KEYS.Literal,
89
MethodDefinition: ["decorators"].concat(
910
ESLINT_VISITOR_KEYS.MethodDefinition
1011
),

0 commit comments

Comments
 (0)