Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Conversation

chrisirhc
Copy link
Contributor

Check for usage of undefined variables.

Adding all the Jasmine globals to the JSHint globals is potentially dangerous (since it won't warn if any of them are used in the module code) so later on I intend to move all the *.spec.js files into a test/ directory later and use a separate .jshintrc for that folder.

- Check for usage of undefined variables
- Add basic Jasmine globals so that spec files pass JSHint
- Ensure that angular variable can't be re-defined (set to false)
- Use $log instead of console as it's safer and always defined
- JSHint thinks usage of alert is possibly development code, so use
  $window.alert instead
@chrisirhc chrisirhc force-pushed the feature/make-jshint-stricter branch from cd35f90 to 76d6ebd Compare October 20, 2014 08:37
@pkozlowski-opensource
Copy link
Member

Awesome! LGTM, feel free to merge @chrisirhc !

@chrisirhc chrisirhc closed this in 42011f0 Oct 20, 2014
@chrisirhc chrisirhc deleted the feature/make-jshint-stricter branch October 20, 2014 09:47
ulle pushed a commit to ulle/bootstrap that referenced this pull request Oct 22, 2014
- Check for usage of undefined variables
- Add basic Jasmine globals so that spec files pass JSHint
- Ensure that angular variable can't be re-defined (set to false)

Closes angular-ui#2861
OronNadiv pushed a commit to lanetix/bootstrap that referenced this pull request Nov 18, 2014
- Check for usage of undefined variables
- Add basic Jasmine globals so that spec files pass JSHint
- Ensure that angular variable can't be re-defined (set to false)

Closes angular-ui#2861
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.

2 participants