fixing jshint issues, modifying to allow for some not too strict jshint rules, adding grunt newer dependency.

This commit is contained in:
Nelson Omuto 2014-10-03 16:13:48 -04:00
parent 5e0ac669d0
commit 82aae6fbf0
7 changed files with 24 additions and 62 deletions

View File

@ -1,6 +1,5 @@
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": false,
"es3": false,
@ -15,7 +14,6 @@
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "double",
"undef": true,
"unused": true,
"strict": false,

View File

@ -80,21 +80,21 @@ module.exports = function(grunt) {
test: {
options: {
port: 8041,
open: 'http://localhost:8041/_SpecRunner.html',
open: "http://localhost:8041/_SpecRunner.html",
base: "."
}
}
},
jasmine: {
scripts: 'scripts/**/*.js',
scripts: "scripts/**/*.js",
options: {
build: true,
specs: 'test/*Spec.js',
helpers: 'test/*Helper.js',
specs: "test/*Spec.js",
helpers: "test/*Helper.js",
vendor: [
'https://code.jquery.com/jquery-1.10.2.min.js',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'
"https://code.jquery.com/jquery-1.10.2.min.js",
"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
]
}
},
@ -107,8 +107,7 @@ module.exports = function(grunt) {
all: [
"Gruntfile.js",
"scripts/**/*.js",
"template/**/*.js",
"test/**/*.js"
"template/**/*.js"
],
test: {
options: {
@ -132,9 +131,9 @@ module.exports = function(grunt) {
livereload: "<%= connect.options.livereload %>"
},
files: [
'index.html',
'css-compiled/**/*.css',
'**/*.{png,jpg,jpeg,gif,webp,svg}'
"index.html",
"css-compiled/**/*.css",
"**/*.{png,jpg,jpeg,gif,webp,svg}"
]
}
}
@ -168,6 +167,6 @@ module.exports = function(grunt) {
"build:"+ buildTarget,
"connect:livereload",
"watch"
])
]);
});
};

View File

@ -1,43 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href=".grunt/grunt-contrib-jasmine/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href=".grunt/grunt-contrib-jasmine/jasmine.css">
</head>
<body>
<script src=".grunt/grunt-contrib-jasmine/es5-shim.js"></script>
<script src=".grunt/grunt-contrib-jasmine/jasmine.js"></script>
<script src=".grunt/grunt-contrib-jasmine/jasmine-html.js"></script>
<script src=".grunt/grunt-contrib-jasmine/json2.js"></script>
<script src=".grunt/grunt-contrib-jasmine/boot.js"></script>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="test/*Helper.js"></script>
<script src="scripts/material.js"></script>
<script src="scripts/ripples.js"></script>
<script src="test/materialSpec.js"></script>
<script src="test/ripplesSpec.js"></script>
<script src=".grunt/grunt-contrib-jasmine/reporter.js"></script>
</body>
</html>

View File

@ -27,6 +27,7 @@
"grunt-contrib-less": "^0.11.4",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-newer": "^0.7.0",
"jshint-stylish": "^1.0.0",
"load-grunt-tasks": "^0.6.0"
}

View File

@ -1,13 +1,15 @@
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
/* globals CustomEvent */
var ripples = {
window.ripples = {
init : function(withRipple) {
"use strict";
// Cross browser matches function
function matchesSelector(dom_element, selector) {
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
dom_element.mozMatchesSelector ||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
return matches.call(dom_element, selector);
}

View File

@ -1,13 +1,15 @@
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
/* globals CustomEvent */
var ripples = {
window.ripples = {
init : function(withRipple) {
"use strict";
// Cross browser matches function
function matchesSelector(dom_element, selector) {
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector;
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
dom_element.mozMatchesSelector ||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
return matches.call(dom_element, selector);
}

View File

@ -39,6 +39,9 @@
"brackets": true,
"define": true,
"Mustache": true,
"window": true
"window": true,
"expect": true,
"describe": true,
"it": true
}
}