generator-meanstack
generator-meanstack copied to clipboard
resolving jshint issues with tabbing and use of "this" in app/scripts/app.js
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
:+1: