Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix lint errors #64

wants to merge 1 commit into from

Conversation

othree
Copy link

@othree othree commented Mar 16, 2019

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.

return includes(['[', '{'], firstchar(v)) ? JSON.parse(v) : v;
};

const write = function(type) {
const write = function (type) {

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) {

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

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) {

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) {

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) {

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) {

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 = [

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;

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;

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).

@othree
Copy link
Author

othree commented Mar 21, 2019

If you are not interested in this.
I will create a forked version of jsctags project/package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants