Add linter fixes
This commit is contained in:
parent
360f7abb1e
commit
43b69880b1
21 changed files with 141 additions and 156 deletions
|
@ -19,7 +19,6 @@ if (utils.platform.name.isWindows) {
|
|||
}
|
||||
|
||||
class logger {
|
||||
|
||||
static console (msg) {
|
||||
if (websocket) {
|
||||
websocket.send(msg)
|
||||
|
@ -31,7 +30,7 @@ class logger {
|
|||
console.log(msg)
|
||||
}
|
||||
} else if (window.dump) {
|
||||
dump(msg)
|
||||
dump(msg) // eslint-disable-line no-undef
|
||||
} else if (window.console && window.console.log) {
|
||||
console.log(msg)
|
||||
} else {
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
class logging {
|
||||
constructor () {
|
||||
}
|
||||
|
||||
static get logger () {
|
||||
// Or: const {logger} = require('./logging')
|
||||
return require('./console')
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* 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/. */
|
||||
|
||||
const make = require('../make')
|
||||
const random = require('../random')
|
||||
const make = require('../make')
|
||||
const utils = require('../utils')
|
||||
|
||||
class crypto extends make {
|
||||
static get keyFormats () {
|
||||
|
@ -54,7 +55,7 @@ class crypto extends make {
|
|||
]
|
||||
}
|
||||
|
||||
static randomCurve (){
|
||||
static randomCurve () {
|
||||
return random.item(this.curves)
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class font extends make {
|
|||
])
|
||||
}
|
||||
|
||||
static font() {
|
||||
static font () {
|
||||
let s = ''
|
||||
if (random.chance(4)) {
|
||||
s += random.pick(this.style) + ' '
|
||||
|
|
|
@ -60,7 +60,7 @@ class number extends make {
|
|||
return Math.pow(2, random.number(random.number(65))) + random.number(3) - 1
|
||||
}
|
||||
|
||||
static even(number) {
|
||||
static even (number) {
|
||||
return number % 2 === 1 ? ++number : number
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* 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/. */
|
||||
|
||||
const make = require('../make')
|
||||
const random = require('../random')
|
||||
const make = require('../make')
|
||||
const utils = require('../utils')
|
||||
|
||||
class shaders extends make {
|
||||
static get fragment1 () {
|
||||
|
@ -29,7 +30,7 @@ class shaders extends make {
|
|||
]
|
||||
}
|
||||
|
||||
static get vertex1() {
|
||||
static get vertex1 () {
|
||||
return [
|
||||
[
|
||||
'attribute vec4 aVertex;',
|
||||
|
@ -63,7 +64,7 @@ class shaders extends make {
|
|||
]
|
||||
}
|
||||
|
||||
static get fragment2() {
|
||||
static get fragment2 () {
|
||||
return [
|
||||
[
|
||||
'varying highp vec2 vTextureCoord;',
|
||||
|
@ -96,7 +97,7 @@ class shaders extends make {
|
|||
]
|
||||
}
|
||||
|
||||
static get vertex2() {
|
||||
static get vertex2 () {
|
||||
return [
|
||||
[
|
||||
'attribute highp vec3 aVertexNormal;',
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* 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/. */
|
||||
|
||||
const make = require('../make')
|
||||
const random = require('../random')
|
||||
const make = require('../make')
|
||||
const utils = require('../utils')
|
||||
|
||||
class text extends make {
|
||||
static lineEnd () {
|
||||
|
|
|
@ -28,28 +28,28 @@ class MersenneTwister {
|
|||
}
|
||||
}
|
||||
|
||||
export_state () {
|
||||
export_state () { // eslint-disable-line camelcase
|
||||
return [this.mt, this.mti]
|
||||
}
|
||||
|
||||
import_state (s) {
|
||||
import_state (s) { // eslint-disable-line camelcase
|
||||
this.mt = s[0]
|
||||
this.mti = s[1]
|
||||
}
|
||||
|
||||
export_mta () {
|
||||
export_mta () { // eslint-disable-line camelcase
|
||||
return this.mt
|
||||
}
|
||||
|
||||
import_mta (_mta) {
|
||||
import_mta (_mta) { // eslint-disable-line camelcase
|
||||
this.mt = _mta
|
||||
}
|
||||
|
||||
export_mti () {
|
||||
export_mti () { // eslint-disable-line camelcase
|
||||
return this.mti
|
||||
}
|
||||
|
||||
import_mti (_mti) {
|
||||
import_mti (_mti) { // eslint-disable-line camelcase
|
||||
this.mti = _mti
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ const MersenneTwister = require('./mersennetwister')
|
|||
const {logger} = require('../logging')
|
||||
|
||||
class random {
|
||||
|
||||
/**
|
||||
* Must be called before any other methods can be called to initialize MersenneTwister.
|
||||
* @param {number|null|undefined} seed Value to initialize MersenneTwister.
|
||||
|
|
|
@ -2,6 +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/. */
|
||||
|
||||
const random = require('../random')
|
||||
const utils = require('../utils')
|
||||
|
||||
class block extends utils {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* 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/. */
|
||||
|
||||
const utils = require('../utils')
|
||||
|
||||
class common extends utils {
|
||||
static objToString (obj) {
|
||||
|
|
|
@ -2,6 +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/. */
|
||||
|
||||
const random = require('../random')
|
||||
const utils = require('../utils')
|
||||
const {logger} = require('../logging')
|
||||
|
||||
|
@ -113,4 +114,4 @@ class Objects {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = Object
|
||||
module.exports = {Objects, o}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
* 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/. */
|
||||
|
||||
const utils = require('../utils')
|
||||
const random = require('../random')
|
||||
const make = require('../make')
|
||||
const utils = require('../utils')
|
||||
const {o} = require('../objects')
|
||||
|
||||
class script extends utils {
|
||||
static methodHead (list, numOptional) {
|
||||
|
|
20
package.json
20
package.json
|
@ -2,13 +2,7 @@
|
|||
"name": "octo",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"fuzzing",
|
||||
"browsers",
|
||||
"javascript",
|
||||
"node",
|
||||
"library"
|
||||
],
|
||||
"keywords": ["fuzzing", "browser", "javascript", "node", "library"],
|
||||
"homepage": "https://github.com/mozillasecurity/octo",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -32,17 +26,7 @@
|
|||
"standard": {
|
||||
"ignore": [
|
||||
"tests/**",
|
||||
"deploy/"
|
||||
],
|
||||
"globals": [
|
||||
"random",
|
||||
"make",
|
||||
"utils",
|
||||
"logger",
|
||||
"MersenneTwister",
|
||||
"o",
|
||||
"btoa",
|
||||
"atob"
|
||||
"dist/"
|
||||
],
|
||||
"envs": [
|
||||
"browser"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const path = require('path')
|
||||
const webpack = require("webpack")
|
||||
|
||||
let config = {
|
||||
entry: './lib/index.js',
|
||||
|
|
Loading…
Reference in a new issue