Skip to content

Commit

Permalink
Using babel-eslint as parser for esnext (fixes #17 #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
joakimbeng committed Sep 1, 2015
1 parent 7413355 commit 5c79ee6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
],
"dependencies": {
"arrify": "^1.0.0",
"babel-eslint": "^4.1.1",
"eslint": "^1.2.0",
"eslint-config-xo": "^0.4.0",
"eslint-config-xo": "^0.5.0",
"eslint-plugin-babel": "^2.1.1",
"get-stdin": "^4.0.1",
"globby": "^2.1.0",
"look-up": "^0.7.1",
Expand Down
6 changes: 6 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ test('.lintText()', function (t) {
t.end();
});

test('.lintText() esnext', function (t) {
var results = fn.lintText('function dec() {}\nconst x = {\n\t@dec()\n\ta: 1\n};\n', {esnext: true}).results;
t.is(results[0].messages[0].ruleId, 'no-unused-vars');
t.end();
});

// TODO: more tests

0 comments on commit 5c79ee6

Please sign in to comment.