Fixing some issues CI linting found.
This commit is contained in:
parent
decc1aba5e
commit
90dce862f1
|
@ -4,8 +4,6 @@ import builtins from "rollup-plugin-node-builtins"
|
||||||
import globals from "rollup-plugin-node-globals"
|
import globals from "rollup-plugin-node-globals"
|
||||||
import json from "@rollup/plugin-json"
|
import json from "@rollup/plugin-json"
|
||||||
|
|
||||||
const production = !process.env.ROLLUP_WATCH
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: "src/index.js",
|
input: "src/index.js",
|
||||||
output: [
|
output: [
|
||||||
|
|
|
@ -24,7 +24,8 @@ exports.registerAll = handlebars => {
|
||||||
for (let collection of EXTERNAL_FUNCTION_COLLECTIONS) {
|
for (let collection of EXTERNAL_FUNCTION_COLLECTIONS) {
|
||||||
// collect information about helper
|
// collect information about helper
|
||||||
let hbsHelperInfo = helpers[collection]()
|
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
|
// skip built in functions and ones seen already
|
||||||
if (
|
if (
|
||||||
HelperFunctionBuiltin.indexOf(name) !== -1 ||
|
HelperFunctionBuiltin.indexOf(name) !== -1 ||
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { FIND_HBS_REGEX } = require("../utilities")
|
/* eslint-disable no-unused-vars */
|
||||||
|
|
||||||
class Postprocessor {
|
class Postprocessor {
|
||||||
constructor(name, fn) {
|
constructor(name, fn) {
|
||||||
this.name = name
|
this.name = name
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const { HelperNames } = require("../helpers")
|
const { HelperNames } = require("../helpers")
|
||||||
const { swapStrings, isAlphaNumeric, FIND_HBS_REGEX } = require("../utilities")
|
const { swapStrings, isAlphaNumeric } = require("../utilities")
|
||||||
|
|
||||||
const PreprocessorNames = {
|
const PreprocessorNames = {
|
||||||
SWAP_TO_DOT: "swap-to-dot-notation",
|
SWAP_TO_DOT: "swap-to-dot-notation",
|
||||||
|
@ -7,6 +7,7 @@ const PreprocessorNames = {
|
||||||
FINALISE: "finalise",
|
FINALISE: "finalise",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* eslint-disable no-unused-vars */
|
||||||
class Preprocessor {
|
class Preprocessor {
|
||||||
constructor(name, fn) {
|
constructor(name, fn) {
|
||||||
this.name = name
|
this.name = name
|
||||||
|
|
|
@ -14,12 +14,10 @@ module.exports.swapStrings = (string, start, length, swap) => {
|
||||||
module.exports.removeNull = obj => {
|
module.exports.removeNull = obj => {
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
Object.entries(obj)
|
Object.entries(obj)
|
||||||
.filter(([key, value]) => value != null)
|
.filter(entry => entry[1] != null)
|
||||||
.map(([key, value]) => [
|
.map(([key, value]) => [
|
||||||
key,
|
key,
|
||||||
value === Object(value) ? module.exports.removeNull(value) : value,
|
value === Object(value) ? module.exports.removeNull(value) : value,
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.findHbsStatements = string => {}
|
|
||||||
|
|
Loading…
Reference in New Issue