Skip to content

Commit 1bf9671

Browse files
committed
remove esnext plugin option
it should be set in your .jscs config instead
1 parent 629897b commit 1bf9671

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ module.exports = function (options) {
1414
options = {configPath: options};
1515
}
1616

17-
options = assign({esnext: false}, options);
17+
options = assign({}, options);
1818

19-
var checker = new Checker({esnext: Boolean(options.esnext)});
19+
var checker = new Checker();
2020

2121
checker.registerDefaultRules();
2222

2323
var configPath = options.configPath;
2424
var shouldFix = options.fix;
2525

26-
delete options.esnext;
2726
delete options.configPath;
2827
delete options.fix;
2928

readme.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ See the `jscs` [options](http://jscs.info/overview.html#options).
7575

7676
Alternatively you can set the `configPath` *(default: `'.jscsrc'`)* option to the path of a [.jscsrc](http://jscs.info/rules.html) file.
7777

78-
Set `esnext: true` if you want your code to be parsed as ES6 using the harmony
79-
version of the esprima parser.
80-
8178
Set `fix: true` if you want jscs to attempt to auto-fix your files. Be sure to pipe to `gulp.dest` if you use this option.
8279

8380

test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ it('should respect "excludeFiles" from config', function (cb) {
102102
stream.end();
103103
});
104104

105-
it('should accept both esnext and configPath options', function (cb) {
105+
it('should accept configPath options', function (cb) {
106106
var stream = jscs({
107-
esnext: true,
108107
configPath: '.jscsrc'
109108
});
110109

@@ -154,9 +153,9 @@ it('should throw when passing both configPath and code style options', function
154153
});
155154

156155
it('should not mutate the options object passed as argument', function () {
157-
var options = {esnext: true};
156+
var options = {foo: true};
158157
jscs(options);
159-
assert.equal(options.esnext, true);
158+
assert.equal(options.foo, true);
160159
});
161160

162161
describe('Reporter', function () {

0 commit comments

Comments
 (0)