Skip to content

Commit 20a57d5

Browse files
Merge pull request #103 from Four-Lights-NL/chore/update-biome
chore: update biome and apply linting fixes
2 parents 130b795 + d143a63 commit 20a57d5

File tree

20 files changed

+106
-51
lines changed

20 files changed

+106
-51
lines changed

.release-it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
"npm": {
1616
"publish": true
1717
}
18-
}
18+
}

biome.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
33
"vcs": {
44
"enabled": false,
55
"clientKind": "git",
@@ -22,7 +22,33 @@
2222
"formatWithErrors": true,
2323
"lineWidth": 120
2424
},
25-
"assist": { "actions": { "source": { "organizeImports": "on" } } },
25+
"assist": {
26+
"actions": {
27+
"source": {
28+
"organizeImports": {
29+
"level": "on",
30+
"options": {
31+
"groups": [
32+
{ "source": [":BUN:", ":NODE:"], "type": true },
33+
":BLANK_LINE:",
34+
{ "source": [":BUN:", ":NODE:"], "type": false },
35+
":BLANK_LINE:",
36+
{ "source": [":PACKAGE:", ":BLANK_LINE:"], "type": true },
37+
":BLANK_LINE:",
38+
{ "source": [":PACKAGE:", ":BLANK_LINE:"], "type": false },
39+
":BLANK_LINE:",
40+
{ "source": [":ALIAS:", ":PATH:"], "type": true },
41+
":BLANK_LINE:",
42+
{ "source": [":ALIAS:", ":PATH:"], "type": false }
43+
]
44+
}
45+
},
46+
"useSortedAttributes": "on",
47+
"useSortedKeys": "off"
48+
}
49+
},
50+
"enabled": true
51+
},
2652
"linter": {
2753
"enabled": true,
2854
"rules": {

package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"lodash": "^4.17.21"
3737
},
3838
"devDependencies": {
39-
"@biomejs/biome": "^2.2.4",
39+
"@biomejs/biome": "^2.3.6",
4040
"@strapi/database": "^5.14.0",
4141
"@strapi/sdk-plugin": "^5.3.2",
4242
"@strapi/strapi": "^5.24.1",

playground/__tests__/helpers/files.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import fs from "node:fs/promises"
22
import os from "node:os"
33
import path from "node:path"
4+
45
import type { Core } from "@strapi/strapi"
6+
57
import { File } from "formidable"
68

79
const createFormidableFile = async (base64Image: string): Promise<File> => {

playground/__tests__/helpers/strapi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { existsSync } from "node:fs"
22
import fs from "node:fs/promises"
33
import { tmpdir } from "node:os"
44
import path from "node:path"
5+
56
import type { Config } from "@fourlights/strapi-plugin-deep-populate/dist/server/src/config/index"
7+
68
import { type Core, compileStrapi, createStrapi } from "@strapi/strapi"
79
import { isEmpty, merge } from "lodash"
810
import { vi } from "vitest"

playground/__tests__/memory-usage.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { afterAll, beforeAll, describe, it } from "vitest"
2+
3+
import type { UnwrapPromise } from "./helpers/unwrapPromise"
4+
25
import * as MemoryTracker from "./helpers/memoryTracker"
36
import { setupDocuments } from "./helpers/setupDocuments"
47
import { setupStrapi, strapi, teardownStrapi } from "./helpers/strapi"
5-
import type { UnwrapPromise } from "./helpers/unwrapPromise"
68

79
describe.sequential("Memory Usage Tests", () => {
810
let context: UnwrapPromise<ReturnType<typeof setupDocuments>>

playground/__tests__/services/populate/api.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import type { Modules } from "@strapi/strapi"
2+
23
import supertest from "supertest"
4+
5+
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
6+
37
import { setupDocuments } from "../../helpers/setupDocuments"
48
import { setupStrapi, strapi, teardownStrapi } from "../../helpers/strapi"
5-
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
69

710
describe("api", () => {
811
let context: UnwrapPromise<ReturnType<typeof setupDocuments>>

playground/__tests__/services/populate/cache-invalidation.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { UID } from "@strapi/strapi"
2+
3+
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
4+
25
import { setupDocuments } from "../../helpers/setupDocuments"
36
import { setupStrapi, strapi, teardownStrapi } from "../../helpers/strapi"
4-
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
57

68
describe("cache invalidation", () => {
79
const contentType = "api::page.page" as const

playground/__tests__/services/populate/config.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { Core, Data, Modules, UID } from "@strapi/strapi"
2+
3+
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
4+
25
import { setupDocuments } from "../../helpers/setupDocuments"
36
import { setupStrapi, strapi, teardownStrapi } from "../../helpers/strapi"
4-
import type { UnwrapPromise } from "../../helpers/unwrapPromise"
57

68
describe("config", () => {
79
let context: UnwrapPromise<ReturnType<typeof setupDocuments>> & {

0 commit comments

Comments
 (0)