hermes-eslint
Advanced tools
Comparing version
@@ -15,3 +15,3 @@ /** | ||
}); | ||
exports.ScopeType = exports.DefinitionType = void 0; | ||
exports.VisitorKeys = exports.ScopeType = exports.DefinitionType = void 0; | ||
exports.parse = parse; | ||
@@ -27,8 +27,2 @@ exports.parseForESLint = parseForESLint; | ||
var _HermesESLintVisitorKeys = _interopRequireDefault(require("./HermesESLintVisitorKeys")); | ||
exports.VisitorKeys = _HermesESLintVisitorKeys.default; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -64,2 +58,5 @@ | ||
const VisitorKeys = HermesParser.FlowVisitorKeys; | ||
exports.VisitorKeys = VisitorKeys; | ||
function parseForESLint(code, options) { | ||
@@ -81,4 +78,4 @@ const ast = parse(code, options); // set the parent pointers | ||
scopeManager, | ||
visitorKeys: _HermesESLintVisitorKeys.default | ||
visitorKeys: VisitorKeys | ||
}; | ||
} |
@@ -17,3 +17,3 @@ /** | ||
var _HermesESLintVisitorKeys = _interopRequireDefault(require("../HermesESLintVisitorKeys")); | ||
var _hermesParser = require("hermes-parser"); | ||
@@ -24,4 +24,2 @@ var _referencer = require("./referencer"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const DEFAULT_OPTIONS = { | ||
@@ -99,3 +97,3 @@ globalReturn: false, | ||
const referencer = new _referencer.Referencer({ | ||
childVisitorKeys: _HermesESLintVisitorKeys.default, | ||
childVisitorKeys: _hermesParser.FlowVisitorKeys, | ||
fbtSupport: (_providedOptions$fbt = providedOptions == null ? void 0 : providedOptions.fbt) != null ? _providedOptions$fbt : DEFAULT_OPTIONS.fbt, | ||
@@ -102,0 +100,0 @@ jsxPragma: getJsxPragma(ast, providedOptions), |
@@ -17,6 +17,4 @@ /** | ||
var _HermesESLintVisitorKeys = _interopRequireDefault(require("../../HermesESLintVisitorKeys")); | ||
var _hermesParser = require("hermes-parser"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function isNode(node) { | ||
@@ -43,3 +41,3 @@ return typeof node === 'object' && node != null && typeof node.type === 'string'; | ||
this._childVisitorKeys = (_options$childVisitor = options.childVisitorKeys) != null ? _options$childVisitor : _HermesESLintVisitorKeys.default; | ||
this._childVisitorKeys = (_options$childVisitor = options.childVisitorKeys) != null ? _options$childVisitor : _hermesParser.FlowVisitorKeys; | ||
} | ||
@@ -46,0 +44,0 @@ /** |
{ | ||
"name": "hermes-eslint", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "A custom parser for ESLint using the Hermes parser", | ||
@@ -19,5 +19,5 @@ "main": "dist/index.js", | ||
"esrecurse": "^4.3.0", | ||
"hermes-estree": "0.10.0", | ||
"hermes-parser": "0.10.0" | ||
"hermes-estree": "0.10.1", | ||
"hermes-parser": "0.10.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
234792
-3.34%109
-1.8%3213
-5.25%+ Added
+ Added
- Removed
- Removed
Updated
Updated