Skip to content

Commit aa2a4ec

Browse files
committed
Enforcing code standard
1 parent 6ef42cb commit aa2a4ec

15 files changed

+1827
-907
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jquery-selectric",
33
"description": "Fast, simple and light jQuery plugin to customize HTML selects",
4-
"version": "1.9.5",
4+
"version": "1.9.6",
55
"keywords": [
66
"select",
77
"selectbox",

gulpfile.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ gulp.task('bump', function() {
2525
/*======================================
2626
Javascript
2727
======================================*/
28-
gulp.task('js', ['bump'], function() {
28+
gulp.task('lint', function() {
29+
return gulp.src(['src/*.js', 'test/*.js'])
30+
.pipe($.eslint())
31+
.pipe($.eslint.format());
32+
});
33+
34+
gulp.task('js', ['lint', 'bump'], function() {
2935
var pkg = getPackageJson(),
3036
banner = [
3137
'/*!',

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "selectric",
3-
"version": "1.9.5",
3+
"version": "1.9.6",
44
"main": "public/jquery.selectric.js",
55
"title": "jQuery Selectric",
66
"author": {
@@ -31,13 +31,14 @@
3131
"jquery": "^2.1.4"
3232
},
3333
"devDependencies": {
34-
"browserify": "^13.0.0",
3534
"codecov.io": "^0.1.6",
35+
"eslint": "^2.5.1",
3636
"gulp": "^3.9.1",
3737
"gulp-autoprefixer": "^3.1.0",
3838
"gulp-bump": "^1.0.0",
3939
"gulp-connect": "^3.1.0",
4040
"gulp-csscomb": "^3.0.6",
41+
"gulp-eslint": "^2.0.0",
4142
"gulp-gh-pages": "^0.5.4",
4243
"gulp-header": "^1.7.1",
4344
"gulp-load-plugins": "^1.2.0",
@@ -59,8 +60,10 @@
5960
"phantomjs-prebuilt": "^2.1.5"
6061
},
6162
"scripts": {
62-
"test": "karma start --single-run --browsers PhantomJS",
63+
"test": "npm run lint && npm run test:single",
64+
"test:single": "karma start --single-run --browsers PhantomJS",
6365
"test:watch": "karma start",
66+
"lint": "eslint src/*.js",
6467
"codecov": "cat coverage/*/lcov.info | codecov"
6568
}
6669
}

0 commit comments

Comments
 (0)