-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lint errors #64
base: master
Are you sure you want to change the base?
Fix lint errors #64
Conversation
return includes(['[', '{'], firstchar(v)) ? JSON.parse(v) : v; | ||
}; | ||
|
||
const write = function(type) { | ||
const write = function (type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
return match ? match[1] : ''; | ||
}; | ||
|
||
const parse = function(v) { | ||
const parse = function (v) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const firstchar = function(str) { | ||
const match = /^[\x20\x09\x0a\x0d]*(.)/.exec(str); | ||
const firstchar = function (str) { | ||
const match = /^[\x20\x09\x0a\x0d]*(.)/.exec(str); // eslint-disable-line no-control-regex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -87,16 +87,16 @@ const logErr = function(fn) { | |||
throw err; | |||
} | |||
|
|||
const firstchar = function(str) { | |||
const match = /^[\x20\x09\x0a\x0d]*(.)/.exec(str); | |||
const firstchar = function (str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -77,8 +77,8 @@ const test = function(t, fn) { | |||
}; | |||
}; | |||
|
|||
const logErr = function(fn) { | |||
return function(err) { | |||
const logErr = function (fn) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const node = clone(n); | ||
node.id = undefined; | ||
node.namespace = undefined; | ||
node.parent = undefined; | ||
return objectHash(node); | ||
}; | ||
|
||
const isDefaultType = function(type) { | ||
const isDefaultType = function (type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -46,15 +46,15 @@ const TYPE_MAPPING = { | |||
RegExp: 'regexp' | |||
}; | |||
|
|||
const hashNode = function(n) { | |||
const hashNode = function (n) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -1,7 +1,7 @@ | |||
// Based on acorn-walkall (https://github.com/sourcegraph/acorn-walkall) | |||
|
|||
// types is an array of all SpiderMonkey AST node types recognized by acorn. | |||
const types = (exports.types = [ | |||
const types = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -152,7 +152,8 @@ const postCondenseReach = function(server, options, state) { | |||
|
|||
const node = av.originNode; | |||
const ast = node.sourceFile.ast; | |||
let defNode, type; | |||
let defNode; | |||
let type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -152,7 +152,8 @@ const postCondenseReach = function(server, options, state) { | |||
|
|||
const node = av.originNode; | |||
const ast = node.sourceFile.ast; | |||
let defNode, type; | |||
let defNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
If you are not interested in this. |
I found the code don't work with current ESLint.
So the travis-ci will always report errors when there is a new PR.
I want to send a PR for a new option excmd.
But I think it will be better to fix this issue first.
I also update the cmd of lint in package.json.
For an unknown reason, it skips the
bin/
folder.If this is accepted, I will send another PR for the excmd option.