Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
release/
lib/
build/
18 changes: 18 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"curly": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"forin": true,
"noempty": true,
"rhino": false,
"jquery": true,
"globals": {
"CSSLint": true
}
}
19 changes: 1 addition & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,7 @@ module.exports = function(grunt) {
},
jshint: {
options: {
curly: true,
//eqeqeq: true, TODO: Leaving off due to errors
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
//unused: true, TODO: Leaving off due to errors around unused instances of CSSLint
boss: true,
eqnull: true,
// Copied from build.xml
forin: true,
noempty: true,
rhino: false,
globals: {
jQuery: true
}
jshintrc: ".jshintrc"
},
gruntfile: {
src: 'Gruntfile.js'
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.5.4",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-watch": "~0.4.4",
"yuitest": "~0.7.9",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-include-replace": "~0.4.0"
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-watch": "~0.4.4",
"grunt-include-replace": "~0.4.0",
"yuitest": "~0.7.9"
}
}
2 changes: 1 addition & 1 deletion src/cli/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Encapsulates all of the CLI functionality. The api argument simply
* provides environment-specific functionality.
*/
/*global CSSLint*/

function cli(api){

var globalOptions = {
Expand Down
3 changes: 1 addition & 2 deletions src/core/Reporter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
/**
* An instance of Report is used to report results of the
* verification back to the main API.
Expand Down Expand Up @@ -158,4 +157,4 @@ Reporter.prototype = {
};

//expose for testing purposes
CSSLint._Reporter = Reporter;
CSSLint._Reporter = Reporter;
5 changes: 1 addition & 4 deletions src/core/Util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

/*global CSSLint*/

/*
* Utility functions that make life easier.
*/
Expand Down Expand Up @@ -59,4 +56,4 @@ CSSLint.Util = {
}
}
}
};
};
3 changes: 1 addition & 2 deletions src/formatters/checkstyle-xml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
(function() {

/**
Expand Down Expand Up @@ -106,4 +105,4 @@
}
});

}());
}());
1 change: 0 additions & 1 deletion src/formatters/compact.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
CSSLint.addFormatter({
//format information
id: "compact",
Expand Down
3 changes: 1 addition & 2 deletions src/formatters/csslint-xml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
CSSLint.addFormatter({
//format information
id: "csslint-xml",
Expand Down Expand Up @@ -65,4 +64,4 @@ CSSLint.addFormatter({

return output.join("");
}
});
});
3 changes: 1 addition & 2 deletions src/formatters/junit-xml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
CSSLint.addFormatter({
//format information
id: "junit-xml",
Expand Down Expand Up @@ -102,4 +101,4 @@ CSSLint.addFormatter({
return output.join("");

}
});
});
3 changes: 1 addition & 2 deletions src/formatters/lint-xml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
CSSLint.addFormatter({
//format information
id: "lint-xml",
Expand Down Expand Up @@ -66,4 +65,4 @@ CSSLint.addFormatter({

return output.join("");
}
});
});
1 change: 0 additions & 1 deletion src/formatters/text.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global CSSLint*/
CSSLint.addFormatter({
//format information
id: "text",
Expand Down
4 changes: 2 additions & 2 deletions src/rules/adjoining-classes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*global CSSLint*/
/*
* Rule: Don't use adjoining classes (.foo.bar).
*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -42,4 +42,4 @@ CSSLint.addRule({
});
}

});
});
4 changes: 1 addition & 3 deletions src/rules/box-model.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/*global CSSLint*/

/*
* Rule: Don't use width or height when using padding or border.
*/
Expand Down Expand Up @@ -98,4 +96,4 @@ CSSLint.addRule({
parser.addListener("endkeyframerule", endRule);
}

});
});
5 changes: 2 additions & 3 deletions src/rules/box-sizing.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/*global CSSLint*/

/*
* Rule: box-sizing doesn't work in IE6 and IE7.
*/

CSSLint.addRule({

//rule information
Expand All @@ -25,4 +24,4 @@ CSSLint.addRule({
});
}

});
});
4 changes: 2 additions & 2 deletions src/rules/bulletproof-font-face.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rule: Use the bulletproof @font-face syntax to avoid 404's in old IE
* (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax)
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -63,4 +63,4 @@ CSSLint.addRule({
}
});
}
});
});
4 changes: 2 additions & 2 deletions src/rules/compatible-vendor-prefixes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rule: Include all compatible vendor prefixes to reach a wider
* range of users.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -183,4 +183,4 @@ CSSLint.addRule({
}
});
}
});
});
4 changes: 2 additions & 2 deletions src/rules/display-property-grouping.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* - vertical-align should not be used with block
* - margin, float should not be used with table-*
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -114,4 +114,4 @@ CSSLint.addRule({

}

});
});
4 changes: 2 additions & 2 deletions src/rules/duplicate-background-images.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rule: Disallow duplicate background-images (using url).
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -34,4 +34,4 @@ CSSLint.addRule({
}
});
}
});
});
4 changes: 2 additions & 2 deletions src/rules/duplicate-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rule: Duplicate properties must appear one after the other. If an already-defined
* property appears somewhere else in the rule, then it's likely an error.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -43,4 +43,4 @@ CSSLint.addRule({

}

});
});
4 changes: 2 additions & 2 deletions src/rules/empty-rules.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rule: Style rules without any properties defined should be removed.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -31,4 +31,4 @@ CSSLint.addRule({
});
}

});
});
4 changes: 2 additions & 2 deletions src/rules/errors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rule: There should be no syntax errors. (Duh.)
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand All @@ -20,4 +20,4 @@ CSSLint.addRule({

}

});
});
4 changes: 1 addition & 3 deletions src/rules/fallback-colors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

/*global CSSLint*/
CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -74,4 +72,4 @@ CSSLint.addRule({

}

});
});
4 changes: 2 additions & 2 deletions src/rules/floats.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rule: You shouldn't use more than 10 floats. If you do, there's probably
* room for some abstraction.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -33,4 +33,4 @@ CSSLint.addRule({
});
}

});
});
4 changes: 2 additions & 2 deletions src/rules/font-faces.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rule: Avoid too many @font-face declarations in the same stylesheet.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand All @@ -27,4 +27,4 @@ CSSLint.addRule({
});
}

});
});
3 changes: 1 addition & 2 deletions src/rules/font-sizes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Rule: You shouldn't need more than 9 font-size declarations.
*/

/*global CSSLint*/
CSSLint.addRule({

//rule information
Expand Down Expand Up @@ -32,4 +31,4 @@ CSSLint.addRule({
});
}

});
});
2 changes: 1 addition & 1 deletion src/rules/gradients.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rule: When using a vendor-prefixed gradient, make sure to use them all.
*/
/*global CSSLint*/

CSSLint.addRule({

//rule information
Expand Down
Loading