-
Notifications
You must be signed in to change notification settings - Fork 2.1k
@uppy: upgrade biome and more improvements #6244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dde27af
6bc038a
9e2cada
4a94e0e
2c679ca
2c997bc
44cebfe
2e8a95d
ba59d96
78a50c1
20732c6
ebbfbc9
81d3656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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,31 +14,23 @@ | |
| "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": { | ||
| "enabled": true, | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
Comment on lines
+79
to
+87
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is added due to a conflict : companion's tsconfig.shared.json sets noPropertyAccessFromIndexSignature: true. This is a deliberate, strict TypeScript option that says:
|
||
| { | ||
| "includes": ["**/*.vue", "**/*.svelte", "packages/@uppy/vue/**/*.ts"], | ||
| "linter": { | ||
| "rules": { | ||
| "correctness": { | ||
| "useHookAtTopLevel": "off", | ||
| "useExhaustiveDependencies": "off" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
Comment on lines
+89
to
+98
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI Summary : What policy this protects: the framework's own reactivity model These two rules are React-specific:
Biome triggers them on any identifier starting with use*. But:
|
||
| { | ||
| "includes": ["examples/nextjs/**/*.css"], | ||
| "css": { | ||
| "parser": { | ||
| "tailwindDirectives": true | ||
| } | ||
| } | ||
|
Comment on lines
+100
to
+105
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI summary : The Next.js example uses Tailwind v4 directives: These are not standard CSS. Without the tailwindDirectives: true setting, Biome's CSS parser errors |
||
| } | ||
|
Comment on lines
+77
to
+106
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this override block is used for overriding lint rules for certain paths , I will check them to see what do we actually need , for example : the first rule https://biomejs.dev/linter/rules/use-literal-keys/ |
||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can safely remove this now because biome
2.4can fully lint.vueand.sveltefiles using the flagexperimentalFullSupportEnabled: true,linter.includesfalls back tofiles.includes, which already contains all the paths which should be linted.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously we needed this block so that we can disable lint for
.vueandsveltefiles. check the last two paths