Skip to content

Commit

Permalink
Fix Acorn sourceType
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Apr 10, 2021
1 parent ecd0bcd commit ce60563
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintrc.js
Expand Up @@ -3,6 +3,9 @@
module.exports = {
root: true,
extends: ["eslint:recommended"],
parserOptions: {
ecmaVersion: 2018
},
env: {
es6: true,
node: true,
Expand Down
3 changes: 2 additions & 1 deletion examples/acorn.js
Expand Up @@ -3,6 +3,7 @@
const acorn = require("acorn");
const testParser = require("./parser");

const parse = (input) => acorn.parse(input, { ecmaVersion: 2020 });
const parse = (input, options) =>
acorn.parse(input, { ...options, ecmaVersion: "latest" });

module.exports = testParser(parse);

0 comments on commit ce60563

Please sign in to comment.