cfpb / generator-cf

Yeoman generator for Capital Framework
http://cfpb.github.io/capital-framework/getting-started/
Creative Commons Zero v1.0 Universal
9 stars 13 forks source link

Generalizes lintjs task #80

Closed anselmbradford closed 9 years ago

anselmbradford commented 9 years ago

Generalizes lintjs task from grunt eslint to grunt lintjs.

Additions

anselmbradford commented 9 years ago

Broke the build on this, but it's fixed now.

contolini commented 9 years ago

I'm curious: what's the rationale for this feature? Is it because there are times when you really don't care that you have linting errors?

anselmbradford commented 9 years ago

I'm curious: what's the rationale for this feature? Is it because there are times when you really don't care that you have linting errors?

@contolini I assume you mean the quiet flag and not the change in task name? Yeah, linting errors and linting warnings are two different things. The errors should break the build, but there are plenty of (mostly stylistic) things that should have attention called to themselves, but generally wouldn't rise to the level of warranting breaking the build. For example, the linter picks up TODO comments, which may be used to mark areas of code as temporary scaffolding or the like. This is helpful to call attention to these areas of the codebase so they're eventually attended to, but they shouldn't outright break the build.

Flapjack had large amounts of JS it migrated to modules and has dozens of ESLint warnings. Many of these require testing to ensure they don't break things when fixed so it's helpful to have the option to hide the warnings and just view the errors that need to be fixed.

contolini commented 9 years ago

:+1: