Enable `strict` rule.
authorXhmikosR <xhmikosr@users.sourceforge.net>
Sat, 8 Mar 2014 21:22:05 +0000 (23:22 +0200)
committerXhmikosR <xhmikosr@users.sourceforge.net>
Tue, 11 Mar 2014 05:25:02 +0000 (07:25 +0200)
.jshintrc
master.js
src/htmllint.js
src/htmlminifier.js
src/htmlparser.js
tests/lint.js
tests/minifier.js

index 19da2b0..916b119 100644 (file)
--- a/.jshintrc
+++ b/.jshintrc
@@ -10,7 +10,7 @@
   "newcap":     true,
   "node":       true,
   "quotmark":   "single",
-  "strict":     false,
+  "strict":     true,
   "undef":      true,
   "unused":     true
 }
index 6e372e9..2ac8845 100644 (file)
--- a/master.js
+++ b/master.js
@@ -1,5 +1,6 @@
 /* global HTMLLint, minify */
 (function(){
+  'use strict';
 
   function byId(id) {
     return document.getElementById(id);
index 8f13100..cbcf925 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 (function(global) {
+  'use strict';
 
   function isPresentationalElement(tag) {
     return (/^(?:b|i|big|small|hr|blink|marquee)$/).test(tag);
index 1f0cee5..f8272bd 100644 (file)
@@ -1,4 +1,5 @@
 (function(global){
+  'use strict';
 
   var log, HTMLParser;
   if (global.console && global.console.log) {
index 06ed2d8..7814360 100644 (file)
@@ -29,6 +29,7 @@
  /* global ActiveXObject, DOMDocument */
 
 (function(global){
+  'use strict';
 
   // Regular Expressions for parsing tags and attributes
   var startTag = /^<([\w:-]+)((?:\s*[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
index e93ccbe..8588afc 100644 (file)
@@ -1,5 +1,6 @@
 /* global test, ok, equal */
 (function(global){
+  'use strict';
 
   var minify = global.minify || require('../dist/htmlminifier.js').minify,
       HTMLLint = HTMLLint || require('../dist/htmlminifier.js').HTMLLint,
index 5062332..8e5343c 100644 (file)
@@ -1,5 +1,6 @@
 /* global test, ok, equal */
 (function(global){
+  'use strict';
 
   var minify = global.minify || require('../dist/htmlminifier.js').minify,
       input,