diff --git a/biome.json b/biome.json index c8f42a2ec0..13f580c8ca 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.0.5/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.15/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -14,10 +14,11 @@ "bin/**", "e2e/**", "private/**", - "!packages/**/{dist,lib}/**", + "!packages/**/{dist,lib}", "!node_modules", "!.svelte-kit", - "!packages/@uppy/components/src/input.css" + "!packages/@uppy/components/src/input.css", + "!examples/angular/**/*.html" ] }, "formatter": { @@ -25,20 +26,11 @@ "indentStyle": "space", "formatWithErrors": true }, + "html": { + "experimentalFullSupportEnabled": true + }, "linter": { "enabled": true, - "includes": [ - "packages/**", - "examples/**", - "scripts/**", - "private/**", - "!packages/**/{dist,lib}/**", - "!node_modules", - "!.svelte-kit", - "!packages/@uppy/components/src/input.css", - "!**/*.vue", - "!**/*.svelte" - ], "rules": { "recommended": true, "suspicious": { @@ -48,37 +40,26 @@ "useExhaustiveDependencies": "error", "useHookAtTopLevel": "error", "noUnusedFunctionParameters": "off", + "noUnusedImports": "error", + "noUnusedPrivateClassMembers": "error", "noUnusedVariables": { "level": "error", "options": { "ignoreRestSiblings": true } - } + }, + "noNestedComponentDefinitions": "error", + "noReactPropAssignments": "error" }, "style": { "noNonNullAssertion": "off" }, "a11y": { - "noSvgWithoutTitle": "off" - }, - "nursery": { - "noNestedComponentDefinitions": "error", - "noReactPropAssign": "error" + "noSvgWithoutTitle": "off", + "useSemanticElements": "off" } } }, - "overrides": [ - { - "includes": ["packages/@uppy/companion/**"], - "linter": { - "rules": { - "complexity": { - "useLiteralKeys": "off" - } - } - } - } - ], "javascript": { "formatter": { "quoteStyle": "single", @@ -92,5 +73,36 @@ "organizeImports": "on" } } - } + }, + "overrides": [ + { + "includes": ["packages/@uppy/companion/**"], + "linter": { + "rules": { + "complexity": { + "useLiteralKeys": "off" + } + } + } + }, + { + "includes": ["**/*.vue", "**/*.svelte", "packages/@uppy/vue/**/*.ts"], + "linter": { + "rules": { + "correctness": { + "useHookAtTopLevel": "off", + "useExhaustiveDependencies": "off" + } + } + } + }, + { + "includes": ["examples/nextjs/**/*.css"], + "css": { + "parser": { + "tailwindDirectives": true + } + } + } + ] } diff --git a/examples/aws-companion/index.html b/examples/aws-companion/index.html index 0b86787b77..01eacb7a82 100644 --- a/examples/aws-companion/index.html +++ b/examples/aws-companion/index.html @@ -1,5 +1,5 @@ - + diff --git a/examples/aws-nodejs/public/index.html b/examples/aws-nodejs/public/index.html index 881a07567a..cd7d79f601 100644 --- a/examples/aws-nodejs/public/index.html +++ b/examples/aws-nodejs/public/index.html @@ -1,5 +1,5 @@ - + Uppy – AWS upload example @@ -24,7 +24,8 @@

AWS upload example

- + - +
diff --git a/examples/transloadit/index.html b/examples/transloadit/index.html index a3919ae1f8..a9e0b9c1f6 100644 --- a/examples/transloadit/index.html +++ b/examples/transloadit/index.html @@ -1,5 +1,5 @@ - + @@ -140,7 +140,7 @@

Dashboard Modal

This API is a one-shot upload UI using a modal overlay. Call the function and receive a listen to an event with upload results ✌️

- +

uppy.upload()

An <input type=file> backed by uppy.upload():

diff --git a/examples/transloadit/server.js b/examples/transloadit/server.js index 765301bd52..c71994b0e5 100755 --- a/examples/transloadit/server.js +++ b/examples/transloadit/server.js @@ -36,7 +36,7 @@ function Footer() { } function FormFields(fields) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Field([name, value]) { if (name === 'transloadit') return '' let isValueJSON = false @@ -76,7 +76,7 @@ function FormFields(fields) { } function UploadsList(uploads) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Upload(upload) { return `
  • ${e(upload.name)}
  • ` } @@ -89,12 +89,12 @@ function UploadsList(uploads) { } function ResultsList(results) { - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function Result(result) { return `
  • ${e(result.name)} View
  • ` } - // biome-ignore lint/nursery/noNestedComponentDefinitions: not a react component + // biome-ignore lint/correctness/noNestedComponentDefinitions: not a react component function ResultsSection(stepName) { return `

    ${e(stepName)}

    diff --git a/examples/vue/src/Dropzone.vue b/examples/vue/src/Dropzone.vue index c36d0a9a9e..4bb75fd80a 100644 --- a/examples/vue/src/Dropzone.vue +++ b/examples/vue/src/Dropzone.vue @@ -7,7 +7,7 @@ >
    - - - -
    +
    - - - - -
    - - - -
    - - - - - -