Skip to content

Commit 82aae6f

Browse files
committed
fixing jshint issues, modifying to allow for some not too strict jshint rules, adding grunt newer dependency.
1 parent 5e0ac66 commit 82aae6f

7 files changed

Lines changed: 24 additions & 62 deletions

File tree

.jshintrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"bitwise": true,
3-
"camelcase": true,
43
"curly": true,
54
"eqeqeq": false,
65
"es3": false,
@@ -15,7 +14,6 @@
1514
"nonbsp": true,
1615
"nonew": true,
1716
"plusplus": false,
18-
"quotmark": "double",
1917
"undef": true,
2018
"unused": true,
2119
"strict": false,

Gruntfile.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ module.exports = function(grunt) {
8080
test: {
8181
options: {
8282
port: 8041,
83-
open: 'http://localhost:8041/_SpecRunner.html',
83+
open: "http://localhost:8041/_SpecRunner.html",
8484
base: "."
8585
}
8686
}
8787
},
8888

8989
jasmine: {
90-
scripts: 'scripts/**/*.js',
90+
scripts: "scripts/**/*.js",
9191
options: {
9292
build: true,
93-
specs: 'test/*Spec.js',
94-
helpers: 'test/*Helper.js',
93+
specs: "test/*Spec.js",
94+
helpers: "test/*Helper.js",
9595
vendor: [
96-
'https://code.jquery.com/jquery-1.10.2.min.js',
97-
'https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'
96+
"https://code.jquery.com/jquery-1.10.2.min.js",
97+
"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
9898
]
9999
}
100100
},
@@ -107,8 +107,7 @@ module.exports = function(grunt) {
107107
all: [
108108
"Gruntfile.js",
109109
"scripts/**/*.js",
110-
"template/**/*.js",
111-
"test/**/*.js"
110+
"template/**/*.js"
112111
],
113112
test: {
114113
options: {
@@ -132,9 +131,9 @@ module.exports = function(grunt) {
132131
livereload: "<%= connect.options.livereload %>"
133132
},
134133
files: [
135-
'index.html',
136-
'css-compiled/**/*.css',
137-
'**/*.{png,jpg,jpeg,gif,webp,svg}'
134+
"index.html",
135+
"css-compiled/**/*.css",
136+
"**/*.{png,jpg,jpeg,gif,webp,svg}"
138137
]
139138
}
140139
}
@@ -168,6 +167,6 @@ module.exports = function(grunt) {
168167
"build:"+ buildTarget,
169168
"connect:livereload",
170169
"watch"
171-
])
170+
]);
172171
});
173172
};

_SpecRunner.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"grunt-contrib-less": "^0.11.4",
2828
"grunt-contrib-sass": "^0.8.1",
2929
"grunt-contrib-watch": "^0.6.1",
30+
"grunt-newer": "^0.7.0",
3031
"jshint-stylish": "^1.0.0",
3132
"load-grunt-tasks": "^0.6.0"
3233
}

scripts/ripples.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
22
/* globals CustomEvent */
33

4-
var ripples = {
4+
window.ripples = {
55
init : function(withRipple) {
66
"use strict";
77

88
// Cross browser matches function
99
function matchesSelector(dom_element, selector) {
10-
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
10+
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
11+
dom_element.mozMatchesSelector ||
12+
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
1113
return matches.call(dom_element, selector);
1214
}
1315

template/material/scripts/ripples.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
22
/* globals CustomEvent */
33

4-
var ripples = {
4+
window.ripples = {
55
init : function(withRipple) {
66
"use strict";
77

88
// Cross browser matches function
99
function matchesSelector(dom_element, selector) {
10-
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
10+
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
11+
dom_element.mozMatchesSelector ||
12+
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
1113
return matches.call(dom_element, selector);
1214
}
1315

test/.jshintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
"brackets": true,
4040
"define": true,
4141
"Mustache": true,
42-
"window": true
42+
"window": true,
43+
"expect": true,
44+
"describe": true,
45+
"it": true
4346
}
4447
}

0 commit comments

Comments
 (0)