Skip to content

Commit 61f1516

Browse files
committed
enabled jshint via grunt, checked conformance
1 parent afb7d7d commit 61f1516

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

Gruntfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ module.exports = function (grunt) {
6868
eqnull: true,
6969
browser: true,
7070
globals: {
71-
jQuery: true
71+
jQuery: true,
72+
console: true
7273
}
7374
},
7475
src: 'src/jquery.typer.js'
@@ -90,6 +91,6 @@ module.exports = function (grunt) {
9091
grunt.loadNpmTasks('grunt-contrib-copy');
9192

9293
// Default task.
93-
grunt.registerTask('dist', [/*'jshint:dist', */'concat:dist', 'uglify:dist', 'copy:dist']);
94+
grunt.registerTask('dist', ['jshint:dist', 'concat:dist', 'uglify:dist', 'copy:dist']);
9495

9596
};

dist/jquery.typer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ String.prototype.rightChars = function(n){
1414
var opts,
1515
highlight,
1616
clearText,
17-
backspace,
1817
type,
1918
spanWithColor,
2019
clearDelay,
@@ -155,10 +154,10 @@ String.prototype.rightChars = function(n){
155154
});
156155
}
157156

158-
if (opts.typerOrder == 'random') {
157+
if (opts.typerOrder === 'random') {
159158
$e.typeTo(targets[Math.floor(Math.random()*targets.length)]);
160159
}
161-
else if (opts.typerOrder == 'sequential') {
160+
else if (opts.typerOrder === 'sequential') {
162161
$e.typeTo(targets[last]);
163162
last = (last < targets.length - 1) ? last + 1 : 0;
164163
}

dist/jquery.typer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.typer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ String.prototype.rightChars = function(n){
1414
var opts,
1515
highlight,
1616
clearText,
17-
backspace,
1817
type,
1918
spanWithColor,
2019
clearDelay,
@@ -155,10 +154,10 @@ String.prototype.rightChars = function(n){
155154
});
156155
}
157156

158-
if (opts.typerOrder == 'random') {
157+
if (opts.typerOrder === 'random') {
159158
$e.typeTo(targets[Math.floor(Math.random()*targets.length)]);
160159
}
161-
else if (opts.typerOrder == 'sequential') {
160+
else if (opts.typerOrder === 'sequential') {
162161
$e.typeTo(targets[last]);
163162
last = (last < targets.length - 1) ? last + 1 : 0;
164163
}

0 commit comments

Comments
 (0)