Skip to content

Conversation

kumar303
Copy link
Contributor

@kumar303 kumar303 commented Nov 4, 2016

No description provided.

@coveralls
Copy link

coveralls commented Nov 4, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 176a099 on kumar303:lint into 898b4e1 on mozilla:master.

Copy link
Member

@rpl rpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumar303 it looks good to me

r+

@kumar303 kumar303 merged commit 54cb20a into mozilla:master Nov 7, 2016
@kumar303 kumar303 deleted the lint branch November 7, 2016 22:12
@@ -13,6 +13,7 @@
"node": true,
"es6": true
},
"extends": "eslint:recommended",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, there is also a "plugin:flowtype/recommended" config which you can extend.

  "extends": [
    "eslint:recommended",
    "plugin:flowtype/recommended"
  ],

Extending that flowtype recommended config now returns 15 errors:

npm run lint

> [email protected] lint /Users/pdehaan/dev/github/mozilla/web-ext
> grunt lint

Running "lint" task

Running "eslint:js" (eslint) task

Done.
➜  web-ext git:(master) subl .
➜  web-ext git:(master) npm run lint

> [email protected] lint /Users/pdehaan/dev/github/mozilla/web-ext
> grunt lint

Running "lint" task

Running "eslint:js" (eslint) task

/Users/pdehaan/dev/github/mozilla/web-ext/src/cmd/build.js
  52:20  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  52:20  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing

/Users/pdehaan/dev/github/mozilla/web-ext/src/cmd/run.js
  309:52  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  309:52  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing

/Users/pdehaan/dev/github/mozilla/web-ext/src/cmd/sign.js
  136:12  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  136:12  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing
  170:8   error  There must be no space before return type colon               flowtype/space-before-type-colon

/Users/pdehaan/dev/github/mozilla/web-ext/src/errors.js
  92:16  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  92:16  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing
  92:39  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  92:39  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing

/Users/pdehaan/dev/github/mozilla/web-ext/src/firefox/preferences.js
  8:18  error  Use "boolean", not "bool"  flowtype/boolean-style

/Users/pdehaan/dev/github/mozilla/web-ext/src/util/is-directory.js
  17:60  error  Use "boolean", not "bool"  flowtype/boolean-style

/Users/pdehaan/dev/github/mozilla/web-ext/src/util/manifest.js
  71:65  error  There must be a space before union type annotation separator  flowtype/union-intersection-spacing
  71:65  error  There must be a space after union type annotation separator   flowtype/union-intersection-spacing

✖ 15 problems (15 errors, 0 warnings)

Warning: Task "eslint:js" failed. Use --force to continue.

Aborted due to warnings.

Good news is that all the issues can be auto-fixed using:

$ ./node_modules/.bin/eslint tasks tests src Gruntfile.js webpack.config.js --fix

Although it does give me one error (which seems to be a max-len violation due to auto-formatted code):

$ npm run lint

> [email protected] lint /Users/pdehaan/dev/github/mozilla/web-ext
> grunt lint

Running "lint" task

Running "eslint:js" (eslint) task

/Users/pdehaan/dev/github/mozilla/web-ext/src/cmd/sign.js
  170:1  error  Line 170 exceeds the maximum line length of 80  max-len

✖ 1 problem (1 error, 0 warnings)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I didn't know about that. I added it in #631

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.

4 participants