From 4576f9a1d5bc4a3b23b9fb574e6e93a7582c0188 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 24 Nov 2013 14:37:27 +0200 Subject: [PATCH] Remove global directive from tests; it's set in .jshintrc. --- Gruntfile.js | 2 +- src/cli/rhino.js | 5 +++-- src/cli/wsh.js | 5 ++++- tests/all-rules.js | 1 - tests/core/CSSLint.js | 2 -- tests/core/Reporter.js | 2 -- tests/formatters/checkstyle-xml.js | 2 -- tests/formatters/compact.js | 2 -- tests/formatters/csslint-xml.js | 2 -- tests/formatters/junit-xml.js | 2 -- tests/formatters/lint-xml.js | 2 -- tests/formatters/text.js | 2 -- tests/rules/adjoining-classes.js | 2 -- tests/rules/box-model.js | 2 -- tests/rules/box-sizing.js | 2 -- tests/rules/bulletproof-font-face.js | 2 -- tests/rules/compatible-vendor-prefixes.js | 2 -- tests/rules/display-property-grouping.js | 2 -- tests/rules/duplicate-background-images.js | 2 -- tests/rules/duplicate-properties.js | 2 -- tests/rules/empty-rules.js | 2 -- tests/rules/errors.js | 2 -- tests/rules/fallback-colors.js | 2 -- tests/rules/floats.js | 2 -- tests/rules/font-faces.js | 2 -- tests/rules/font-sizes.js | 2 -- tests/rules/gradients.js | 2 -- tests/rules/ids.js | 2 -- tests/rules/import.js | 2 -- tests/rules/important.js | 2 -- tests/rules/known-properties.js | 2 -- tests/rules/order-alphabetical.js | 2 -- tests/rules/outline-none.js | 2 -- tests/rules/overqualified-elements.js | 2 -- tests/rules/qualified-headings.js | 2 -- tests/rules/regex-selectors.js | 2 -- tests/rules/selector-max-approaching.js | 2 -- tests/rules/selector-max.js | 2 -- tests/rules/selector-newline.js | 1 - tests/rules/shorthand.js | 2 -- tests/rules/star-property-hack.js | 2 -- tests/rules/text-indent.js | 2 -- tests/rules/underscore-property-hack.js | 2 -- tests/rules/unique-headings.js | 2 -- tests/rules/universal-selector.js | 2 -- tests/rules/unqualified-attributes.js | 2 -- tests/rules/vendor-prefix.js | 2 -- tests/rules/zero-units.js | 2 -- 48 files changed, 8 insertions(+), 92 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 04db7824..549fb05d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -221,7 +221,7 @@ module.exports = function(grunt) { //Run the YUITest suite grunt.registerMultiTask("yuitest", "Run the YUITests for the project", function() { - /*jshint evil:true, node: true */ + /*jshint evil:true, node:true*/ var start = Date.now(); var YUITest = require("yuitest"); diff --git a/src/cli/rhino.js b/src/cli/rhino.js index 8965bff0..c1ef2009 100644 --- a/src/cli/rhino.js +++ b/src/cli/rhino.js @@ -1,8 +1,9 @@ /* * CSSLint Rhino Command Line Interface */ -/*jshint rhino:true*/ -/*global cli, File*/ + +/* jshint rhino:true */ +/* global cli, File */ importPackage(java.io); diff --git a/src/cli/wsh.js b/src/cli/wsh.js index 7442d3fd..d961c0e9 100644 --- a/src/cli/wsh.js +++ b/src/cli/wsh.js @@ -1,9 +1,12 @@ /* * Windows Script Host Command Line Interface */ -/*global ActiveXObject, WScript, Enumerator, cli*/ + //TODO: This file needs major cleanup!!! +/* jshint wsh:true */ +/* global cli */ + var wshapi = (function(){ var fso = new ActiveXObject("Scripting.FileSystemObject"); var shell = WScript.CreateObject("WScript.Shell"); diff --git a/tests/all-rules.js b/tests/all-rules.js index 1cc2360c..f6827e94 100644 --- a/tests/all-rules.js +++ b/tests/all-rules.js @@ -11,7 +11,6 @@ /*jshint loopfunc: true */ (function(){ - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert, suite = new YUITest.TestSuite("General Tests for all Rules"), rules = CSSLint.getRules(), diff --git a/tests/core/CSSLint.js b/tests/core/CSSLint.js index efbf9aa3..300a2d25 100644 --- a/tests/core/CSSLint.js +++ b/tests/core/CSSLint.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/core/Reporter.js b/tests/core/Reporter.js index e6b58e0c..8e9b99ea 100644 --- a/tests/core/Reporter.js +++ b/tests/core/Reporter.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint, Reporter*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/checkstyle-xml.js b/tests/formatters/checkstyle-xml.js index cdb2d3ef..d069d3be 100644 --- a/tests/formatters/checkstyle-xml.js +++ b/tests/formatters/checkstyle-xml.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/compact.js b/tests/formatters/compact.js index e3da5c85..2f7fdd1f 100644 --- a/tests/formatters/compact.js +++ b/tests/formatters/compact.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/csslint-xml.js b/tests/formatters/csslint-xml.js index 6086e9fb..049652a7 100644 --- a/tests/formatters/csslint-xml.js +++ b/tests/formatters/csslint-xml.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/junit-xml.js b/tests/formatters/junit-xml.js index 0a223eb1..21430093 100644 --- a/tests/formatters/junit-xml.js +++ b/tests/formatters/junit-xml.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/lint-xml.js b/tests/formatters/lint-xml.js index a39d9e5b..36c04919 100644 --- a/tests/formatters/lint-xml.js +++ b/tests/formatters/lint-xml.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/formatters/text.js b/tests/formatters/text.js index 7abaa0bd..ef41ab5b 100644 --- a/tests/formatters/text.js +++ b/tests/formatters/text.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/adjoining-classes.js b/tests/rules/adjoining-classes.js index d13bffec..e16f2781 100644 --- a/tests/rules/adjoining-classes.js +++ b/tests/rules/adjoining-classes.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/box-model.js b/tests/rules/box-model.js index 2d25bcc8..19bdcee9 100644 --- a/tests/rules/box-model.js +++ b/tests/rules/box-model.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/box-sizing.js b/tests/rules/box-sizing.js index e715ef01..03238cc6 100644 --- a/tests/rules/box-sizing.js +++ b/tests/rules/box-sizing.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/bulletproof-font-face.js b/tests/rules/bulletproof-font-face.js index a29585ee..7bb055d1 100644 --- a/tests/rules/bulletproof-font-face.js +++ b/tests/rules/bulletproof-font-face.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/compatible-vendor-prefixes.js b/tests/rules/compatible-vendor-prefixes.js index a3b819a9..4fec4c5b 100644 --- a/tests/rules/compatible-vendor-prefixes.js +++ b/tests/rules/compatible-vendor-prefixes.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/display-property-grouping.js b/tests/rules/display-property-grouping.js index cd3d40fd..53526c4a 100644 --- a/tests/rules/display-property-grouping.js +++ b/tests/rules/display-property-grouping.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/duplicate-background-images.js b/tests/rules/duplicate-background-images.js index 332e1c8b..5eb766eb 100644 --- a/tests/rules/duplicate-background-images.js +++ b/tests/rules/duplicate-background-images.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/duplicate-properties.js b/tests/rules/duplicate-properties.js index 80d7055d..a12f4747 100644 --- a/tests/rules/duplicate-properties.js +++ b/tests/rules/duplicate-properties.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/empty-rules.js b/tests/rules/empty-rules.js index 15d642b1..4b961fae 100644 --- a/tests/rules/empty-rules.js +++ b/tests/rules/empty-rules.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/errors.js b/tests/rules/errors.js index 0aa4e2b8..164c3832 100644 --- a/tests/rules/errors.js +++ b/tests/rules/errors.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/fallback-colors.js b/tests/rules/fallback-colors.js index 0315ab45..6d964db6 100644 --- a/tests/rules/fallback-colors.js +++ b/tests/rules/fallback-colors.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/floats.js b/tests/rules/floats.js index 4ff94c7f..fd78db3b 100644 --- a/tests/rules/floats.js +++ b/tests/rules/floats.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/font-faces.js b/tests/rules/font-faces.js index fcc064c2..2fd4660b 100644 --- a/tests/rules/font-faces.js +++ b/tests/rules/font-faces.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/font-sizes.js b/tests/rules/font-sizes.js index ff4386a9..c5831103 100644 --- a/tests/rules/font-sizes.js +++ b/tests/rules/font-sizes.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/gradients.js b/tests/rules/gradients.js index 1421aa77..69e80362 100644 --- a/tests/rules/gradients.js +++ b/tests/rules/gradients.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/ids.js b/tests/rules/ids.js index 610f6369..9f309b26 100644 --- a/tests/rules/ids.js +++ b/tests/rules/ids.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/import.js b/tests/rules/import.js index 9ace71f9..967dc207 100644 --- a/tests/rules/import.js +++ b/tests/rules/import.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/important.js b/tests/rules/important.js index dbb149b2..5d4ff1af 100644 --- a/tests/rules/important.js +++ b/tests/rules/important.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/known-properties.js b/tests/rules/known-properties.js index 2ad14b22..f35b11a9 100644 --- a/tests/rules/known-properties.js +++ b/tests/rules/known-properties.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/order-alphabetical.js b/tests/rules/order-alphabetical.js index 277a7e79..551c8e2a 100644 --- a/tests/rules/order-alphabetical.js +++ b/tests/rules/order-alphabetical.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/outline-none.js b/tests/rules/outline-none.js index 64f003b3..d4501d16 100644 --- a/tests/rules/outline-none.js +++ b/tests/rules/outline-none.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/overqualified-elements.js b/tests/rules/overqualified-elements.js index 7e3161e5..54b1a009 100644 --- a/tests/rules/overqualified-elements.js +++ b/tests/rules/overqualified-elements.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/qualified-headings.js b/tests/rules/qualified-headings.js index 0d63b091..403df290 100644 --- a/tests/rules/qualified-headings.js +++ b/tests/rules/qualified-headings.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/regex-selectors.js b/tests/rules/regex-selectors.js index 5db38f49..1e3c8d5f 100644 --- a/tests/rules/regex-selectors.js +++ b/tests/rules/regex-selectors.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/selector-max-approaching.js b/tests/rules/selector-max-approaching.js index 3732a613..f47e6072 100644 --- a/tests/rules/selector-max-approaching.js +++ b/tests/rules/selector-max-approaching.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert, i, j, css1 = "", css2 = "", css3 = "", css4 = ""; // create css1, which has only 4095 rules and 4095 selectors diff --git a/tests/rules/selector-max.js b/tests/rules/selector-max.js index 482df1e5..02cb824f 100644 --- a/tests/rules/selector-max.js +++ b/tests/rules/selector-max.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert, i, j, css1 = "", css2 = "", css3 = "", css4 = ""; // create css1, which has only 4095 rules and 4095 selectors diff --git a/tests/rules/selector-newline.js b/tests/rules/selector-newline.js index 298fbbd7..e22f2e3e 100644 --- a/tests/rules/selector-newline.js +++ b/tests/rules/selector-newline.js @@ -1,4 +1,3 @@ -/*global YUITest, CSSLint*/ (function () { var ruleId = "selector-newline", expectWarning, expectPass; diff --git a/tests/rules/shorthand.js b/tests/rules/shorthand.js index e78ad586..ca582048 100644 --- a/tests/rules/shorthand.js +++ b/tests/rules/shorthand.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/star-property-hack.js b/tests/rules/star-property-hack.js index 9c9bd8d7..433cc022 100644 --- a/tests/rules/star-property-hack.js +++ b/tests/rules/star-property-hack.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/text-indent.js b/tests/rules/text-indent.js index 7cc69788..ff8e0617 100644 --- a/tests/rules/text-indent.js +++ b/tests/rules/text-indent.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/underscore-property-hack.js b/tests/rules/underscore-property-hack.js index 2395cdf6..ee9efaf7 100644 --- a/tests/rules/underscore-property-hack.js +++ b/tests/rules/underscore-property-hack.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/unique-headings.js b/tests/rules/unique-headings.js index 4d991fb0..3a251cc6 100644 --- a/tests/rules/unique-headings.js +++ b/tests/rules/unique-headings.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/universal-selector.js b/tests/rules/universal-selector.js index d02c4b07..7adbf865 100644 --- a/tests/rules/universal-selector.js +++ b/tests/rules/universal-selector.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/unqualified-attributes.js b/tests/rules/unqualified-attributes.js index 75763e8f..1159f64e 100644 --- a/tests/rules/unqualified-attributes.js +++ b/tests/rules/unqualified-attributes.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/vendor-prefix.js b/tests/rules/vendor-prefix.js index 93f86230..d5aa83c0 100644 --- a/tests/rules/vendor-prefix.js +++ b/tests/rules/vendor-prefix.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({ diff --git a/tests/rules/zero-units.js b/tests/rules/zero-units.js index 3a69e975..d1b583cd 100644 --- a/tests/rules/zero-units.js +++ b/tests/rules/zero-units.js @@ -1,6 +1,4 @@ (function(){ - - /*global YUITest, CSSLint*/ var Assert = YUITest.Assert; YUITest.TestRunner.add(new YUITest.TestCase({