Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Re-structure lint tasks #730

Merged
merged 3 commits into from
Jan 9, 2018
Merged

Re-structure lint tasks #730

merged 3 commits into from
Jan 9, 2018

Conversation

anselmbradford
Copy link
Member

Changes

  • Adds named functions for lint tasks instead of anonymous functions.
  • Fixes incorrect path for build files in lint task.

Testing

  • gulp lint should pass.

Notes

Copy link
Contributor

@jimmynotjim jimmynotjim left a comment

Choose a reason for hiding this comment

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

One change request but other than that looks good.

gulp.task( 'lint:tests', () => {
_genericLintJs( [
function lintTests() {
return _genericLintJs( [
'test/accessibility/*.js',
'test/*.js'
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be simplified as test/**/*.js. Currently it's not catching any of the unit tests for atomic component

Copy link
Member Author

Choose a reason for hiding this comment

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

Done! Good catch

@Scotchester
Copy link
Contributor

Probably a dumb question, but: Why?

@anselmbradford
Copy link
Member Author

Probably a dumb question, but: Why?

Named functions are generally better as they'll have a name in any call stack errors. It also allows us to group the task definitions together at the bottom, and it's the gulp recommend approach. Lastly, ESlint will complain about undocumented functions, but it won't complain about undocumented anonymous functions.

@anselmbradford anselmbradford merged commit c824be2 into canary Jan 9, 2018
@anselmbradford anselmbradford deleted the restructure_lint_tasks branch January 9, 2018 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants