generator-meanstack icon indicating copy to clipboard operation
generator-meanstack copied to clipboard

resolving jshint issues with tabbing and use of "this" in app/scripts/app.js

Open ghost opened this issue 10 years ago • 1 comments

Issue

GIVEN a clean, global install of generator-meanstack AND GIVEN a new scaffold created with yo meanstack AND GIVEN options are chosen as

  • are you planning to deploy this project on Heroku: Y
  • prefer a stable version of AngularJS: Y WHEN the command - grunt - is issued against the project root THEN the output indicates errors generated by JSHint against a single file - app/scripts/app.js
    • several lines indicate unexpected tab spacing
    • the use of "this" as a parameter to the call method is indicated as a possible strict violation

Resolution

  • forked the repository
  • edited the app/templates/app/scripts/app.js file:
    • adjusted all tab spacing to follow convention
    • removed the "this" reference as it is verbose in the given usage

Testing

  • global uninstall of generator-meanstack - i.e. npm -g uninstall generator-meanstack
  • link forked repo - i.e. from cloned fork: npm link
  • created a test folder - i.e. mkdir meanstack-test && cd meanstack-test
  • generated a scaffold with the updated generator - i.e. yo meanstack
  • successfully ran the command - grunt - with no errors localgenerator_cleanrun successfulbuild_gruntnoerrors

ghost avatar Jul 05 '14 09:07 ghost

:+1:

esco avatar Nov 15 '14 14:11 esco