Skip to content

Feature/eslint#1467

Merged
frenchbread merged 14 commits intodevelopfrom
feature/eslint
Aug 31, 2016
Merged

Feature/eslint#1467
frenchbread merged 14 commits intodevelopfrom
feature/eslint

Conversation

@brylie
Copy link
Copy Markdown
Contributor

@brylie brylie commented Aug 30, 2016

Closes #1466

Changes

  • Add ESLint to project dev dependencies
  • Add Airbnb base rules
  • Add Meteor lint rules
  • Add Babel lint rules
  • Ignore third party libraries in our sourcecode

@brylie brylie added this to the Sprint 30 milestone Aug 30, 2016
@55 55 self-assigned this Aug 30, 2016
@55
Copy link
Copy Markdown
Contributor

55 commented Aug 30, 2016

@brylie, did next:

  1. Installed https://github.com/AtomLinter/linter-eslint
  2. meteor npm install
  3. meteor npm run lint

Getting:
30009 problems (27804 errors, 2205 warnings)

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Aug 31, 2016

@NNN jep. We have a lot of lint. I was able to get the number of errors down to around 5,000 by ignoring third party libraries:

5059 problems (4654 errors, 405 warnings)

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Aug 31, 2016

Calling eslint --fix . reduces the number of issue by half:

2427 problems (2148 errors, 279 warnings)

From the ESLint Rules documentation:

The --fix option on the command line automatically fixes problems (currently mostly whitespace)

@frenchbread
Copy link
Copy Markdown
Contributor

Tested. Works as expected! I would only suggest to add one rule: since we used to add spaces before function parenthesis, this helps :

package.json

"rules": {
      "space-before-function-paren": ["error", { "anonymous": "always", "named": "always" }]
    }

Source

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Aug 31, 2016

@NNN and/or @frenchbread will this be merged today, or is more work needed?

@frenchbread
Copy link
Copy Markdown
Contributor

Looks good to me. Unless you are still committing here, I'll merge this.

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Aug 31, 2016

Cool. I don't have any more edits.

@frenchbread frenchbread merged commit 9b1e237 into develop Aug 31, 2016
@frenchbread frenchbread deleted the feature/eslint branch August 31, 2016 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants