Skip to content

Commit 4f1414b

Browse files
committed
add babel eslint config, fix lint
1 parent 46c5a47 commit 4f1414b

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

.eslintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"rules": {
3+
"strict": 0,
4+
"no-underscore-dangle": 0,
5+
"curly": 0,
6+
"no-multi-spaces": 0,
7+
"key-spacing": 0,
8+
"no-return-assign": 0,
9+
"consistent-return": 0,
10+
"no-shadow": 0,
11+
"comma-dangle": 0,
12+
"no-use-before-define": 0,
13+
"no-empty": 0,
14+
"new-parens": 0,
15+
"no-cond-assign": 0,
16+
"no-fallthrough": 0,
17+
"new-cap": 0,
18+
"no-loop-func": 0,
19+
"no-unreachable": 0,
20+
"no-process-exit": 0
21+
},
22+
"env": {
23+
"node": true,
24+
"mocha": true
25+
}
26+
}

acorn-to-esprima.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ exports.toTokens = function (tokens) {
7373
return tokens.map(exports.toToken);
7474
};
7575

76-
function isCompatTag(tagName) {
77-
return tagName && /^[a-z]|\-/.test(tagName);
78-
}
79-
8076
function convertTemplateType(tokens) {
8177
var startingToken = 0;
8278
var currentToken = 0;
@@ -124,7 +120,7 @@ function convertTemplateType(tokens) {
124120
start: tokens[start].loc.start,
125121
end: tokens[end].loc.end
126122
}
127-
}
123+
};
128124

129125
// put new token in place of old tokens
130126
tokens.splice(start, end - start + 1, templateToken);
@@ -174,7 +170,7 @@ function convertTemplateType(tokens) {
174170

175171
var astTransformVisitor = {
176172
noScope: true,
177-
exit: function (node, parent) {
173+
exit: function (node /*, parent */) {
178174
if (this.isSpreadProperty()) {
179175
node.type = "Property";
180176
node.kind = "init";

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var acornToEsprima = require("./acorn-to-esprima");
2-
var traverse = require("babel-core").traverse;
32
var assign = require("lodash.assign");
43
var Module = require("module");
54
var parse = require("babel-core").parse;

0 commit comments

Comments
 (0)