run prettier + lint over typescript files as well
This commit is contained in:
parent
8fa522cff0
commit
2577a6631a
|
@ -36,10 +36,10 @@
|
|||
"dev:server": "lerna run --parallel dev:builder --concurrency 1 --scope @budibase/worker --scope @budibase/server",
|
||||
"test": "lerna run test",
|
||||
"lint:eslint": "eslint packages",
|
||||
"lint:prettier": "prettier --check \"packages/**/*.{js,svelte}\"",
|
||||
"lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\"",
|
||||
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
||||
"lint:fix:eslint": "eslint --fix packages",
|
||||
"lint:fix:prettier": "prettier --write \"packages/**/*.{js,svelte}\"",
|
||||
"lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\"",
|
||||
"lint:fix:ts": "lerna run lint:fix",
|
||||
"lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
||||
"test:e2e": "lerna run cy:test",
|
||||
|
|
|
@ -14,7 +14,6 @@ module MongoMock {
|
|||
this.updateOne = jest.fn()
|
||||
this.updateMany = jest.fn(() => ({ toArray: () => [] }))
|
||||
|
||||
|
||||
this.collection = jest.fn(() => ({
|
||||
insertOne: this.insertOne,
|
||||
find: this.find,
|
||||
|
|
|
@ -62,7 +62,8 @@ module FetchMock {
|
|||
return json({
|
||||
url,
|
||||
opts,
|
||||
value: "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en-GB\"></html>",
|
||||
value:
|
||||
'<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en-GB"></html>',
|
||||
})
|
||||
} else if (url.includes("failonce.com")) {
|
||||
failCount++
|
||||
|
|
|
@ -11,15 +11,13 @@ module PgMock {
|
|||
}))
|
||||
|
||||
// constructor
|
||||
function Client() {
|
||||
}
|
||||
function Client() {}
|
||||
|
||||
Client.prototype.query = query
|
||||
Client.prototype.connect = jest.fn()
|
||||
Client.prototype.release = jest.fn()
|
||||
|
||||
function Pool() {
|
||||
}
|
||||
function Pool() {}
|
||||
|
||||
const on = jest.fn()
|
||||
Pool.prototype.query = query
|
||||
|
|
|
@ -153,8 +153,15 @@ export function isIsoDateString(str: string) {
|
|||
* @param column The column to check, to see if it is a valid relationship.
|
||||
* @param tableIds The IDs of the tables which currently exist.
|
||||
*/
|
||||
function shouldCopyRelationship(column: { type: string, tableId?: string }, tableIds: [string]) {
|
||||
return column.type === FieldTypes.LINK && column.tableId && tableIds.includes(column.tableId)
|
||||
function shouldCopyRelationship(
|
||||
column: { type: string; tableId?: string },
|
||||
tableIds: [string]
|
||||
) {
|
||||
return (
|
||||
column.type === FieldTypes.LINK &&
|
||||
column.tableId &&
|
||||
tableIds.includes(column.tableId)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,9 +172,15 @@ function shouldCopyRelationship(column: { type: string, tableId?: string }, tabl
|
|||
* @param column The column to check for options or boolean type.
|
||||
* @param fetchedColumn The fetched column to check for the type in the external database.
|
||||
*/
|
||||
function shouldCopySpecialColumn(column: { type: string }, fetchedColumn: { type: string } | undefined) {
|
||||
return column.type === FieldTypes.OPTIONS ||
|
||||
((!fetchedColumn || fetchedColumn.type === FieldTypes.NUMBER) && column.type === FieldTypes.BOOLEAN)
|
||||
function shouldCopySpecialColumn(
|
||||
column: { type: string },
|
||||
fetchedColumn: { type: string } | undefined
|
||||
) {
|
||||
return (
|
||||
column.type === FieldTypes.OPTIONS ||
|
||||
((!fetchedColumn || fetchedColumn.type === FieldTypes.NUMBER) &&
|
||||
column.type === FieldTypes.BOOLEAN)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue