Linter changes
* Override remaining eslint errors from standard * Run standard with grunt instead of separately
This commit is contained in:
parent
b96bec29c0
commit
0302a84fa6
10 changed files with 27 additions and 15 deletions
21
Gruntfile.js
21
Gruntfile.js
|
@ -1,7 +1,8 @@
|
|||
module.exports = function(grunt) {
|
||||
let pkg = grunt.file.readJSON('package.json')
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: pkg,
|
||||
|
||||
karma: {
|
||||
unit: {
|
||||
|
@ -13,12 +14,18 @@ module.exports = function(grunt) {
|
|||
coverageDir: 'tests/coverage/',
|
||||
force: true
|
||||
}
|
||||
},
|
||||
standard: {
|
||||
options: pkg.standard,
|
||||
lib: {
|
||||
src: ['lib/**/*.js']
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
grunt.loadNpmTasks('grunt-karma-coveralls');
|
||||
grunt.loadNpmTasks('grunt-karma')
|
||||
grunt.loadNpmTasks('grunt-karma-coveralls')
|
||||
grunt.loadNpmTasks('grunt-standard')
|
||||
|
||||
grunt.registerTask('test', ['karma', 'coveralls']);
|
||||
|
||||
};
|
||||
grunt.registerTask('test', ['standard', 'karma', 'coveralls'])
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
var websocket = null
|
||||
|
||||
var logger = (function () {
|
||||
var logger = (function () { // eslint-disable-line no-unused-vars
|
||||
let color = {
|
||||
red: '\u0033[1;31m',
|
||||
green: '\u0033[1;32m',
|
||||
|
|
|
@ -1 +1 @@
|
|||
var make = {}
|
||||
var make = {} // eslint-disable-line no-unused-vars
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
function MersenneTwister () {
|
||||
function MersenneTwister () { // eslint-disable-line no-unused-vars
|
||||
const N = 624
|
||||
const M = 397
|
||||
const UPPER_MASK = 0x80000000
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var random = {
|
||||
var random = { // eslint-disable-line no-unused-vars
|
||||
twister: null,
|
||||
|
||||
/**
|
||||
|
|
|
@ -1 +1 @@
|
|||
var utils = {}
|
||||
var utils = {} // eslint-disable-line no-unused-vars
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var o = null
|
||||
var o = null // eslint-disable-line no-unused-vars
|
||||
|
||||
// TODO: https://github.com/MozillaSecurity/octo/issues/7
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ utils.platform = {
|
|||
platform.SpeechRecognition = platformName(['SpeechRecognition', 'webkitSpeechRecognition'])
|
||||
platform.SpeechGrammarList = platformName(['SpeechGrammarList', 'webkitSpeechGrammarList'])
|
||||
|
||||
/*
|
||||
function findWebGLContextName (candidates) {
|
||||
var canvas = document.createElement('canvas')
|
||||
for (var i = 0; i < candidates.length; i++) {
|
||||
|
@ -82,6 +83,7 @@ utils.platform = {
|
|||
}
|
||||
return null
|
||||
}
|
||||
*/
|
||||
|
||||
platform.WebGL = 'webgl' // findWebGLContextName(["webgl", "experimental-webgl", "webkit-3d"]);
|
||||
platform.WebGL2 = 'webgl2' // findWebGLContextName(["webgl2", "experimental-webgl2"]);
|
||||
|
|
1
lib/utils/prototypes.js
vendored
1
lib/utils/prototypes.js
vendored
|
@ -1,3 +1,4 @@
|
|||
/* eslint no-extend-native: ["error", { "exceptions": ["String", "Array"] }] */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"grunt": "*",
|
||||
"grunt-karma": "*",
|
||||
"grunt-karma-coveralls": "*",
|
||||
"grunt-standard": "*",
|
||||
"karma": "*",
|
||||
"karma-chrome-launcher": "*",
|
||||
"karma-coverage": "*",
|
||||
|
@ -13,9 +14,10 @@
|
|||
"standard": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard -v lib/**/*.js && grunt test --verbose"
|
||||
"test": "grunt test --verbose"
|
||||
},
|
||||
"standard": {
|
||||
"globals": ["random", "make", "utils", "logger"]
|
||||
"globals": ["random", "make", "utils", "logger", "MersenneTwister", "o"],
|
||||
"envs": ["browser"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue