Add linter fixes

This commit is contained in:
Christoph Diehl 2018-03-19 05:54:40 +01:00
parent 360f7abb1e
commit 43b69880b1
No known key found for this signature in database
GPG key ID: 799CE5B68FEF404A
21 changed files with 141 additions and 156 deletions

View file

@ -19,7 +19,6 @@ if (utils.platform.name.isWindows) {
} }
class logger { class logger {
static console (msg) { static console (msg) {
if (websocket) { if (websocket) {
websocket.send(msg) websocket.send(msg)
@ -31,7 +30,7 @@ class logger {
console.log(msg) console.log(msg)
} }
} else if (window.dump) { } else if (window.dump) {
dump(msg) dump(msg) // eslint-disable-line no-undef
} else if (window.console && window.console.log) { } else if (window.console && window.console.log) {
console.log(msg) console.log(msg)
} else { } else {

View file

@ -3,9 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class logging { class logging {
constructor () {
}
static get logger () { static get logger () {
// Or: const {logger} = require('./logging') // Or: const {logger} = require('./logging')
return require('./console') return require('./console')

View file

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const make = require('../make')
const random = require('../random') const random = require('../random')
const make = require('../make')
const utils = require('../utils')
class crypto extends make { class crypto extends make {
static get keyFormats () { static get keyFormats () {

View file

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const make = require('../make')
const random = require('../random') const random = require('../random')
const make = require('../make')
const utils = require('../utils')
class shaders extends make { class shaders extends make {
static get fragment1 () { static get fragment1 () {

View file

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const make = require('../make')
const random = require('../random') const random = require('../random')
const make = require('../make')
const utils = require('../utils')
class text extends make { class text extends make {
static lineEnd () { static lineEnd () {

View file

@ -28,28 +28,28 @@ class MersenneTwister {
} }
} }
export_state () { export_state () { // eslint-disable-line camelcase
return [this.mt, this.mti] return [this.mt, this.mti]
} }
import_state (s) { import_state (s) { // eslint-disable-line camelcase
this.mt = s[0] this.mt = s[0]
this.mti = s[1] this.mti = s[1]
} }
export_mta () { export_mta () { // eslint-disable-line camelcase
return this.mt return this.mt
} }
import_mta (_mta) { import_mta (_mta) { // eslint-disable-line camelcase
this.mt = _mta this.mt = _mta
} }
export_mti () { export_mti () { // eslint-disable-line camelcase
return this.mti return this.mti
} }
import_mti (_mti) { import_mti (_mti) { // eslint-disable-line camelcase
this.mti = _mti this.mti = _mti
} }

View file

@ -6,7 +6,6 @@ const MersenneTwister = require('./mersennetwister')
const {logger} = require('../logging') const {logger} = require('../logging')
class random { class random {
/** /**
* Must be called before any other methods can be called to initialize MersenneTwister. * Must be called before any other methods can be called to initialize MersenneTwister.
* @param {number|null|undefined} seed Value to initialize MersenneTwister. * @param {number|null|undefined} seed Value to initialize MersenneTwister.

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const random = require('../random')
const utils = require('../utils') const utils = require('../utils')
class block extends utils { class block extends utils {

View file

@ -1,7 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const utils = require('../utils')
class common extends utils { class common extends utils {
static objToString (obj) { static objToString (obj) {

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const random = require('../random')
const utils = require('../utils') const utils = require('../utils')
const {logger} = require('../logging') const {logger} = require('../logging')
@ -113,4 +114,4 @@ class Objects {
} }
} }
module.exports = Object module.exports = {Objects, o}

View file

@ -2,8 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const utils = require('../utils')
const random = require('../random') const random = require('../random')
const make = require('../make')
const utils = require('../utils')
const {o} = require('../objects')
class script extends utils { class script extends utils {
static methodHead (list, numOptional) { static methodHead (list, numOptional) {

View file

@ -2,13 +2,7 @@
"name": "octo", "name": "octo",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"keywords": [ "keywords": ["fuzzing", "browser", "javascript", "node", "library"],
"fuzzing",
"browsers",
"javascript",
"node",
"library"
],
"homepage": "https://github.com/mozillasecurity/octo", "homepage": "https://github.com/mozillasecurity/octo",
"repository": { "repository": {
"type": "git", "type": "git",
@ -32,17 +26,7 @@
"standard": { "standard": {
"ignore": [ "ignore": [
"tests/**", "tests/**",
"deploy/" "dist/"
],
"globals": [
"random",
"make",
"utils",
"logger",
"MersenneTwister",
"o",
"btoa",
"atob"
], ],
"envs": [ "envs": [
"browser" "browser"

View file

@ -1,5 +1,4 @@
const path = require('path') const path = require('path')
const webpack = require("webpack")
let config = { let config = {
entry: './lib/index.js', entry: './lib/index.js',