Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

turn on EcmaScript5 strict mode #345

Closed
wants to merge 5 commits into from

Conversation

IgorMinar
Copy link
Contributor

  • add "use strict"; statement to the prefix file
  • workaround closure compiler issue that strips the "use strict";
    statement from minified code
  • fix single strict mode violation
  • party!

Closes #223

@vojtajina
Copy link
Contributor

Awesome

@IgorMinar
Copy link
Contributor Author

I wanted to make sure that we have better strict mode coverage, so I enabled the strict mode in the unit tests as well and came across several other issues. nothing major, it will just take time to fix them all.

@IgorMinar
Copy link
Contributor Author

status update: this is not ready to be merged yet.

- add 'use strict'; statement to the prefix file
- configure closure compiler to use the ES5 strict mode
- strip all file-specific strict mode flags after concatination

Closes angular#223
the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd

the following script was used to modify all files:

for file in `find src test -name "*.js"`; do
  echo -e "'use strict';\n" > temp.txt
  cat $file >> temp.txt
  mv temp.txt $file
done
@IgorMinar
Copy link
Contributor Author

status update: this PR is ready for review now

@vojtajina
Copy link
Contributor

👍 LGTM

@mhevery
Copy link
Contributor

mhevery commented Jul 18, 2011

👍 LGTM -> nice work!

@IgorMinar
Copy link
Contributor Author

[angular.js] IgorMinar pushed 5 new commits to master: http://bit.ly/qxXdvo

@IgorMinar IgorMinar closed this Jul 18, 2011
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.

Make angular ES5 "strict mode" compatible
3 participants