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
17 changes: 17 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"validateIndentation": 2,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowQuotedKeysInObjects": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowMultipleLineStrings": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleSpaces": true,
"requireLineFeedAtFileEnd": true,
"requireSemicolons": true,
"maximumLineLength": 120
}
5 changes: 5 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"node": true,
"latedef": true,
"undef": true
}
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var cssLintPlugin = function(options) {
if (file.isNull()) return cb(null, file); // pass along
if (file.isStream()) return cb(new error('gulp-csslint: Streaming not supported'));

rcLoader.for(file.path, function (err, opts) {
rcLoader.for(file.path, function(err, opts) {
if (err) return cb(err);

var str = file.contents.toString('utf8');
Expand Down Expand Up @@ -122,8 +122,8 @@ cssLintPlugin.reporter = function(customReporter) {
});
};

cssLintPlugin.failReporter = function(){
return es.map(function (file, cb) {
cssLintPlugin.failReporter = function() {
return es.map(function(file, cb) {
// Nothing to report or no errors
if (!file.csslint || file.csslint.success) {
return cb(null, file);
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
"rcloader": "^0.1.4"
},
"devDependencies": {
"jscs": "^1.12.0",
"jshint": "^2.6.3",
"mocha": "^2.2.1",
"should": "^5.2.0"
},
"scripts": {
"lint": "jscs index.js test/ & jshint index.js test/",
"pretest": "npm run-script lint",
"test": "mocha"
},
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions test/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../.jshintrc",
"mocha": true
}