Fix: add Literal type to visitorKeys (babel/babel-eslint#562)
* Fix: add Literal type to visitorKeys * Fix: use ./visitor-keys
This commit is contained in:
parent
3cb154df82
commit
624a425f7d
@ -1,13 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const t = require("@babel/types");
|
const visitorKeys = require("./visitor-keys");
|
||||||
const analyzeScope = require("./analyze-scope");
|
const analyzeScope = require("./analyze-scope");
|
||||||
const parse = require("./parse");
|
const parse = require("./parse");
|
||||||
|
|
||||||
module.exports = function(code, options) {
|
module.exports = function(code, options) {
|
||||||
const ast = parse(code, options);
|
const ast = parse(code, options);
|
||||||
const scopeManager = analyzeScope(ast, options);
|
const scopeManager = analyzeScope(ast, options);
|
||||||
const visitorKeys = t.VISITOR_KEYS;
|
|
||||||
|
|
||||||
return { ast, scopeManager, visitorKeys };
|
return { ast, scopeManager, visitorKeys };
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,6 +5,7 @@ const ESLINT_VISITOR_KEYS = require("eslint-visitor-keys").KEYS;
|
|||||||
|
|
||||||
module.exports = Object.assign(
|
module.exports = Object.assign(
|
||||||
{
|
{
|
||||||
|
Literal: ESLINT_VISITOR_KEYS.Literal,
|
||||||
MethodDefinition: ["decorators"].concat(
|
MethodDefinition: ["decorators"].concat(
|
||||||
ESLINT_VISITOR_KEYS.MethodDefinition
|
ESLINT_VISITOR_KEYS.MethodDefinition
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user