Skip to content

Commit bb2e6dd

Browse files
committed
Add JSCS and make necessary changes for build to pass
1 parent e4d79e9 commit bb2e6dd

30 files changed

+342
-355
lines changed

.jscsrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"preset": "crockford",
3+
"disallowDanglingUnderscores": { "allExcept": ["_$compile_", "_$rootScope_"] },
4+
"disallowMultipleVarDecl": "strict",
5+
"validateIndentation": 2,
6+
"requireMultipleVarDecl": null
7+
}

gulpfile.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
'use strict';
44

55
var gulp = require('gulp');
6+
var jscs = require('gulp-jscs');
67
var jshint = require('gulp-jshint');
78
var karma = require('karma').server;
8-
var lodash = require('lodash');
9-
var plato = require('gulp-plato');
109
var karmaConfig = __dirname + '/karma.conf.js';
10+
var lodash = require('lodash');
1111
var paths = require('./paths');
12+
var plato = require('gulp-plato');
1213

1314
gulp.task('complexity', function () {
1415
return gulp.src('src/**/*.js')
@@ -52,4 +53,10 @@ gulp.task('lint', function () {
5253
.pipe(jshint.reporter('fail'));
5354
});
5455

55-
gulp.task('default', ['lint', 'complexity', 'test']);
56+
gulp.task('jscs', function () {
57+
return gulp
58+
.src(paths.lint)
59+
.pipe(jscs('.jscsrc'));
60+
});
61+
62+
gulp.task('default', ['jscs', 'lint', 'complexity', 'test']);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"grunt": "^0.4.4",
1919
"grunt-bump": "^0.3.0",
2020
"gulp": "^3.8.11",
21+
"gulp-jscs": "^1.4.0",
2122
"gulp-jshint": "^1.9.4",
2223
"gulp-plato": "^1.0.2",
2324
"jshint": "^2.6.0",

src/css/datetimepicker.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license angular-bootstrap-datetimepicker version: 0.3.12
3-
* (c) 2013-2014 Knight Rider Consulting, Inc. http://www.knightrider.com
3+
* Copyright 2013-2015 Knight Rider Consulting, Inc. http://www.knightrider.com
44
* License: MIT
55
*/
66

src/js/datetimepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/**
55
* @license angular-bootstrap-datetimepicker version: 0.3.12
6-
* (c) 2013-2014 Knight Rider Consulting, Inc. http://www.knightrider.com
6+
* Copyright 2013-2015 Knight Rider Consulting, Inc. http://www.knightrider.com
77
* License: MIT
88
*/
99

test/commonjs/browserify.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/*globals require */
2+
/**
3+
* @license angular-bootstrap-datetimepicker
4+
* Copyright 2015 Knight Rider Consulting, Inc. http://www.knightrider.com
5+
* License: MIT
6+
*/
27

38
/** This file is intentionally named browserify.test.js so that it is not picked up by the karma runner **/
49

test/configuration/beforeRender.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @license angular-bootstrap-datetimepicker
5-
* (c) 2013-2014 Knight Rider Consulting, Inc. http://www.knightrider.com
5+
* Copyright 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
66
* License: MIT
77
*/
88

@@ -13,7 +13,8 @@
1313
*/
1414
describe('beforeRender', function () {
1515
'use strict';
16-
var $rootScope, $compile;
16+
var $rootScope;
17+
var $compile;
1718
beforeEach(module('ui.bootstrap.datetimepicker'));
1819
beforeEach(inject(function (_$compile_, _$rootScope_) {
1920
moment.locale('en');

test/configuration/configurationValidation.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @license angular-bootstrap-datetimepicker
5-
* (c) 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
5+
* Copyright 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
66
* License: MIT
77
*/
88

@@ -13,7 +13,8 @@
1313
*/
1414
describe('configuration validation', function () {
1515
'use strict';
16-
var $rootScope, $compile;
16+
var $rootScope;
17+
var $compile;
1718
beforeEach(module('ui.bootstrap.datetimepicker'));
1819
beforeEach(inject(function (_$compile_, _$rootScope_) {
1920
$compile = _$compile_;

test/configuration/datetimepickerConfig.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @license angular-bootstrap-datetimepicker
5-
* (c) 2014 Knight Rider Consulting, Inc. http://www.knightrider.com
5+
* Copyright 2014 Knight Rider Consulting, Inc. http://www.knightrider.com
66
* License: MIT
77
*/
88

@@ -14,7 +14,8 @@
1414

1515
describe('dateimePickerConfig', function () {
1616
'use strict';
17-
var $rootScope, $compile;
17+
var $rootScope;
18+
var $compile;
1819

1920
beforeEach(module('ui.bootstrap.datetimepicker'));
2021

test/configuration/dropdownSelector.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @license angular-bootstrap-datetimepicker
5-
* (c) 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
5+
* Copyright 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
66
* License: MIT
77
*/
88

@@ -14,7 +14,8 @@
1414

1515
describe('dropdownSelector', function () {
1616
'use strict';
17-
var $rootScope, $compile;
17+
var $rootScope;
18+
var $compile;
1819
beforeEach(module('ui.bootstrap.datetimepicker'));
1920
beforeEach(inject(function (_$compile_, _$rootScope_) {
2021
$compile = _$compile_;

0 commit comments

Comments
 (0)