Fixing some issues CI linting found.

This commit is contained in:
mike12345567 2021-01-21 18:08:04 +00:00
parent decc1aba5e
commit 90dce862f1
5 changed files with 6 additions and 9 deletions

View File

@ -4,8 +4,6 @@ import builtins from "rollup-plugin-node-builtins"
import globals from "rollup-plugin-node-globals"
import json from "@rollup/plugin-json"
const production = !process.env.ROLLUP_WATCH
export default {
input: "src/index.js",
output: [

View File

@ -24,7 +24,8 @@ exports.registerAll = handlebars => {
for (let collection of EXTERNAL_FUNCTION_COLLECTIONS) {
// collect information about helper
let hbsHelperInfo = helpers[collection]()
for (let [name, func] of Object.entries(hbsHelperInfo)) {
for (let entry of Object.entries(hbsHelperInfo)) {
const name = entry[0]
// skip built in functions and ones seen already
if (
HelperFunctionBuiltin.indexOf(name) !== -1 ||

View File

@ -1,5 +1,4 @@
const { FIND_HBS_REGEX } = require("../utilities")
/* eslint-disable no-unused-vars */
class Postprocessor {
constructor(name, fn) {
this.name = name

View File

@ -1,5 +1,5 @@
const { HelperNames } = require("../helpers")
const { swapStrings, isAlphaNumeric, FIND_HBS_REGEX } = require("../utilities")
const { swapStrings, isAlphaNumeric } = require("../utilities")
const PreprocessorNames = {
SWAP_TO_DOT: "swap-to-dot-notation",
@ -7,6 +7,7 @@ const PreprocessorNames = {
FINALISE: "finalise",
}
/* eslint-disable no-unused-vars */
class Preprocessor {
constructor(name, fn) {
this.name = name

View File

@ -14,12 +14,10 @@ module.exports.swapStrings = (string, start, length, swap) => {
module.exports.removeNull = obj => {
return Object.fromEntries(
Object.entries(obj)
.filter(([key, value]) => value != null)
.filter(entry => entry[1] != null)
.map(([key, value]) => [
key,
value === Object(value) ? module.exports.removeNull(value) : value,
])
)
}
module.exports.findHbsStatements = string => {}