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

Add eslint to project #89

Closed
ruebot opened this issue Mar 29, 2018 · 4 comments

Comments

Projects
None yet
1 participant
@ruebot
Copy link
Member

commented Mar 29, 2018

We use this on warcbase to lint js files. We should do it here as well since we're adding it with #85.

I'll take care of this after #85 is merged.

@ruebot ruebot self-assigned this Mar 29, 2018

@ruebot

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2018

I'm not going to add this completely since we'll have more system dependencies for testing - npm and eslint. Instead I'll just run prettier and eslint on our existing work, and clean-up.

@ruebot

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2018

Actually, it'll just skip over it if you don't do npm install in the root.

@ruebot

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2018

/home/nruest/Projects/auk/app/assets/javascripts/graphs.js
  11:15  error  Parsing error: Unexpected character '`'

✖ 1 problem (1 error, 0 warnings)

Might need to open up a separate issue for this, and see if we can address it. For now, I'll just ignore the file.

@ruebot

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2018

I'll clean this up and then put a PR in, and have @greebie and @ianmilligan1 test it since I'll be working with graphs.js.

/home/nruest/Projects/auk/app/assets/javascripts/graphs.js
   2:39  error  Expected '!==' and instead saw '!='                              eqeqeq
   3:5   error  All 'var' declarations must be at the top of the function scope  vars-on-top
   4:5   error  'create_graph' was used before it was defined                    no-use-before-define
   8:10  error  Identifier 'create_graph' is not in camel case                   camelcase
   9:16  error  A constructor name should not start with a lowercase letter      new-cap
   9:16  error  'sigma' is not defined                                           no-undef
  10:12  error  Expected '!==' and instead saw '!='                              eqeqeq
  10:15  error  Strings must use singlequote                                     quotes
  11:5   error  Assignment to function parameter 'data'                          no-param-reassign
  12:5   error  'sigma' is not defined                                           no-undef
  12:44  error  'y' is defined but never used                                    no-unused-vars
  16:26  error  Unexpected trailing comma                                        comma-dangle
  18:35  error  Expected '===' and instead saw '=='                              eqeqeq
  25:24  error  Unexpected trailing comma                                        comma-dangle

ruebot added a commit that referenced this issue Apr 8, 2018

Setup ESlint to project; resolves #89.
- Add ESlint config
- Update gitignore
- Update TravisCI config
- Add Rake task
- Clean-up JS files
- Ignore some JS files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.