Skip to content

Commit 558d85a

Browse files
author
Zeno Rocha
committed
Add indentation checker
1 parent a3f394b commit 558d85a

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

Gruntfile.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ module.exports = function(grunt) {
2424
}
2525
},
2626

27+
lintspaces: {
28+
all: {
29+
src: [
30+
'*', 'src/*', 'spec/*', 'demo/*', 'assets/base.css'
31+
],
32+
options: {
33+
newline: true,
34+
trailingspaces: true,
35+
indentation: 'tabs',
36+
spaces: 2
37+
}
38+
}
39+
},
40+
2741
jasmine: {
2842
src: 'src/jquery.github.js',
2943
options: {
@@ -33,15 +47,13 @@ module.exports = function(grunt) {
3347
}
3448
},
3549

36-
// Lint definitions
3750
jshint: {
3851
files: ['src/jquery.github.js'],
3952
options: {
4053
jshintrc: ".jshintrc"
4154
}
4255
},
4356

44-
// Minify definitions
4557
uglify: {
4658
options: {
4759
banner: '<%= meta.banner %>'
@@ -61,10 +73,14 @@ module.exports = function(grunt) {
6173

6274
});
6375

64-
// Load all Grunt tasks installed from NPM
65-
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
76+
grunt.loadNpmTasks('grunt-contrib-concat');
77+
grunt.loadNpmTasks('grunt-contrib-jasmine');
78+
grunt.loadNpmTasks('grunt-contrib-jshint');
79+
grunt.loadNpmTasks('grunt-contrib-uglify');
80+
grunt.loadNpmTasks('grunt-contrib-watch');
81+
grunt.loadNpmTasks('grunt-lintspaces');
6682

67-
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
68-
grunt.registerTask('test', ['jshint', 'jasmine']);
83+
grunt.registerTask('default', ['lintspaces', 'jshint', 'concat', 'uglify']);
84+
grunt.registerTask('test', ['lintspaces', 'jshint', 'jasmine']);
6985

7086
};

assets/base.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@
198198
font-family: 'EntypoRegular';
199199
src: url('Entypo-webfont.eot');
200200
src: url('Entypo-webfont.eot?#iefix') format('embedded-opentype'),
201-
url('Entypo-webfont.woff') format('woff'),
202-
url('Entypo-webfont.ttf') format('truetype'),
203-
url('Entypo-webfont.svg#EntypoRegular') format('svg');
201+
url('Entypo-webfont.woff') format('woff'),
202+
url('Entypo-webfont.ttf') format('truetype'),
203+
url('Entypo-webfont.svg#EntypoRegular') format('svg');
204204
font-weight: normal;
205205
font-style: normal;
206206
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"author": "Zeno Rocha",
66
"homepage": "https://github.com/zenorocha/jquery-github/",
77
"version": "0.3.2",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/zenorocha/jquery-github.git"
11+
},
812
"devDependencies": {
913
"grunt": "~0.4.1",
1014
"grunt-cli": "~0.1.7",
@@ -13,7 +17,7 @@
1317
"grunt-contrib-concat": "~0.3.0",
1418
"grunt-contrib-uglify": "~0.2.0",
1519
"grunt-contrib-watch": "~0.4.2",
16-
"matchdep": "~0.3.0"
20+
"grunt-lintspaces": "0.2.203"
1721
},
1822
"scripts": {
1923
"test": "grunt test --verbose"

0 commit comments

Comments
 (0)