adding lint rule for console.log
This commit is contained in:
parent
c5fd92cd94
commit
63cc5447d5
|
@ -45,6 +45,12 @@
|
|||
"no-prototype-builtins": "off",
|
||||
"local-rules/no-budibase-imports": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["packages/builder/**/*"],
|
||||
"rules": {
|
||||
"no-console": ["error", { "allow": ["warn", "error", "debug"] } ]
|
||||
}
|
||||
}
|
||||
],
|
||||
"rules": {
|
||||
|
|
|
@ -364,7 +364,6 @@ const getContextBindings = (asset, componentId) => {
|
|||
* Generates a set of bindings for a given component context
|
||||
*/
|
||||
const generateComponentContextBindings = (asset, componentContext) => {
|
||||
console.log("Hello ")
|
||||
const { component, definition, contexts } = componentContext
|
||||
if (!component || !definition || !contexts?.length) {
|
||||
return []
|
||||
|
|
|
@ -21,7 +21,7 @@ export const createBuilderWebsocket = appId => {
|
|||
})
|
||||
})
|
||||
socket.on("connect_error", err => {
|
||||
console.log("Failed to connect to builder websocket:", err.message)
|
||||
console.error("Failed to connect to builder websocket:", err.message)
|
||||
})
|
||||
socket.on("disconnect", () => {
|
||||
userStore.actions.reset()
|
||||
|
|
|
@ -312,7 +312,7 @@ export const insertBinding = (view, from, to, text, mode) => {
|
|||
} else if (mode.name == "handlebars") {
|
||||
parsedInsert = hbInsert(view.state.doc?.toString(), from, to, text)
|
||||
} else {
|
||||
console.log("Unsupported")
|
||||
console.warn("Unsupported")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
}))
|
||||
navigateStep(target)
|
||||
} else {
|
||||
console.log("Could not retrieve step")
|
||||
console.warn("Could not retrieve step")
|
||||
}
|
||||
} else {
|
||||
if (typeof tourStep.onComplete === "function") {
|
||||
|
|
|
@ -3,11 +3,11 @@ import { get } from "svelte/store"
|
|||
|
||||
const registerNode = async (node, tourStepKey) => {
|
||||
if (!node) {
|
||||
console.log("Tour Handler - an anchor node is required")
|
||||
console.warn("Tour Handler - an anchor node is required")
|
||||
}
|
||||
|
||||
if (!get(store).tourKey) {
|
||||
console.log("Tour Handler - No active tour ", tourStepKey, node)
|
||||
console.error("Tour Handler - No active tour ", tourStepKey, node)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const endUserOnboarding = async ({ skipped = false } = {}) => {
|
|||
onboarding: false,
|
||||
}))
|
||||
} catch (e) {
|
||||
console.log("Onboarding failed", e)
|
||||
console.error("Onboarding failed", e)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
@ -52,7 +52,7 @@ export const syncURLToState = options => {
|
|||
let cachedPage = get(routify.page)
|
||||
let previousParamsHash = null
|
||||
let debug = false
|
||||
const log = (...params) => debug && console.log(`[${urlParam}]`, ...params)
|
||||
const log = (...params) => debug && console.debug(`[${urlParam}]`, ...params)
|
||||
|
||||
// Navigate to a certain URL
|
||||
const gotoUrl = (url, params) => {
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
return
|
||||
}
|
||||
if (!prodAppId) {
|
||||
console.log("Application id required")
|
||||
console.error("Application id required")
|
||||
return
|
||||
}
|
||||
await usersFetch.update({
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
try {
|
||||
await store.actions.screens.updateSetting(get(selectedScreen), key, value)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
notifications.error("Error saving screen settings")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
$goto(`./${screenId}`)
|
||||
store.actions.screens.select(screenId)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
notifications.error("Error creating screens")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
async function login() {
|
||||
form.validate()
|
||||
if (Object.keys(errors).length > 0) {
|
||||
console.log("errors", errors)
|
||||
console.error("errors", errors)
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue