Skip to content

Commit

Permalink
eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Apr 4, 2024
1 parent 2a5fd20 commit 3143cea
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 20 deletions.
14 changes: 7 additions & 7 deletions src/_util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,13 @@ class Util {
const headKeys = this._headKeys(headComments)

const params = {
headKeys: headKeys,
name: name,
filepath: filepath,
codepath: codepath,
code: code,
language: language,
category: category,
headKeys,
name,
filepath,
codepath,
code,
language,
category,
func_name: funcName,
func_arguments: funcParams
}
Expand Down
2 changes: 1 addition & 1 deletion src/php/array/array_splice.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function array_splice (arr, offst, lgth, replacement) { // esli

const isInt = require('../var/is_int')

var _checkToUpIndices = function (arr, ct, key) {
const _checkToUpIndices = function (arr, ct, key) {
// Deal with situation, e.g., if encounter index 4 and try
// to set it to 0, but 0 exists later in loop (need to
// increment all subsequent (skipping current key,
Expand Down
2 changes: 1 addition & 1 deletion src/php/json/json_encode.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = function json_encode (mixedVal) { // eslint-disable-line camelc
: '"' + string + '"'
}

var _str = function (key, holder) {
const _str = function (key, holder) {
let gap = ''
const indent = ' '
// The loop counter.
Expand Down
2 changes: 1 addition & 1 deletion src/php/math/max.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function max () {
return ar
}
}
var _compare = function (current, next) {
const _compare = function (current, next) {
let i = 0
let n = 0
let tmp = 0
Expand Down
2 changes: 1 addition & 1 deletion src/php/math/min.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function min () {
return ar
}

var _compare = function (current, next) {
const _compare = function (current, next) {
let i = 0
let n = 0
let tmp = 0
Expand Down
4 changes: 3 additions & 1 deletion src/php/misc/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ module.exports = function pack (format) {
const key = (lastBit = precisionBits - 1 +
(k =
(exp = bias + 1 - k) >= minExp &&
exp <= maxExp ? k + 1 : bias + 1 - (exp = minExp - 1))) + 1
exp <= maxExp
? k + 1
: bias + 1 - (exp = minExp - 1))) + 1

if (bin[key]) {
if (!(rounded = bin[lastBit])) {
Expand Down
2 changes: 1 addition & 1 deletion src/php/net-gopher/gopher_parsedir.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = function gopher_parsedir (dirent) { // eslint-disable-line came
} // GOPHER_UNKNOWN
}
return {
type: type,
type,
title: entry[2],
path: entry[3],
host: entry[4],
Expand Down
6 changes: 3 additions & 3 deletions src/php/network/setrawcookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = function setrawcookie (name, value, expires, path, domain, secu
const r = [name + '=' + value]
let i = ''
const s = {
expires: expires,
path: path,
domain: domain
expires,
path,
domain
}
for (i in s) {
if (s.hasOwnProperty(i)) {
Expand Down
2 changes: 1 addition & 1 deletion src/php/url/http_build_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function http_build_query (formdata, numericPrefix, argSeparato
let key
const tmp = []

var _httpBuildQueryHelper = function (key, val, argSeparator) {
const _httpBuildQueryHelper = function (key, val, argSeparator) {
let k
const tmp = []
if (val === true) {
Expand Down
2 changes: 1 addition & 1 deletion src/php/var/print_r.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function print_r (array, returnVal) { // eslint-disable-line ca
}
return str
}
var _formatArray = function (obj, curDepth, padVal, padChar) {
const _formatArray = function (obj, curDepth, padVal, padChar) {
if (curDepth > 0) {
curDepth++
}
Expand Down
2 changes: 1 addition & 1 deletion src/php/var/var_dump.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = function var_dump () { // eslint-disable-line camelcase
return ret
}

var _formatArray = function (obj, curDepth, padVal, padChar) {
const _formatArray = function (obj, curDepth, padVal, padChar) {
if (curDepth > 0) {
curDepth++
}
Expand Down
2 changes: 1 addition & 1 deletion src/php/xdiff/xdiff_string_diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = function xdiff_string_diff (oldData, newData, contextLines, min
}

// Function to find lcs and fill in the array to indicate the optimal longest common sequence
var _findLcs = function (xs, xidx, xIsIn, ys) {
const _findLcs = function (xs, xidx, xIsIn, ys) {
let i
let xb
let xe
Expand Down

0 comments on commit 3143cea

Please sign in to comment.