diff --git a/.eslintrc.json b/.eslintrc.json
index 2d9ab315a3..5c12e7c29c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -21,6 +21,7 @@
}
],
"rules": {
- "prettier/prettier": "error"
+ "prettier/prettier": "error",
+ "no-self-assign": "off"
}
}
\ No newline at end of file
diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte
index de64d43249..86c7580a56 100644
--- a/packages/builder/src/App.svelte
+++ b/packages/builder/src/App.svelte
@@ -29,4 +29,3 @@
-
diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js
index e925c04e8d..62ebd39682 100644
--- a/packages/builder/src/builderStore/store/backend.js
+++ b/packages/builder/src/builderStore/store/backend.js
@@ -80,4 +80,4 @@ export const createDatabaseForApp = store => appInstance => {
state.appInstances.push(appInstance)
return state
})
-}
\ No newline at end of file
+}
diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js
index 5adb1b88f3..ae6fee5345 100644
--- a/packages/builder/src/builderStore/store/index.js
+++ b/packages/builder/src/builderStore/store/index.js
@@ -1,5 +1,5 @@
import { cloneDeep, values } from "lodash/fp"
-import { backendUiStore } from "builderStore";
+import { backendUiStore } from "builderStore"
import * as backendStoreActions from "./backend"
import { writable, get } from "svelte/store"
import api from "../api"
@@ -194,7 +194,7 @@ const setCurrentScreen = store => screenName => {
const deleteScreen = store => name => {
store.update(s => {
const components = s.components.filter(c => c.name !== name)
- const screens = s.screens.filter(c => c.name !== name);
+ const screens = s.screens.filter(c => c.name !== name)
s.components = components
s.screens = screens
@@ -251,12 +251,12 @@ const renameScreen = store => (oldname, newname) => {
const savePage = store => async page => {
store.update(state => {
- if (s.currentFrontEndType !== "page" || !s.currentPageName) {
+ if (state.currentFrontEndType !== "page" || !state.currentPageName) {
return state
}
- s.pages[s.currentPageName] = page
- _savePage(s)
+ state.pages[state.currentPageName] = page
+ _savePage(state)
return state
})
}
@@ -271,7 +271,9 @@ const addStylesheet = store => stylesheet => {
const removeStylesheet = store => stylesheet => {
store.update(state => {
- state.pages.stylesheets = s.pages.stylesheets.filter(s => s !== stylesheet)
+ state.pages.stylesheets = state.pages.stylesheets.filter(
+ s => s !== stylesheet
+ )
_savePage(state)
return state
})
@@ -351,12 +353,16 @@ const addChildComponent = store => (componentToAdd, presetName) => {
const presetProps = presetName ? component.presets[presetName] : {}
- const instanceId = get(backendUiStore).selectedDatabase._id;
+ const instanceId = get(backendUiStore).selectedDatabase._id
- const newComponent = createProps(component, {
- ...presetProps,
- _instanceId: instanceId
- }, state)
+ const newComponent = createProps(
+ component,
+ {
+ ...presetProps,
+ _instanceId: instanceId,
+ },
+ state
+ )
state.currentComponentInfo._children = state.currentComponentInfo._children.concat(
newComponent.props
@@ -442,7 +448,7 @@ const setComponentCode = store => code => {
// save without messing with the store
_saveScreenApi(state.currentPreviewItem, state)
- return s
+ return state
})
}
diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
index ec03a77247..b9208b15a3 100644
--- a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
+++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
@@ -9,10 +9,7 @@
let databaseName
async function createDatabase() {
- const response = await api.createDatabase(
- $store.appId,
- databaseName
- )
+ const response = await api.createDatabase($store.appId, databaseName)
store.createDatabaseForApp(response)
onClosed()
}
diff --git a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
index 57ae0a71c2..3c774cc4b8 100644
--- a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
+++ b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
@@ -32,8 +32,8 @@ export default ({
text-transform: uppercase;
font-weight: bold;
}
- <\/style>
- <\script>
+
+
diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
index 09f7af7c81..684d400399 100644
--- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
+++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
@@ -1,5 +1,5 @@
@@ -28,7 +27,7 @@
diff --git a/packages/standard-components/src/DataForm.svelte b/packages/standard-components/src/DataForm.svelte
index 1316b51fe8..6213dd231a 100644
--- a/packages/standard-components/src/DataForm.svelte
+++ b/packages/standard-components/src/DataForm.svelte
@@ -8,7 +8,7 @@
let username
let password
let newModel = {
- modelId: model._id
+ modelId: model._id,
}
let store = _bb.store
@@ -16,16 +16,13 @@
async function save() {
const SAVE_RECORD_URL = `/api/${_instanceId}/records`
- const response = await _bb.api.post(SAVE_RECORD_URL, newModel);
- const json = await response.json();
+ const response = await _bb.api.post(SAVE_RECORD_URL, newModel)
+ const json = await response.json()
store.update(state => {
- state[model._id] = [
- ...state[model._id],
- json
- ]
+ state[model._id] = [...state[model._id], json]
return state
- });
+ })
}
const handleInput = field => event => {
@@ -54,17 +51,14 @@
{#each fields as field}
-
+
{/each}
-
+