Skip to content

Commit

Permalink
Merge pull request #16 from paper-spa/latest-ecma
Browse files Browse the repository at this point in the history
Update Espree configuration to allow for latest supported ECMA version
  • Loading branch information
James M. Greene authored and GitHub committed Jul 22, 2022
2 parents 8981dbc + 8628813 commit 49843a9
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14596,7 +14596,7 @@ class ConfigParser {

// Parse the AST out of the configuration file
const espreeOptions = {
ecmaVersion: 6,
ecmaVersion: 'latest',
sourceType: 'module',
range: true
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/config-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ConfigParser {

// Parse the AST out of the configuration file
const espreeOptions = {
ecmaVersion: 6,
ecmaVersion: 'latest',
sourceType: 'module',
range: true
}
Expand Down
17 changes: 17 additions & 0 deletions src/fixtures/nuxt/async.expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const getAllDynamicRoute = async function() {
const routes = await (async () => {
return ['/posts/hello-world', '/posts/hello-again'];
})();
return routes;
};

export default {
target: 'static',
router: {base: '/docs/'},
mode: 'universal',
generate: {
async routes () {
return getAllDynamicRoute();
}
}
};
15 changes: 15 additions & 0 deletions src/fixtures/nuxt/async.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const getAllDynamicRoute = async function() {
const routes = await (async () => {
return ['/posts/hello-world', '/posts/hello-again'];
})();
return routes;
};

export default {
mode: 'universal',
generate: {
async routes () {
return getAllDynamicRoute();
}
}
};

0 comments on commit 49843a9

Please sign in to comment.