summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/index.cjs
blob: 7b273762aeabf8ef7bdd0c0f5c656ef2a568d44f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const {
  normalizeESLintConfig
} = require("./configuration.cjs");
const analyzeScope = require("./analyze-scope.cjs");
const baseParse = require("./parse.cjs");
const {
  LocalClient,
  WorkerClient
} = require("./client.cjs");
const client = new LocalClient();
exports.meta = {
  name: "@babel/eslint-parser",
  version: "7.21.8"
};
exports.parse = function (code, options = {}) {
  return baseParse(code, normalizeESLintConfig(options), client);
};
exports.parseForESLint = function (code, options = {}) {
  const normalizedOptions = normalizeESLintConfig(options);
  const ast = baseParse(code, normalizedOptions, client);
  const scopeManager = analyzeScope(ast, normalizedOptions, client);
  return {
    ast,
    scopeManager,
    visitorKeys: client.getVisitorKeys()
  };
};

//# sourceMappingURL=index.cjs.map