Skip to content

Commit

Permalink
Make 6 the default for the ecmaVersion option
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Feb 5, 2016
1 parent 0453696 commit bed0042
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must
// be either 3, or 5, or 6. This influences support for strict
// mode, the set of reserved words, support for getters and
// setters and other features.
ecmaVersion: 5,
// setters and other features. The default is 6.
ecmaVersion: 6,
// Source type ("script" or "module") for different semantics
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
Expand Down
1 change: 1 addition & 0 deletions test/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
var test = tests[i];
if (config.filter && !config.filter(test)) continue;
var testOpts = test.options || {locations: true};
if (!testOpts.ecmaVersion) testOpts.ecmaVersion = 5;
var expected = {};
if (expected.onComment = testOpts.onComment)
testOpts.onComment = []
Expand Down
3 changes: 1 addition & 2 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
loose: true,
filter: function (test) {
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
return opts.loose !== false;
}
}
}
Expand Down

0 comments on commit bed0042

Please sign in to comment.