-
Notifications
You must be signed in to change notification settings - Fork 2
Replace ESLint, Stylelint, and Prettier with Biome #961
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": [ | ||
| "config:base", | ||
| "github>prezly/renovate-presets:themes-nextjs" | ||
| ] | ||
| "extends": ["config:base", "github>prezly/renovate-presets:themes-nextjs"] | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| { | ||
| "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
| "files": { | ||
| "ignoreUnknown": true, | ||
| "ignore": [".next", "build", "node_modules", "README.md", "next-env.d.ts"] | ||
| }, | ||
| "formatter": { | ||
| "enabled": true, | ||
| "indentStyle": "space", | ||
| "indentWidth": 4, | ||
| "lineWidth": 100 | ||
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "quoteStyle": "single", | ||
| "semicolons": "always", | ||
| "trailingCommas": "all" | ||
| } | ||
| }, | ||
| "linter": { | ||
| "enabled": true, | ||
| "rules": { | ||
| "recommended": true, | ||
| "a11y": { | ||
| "useKeyWithClickEvents": "off", | ||
| "useSemanticElements": "off", | ||
| "useValidAnchor": "off", | ||
| "useValidAriaRole": "off" | ||
| }, | ||
| "complexity": { | ||
| "noBannedTypes": "off", | ||
| "noForEach": "off", | ||
| "useOptionalChain": "off" | ||
| }, | ||
| "correctness": { | ||
| "useExhaustiveDependencies": "off" | ||
| }, | ||
| "security": { | ||
| "noDangerouslySetInnerHtml": "off" | ||
|
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. Disabling |
||
| }, | ||
| "style": { | ||
| "noNonNullAssertion": "off", | ||
| "useNodejsImportProtocol": "off" | ||
| }, | ||
| "suspicious": { | ||
| "noExplicitAny": "off", | ||
|
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. Disabling |
||
| "noImplicitAnyLet": "off", | ||
| "noShadowRestrictedNames": "off" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ function CategoriesBar() { | |
|
|
||
| const { paddingLeft, paddingRight } = getComputedStyle(containerRef.current); | ||
| const containerWidthWithoutPadding = | ||
| containerWidth - parseInt(paddingLeft) - parseInt(paddingRight); | ||
| containerWidth - Number.parseInt(paddingLeft) - Number.parseInt(paddingRight); | ||
|
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. Good change - |
||
|
|
||
| if (containerRef.current.scrollWidth <= containerWidthWithoutPadding) { | ||
| return [categories, []]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ const UNITS = ['bytes', 'Kb', 'Mb', 'Gb']; | |
| // Convert byte amounts to meaningful text | ||
| export function formatBytes(bytes: number | string): string { | ||
| let l = 0; | ||
| let n = typeof bytes === 'number' ? bytes : parseInt(bytes, 10) || 0; | ||
| let n = typeof bytes === 'number' ? bytes : Number.parseInt(bytes, 10) || 0; | ||
|
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. Good change - |
||
|
|
||
| while (n >= 1024) { | ||
| n /= 1024; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ export default function Gallery({ gallery }: Props) { | |
| const metaDescription = useGalleryPageMetaDescription(gallery); | ||
|
|
||
| useEffect(() => { | ||
| if (typeof window !== undefined) { | ||
| if (typeof window !== 'undefined') { | ||
|
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 condition will always be true. |
||
| setUrl(window.location.href); | ||
| } | ||
| }, []); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,7 +102,7 @@ function Header({ hasError }: Props) { | |
| })} | ||
| > | ||
| <div className="container"> | ||
| <nav role="navigation" className={styles.header}> | ||
| <nav className={styles.header}> | ||
|
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. Removing the |
||
| <Link | ||
| href="/" | ||
| locale={getLinkLocaleSlug()} | ||
|
|
||
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.
Disabling
useExhaustiveDependenciescould lead to React Hook dependency issues and potential bugs. This rule helps catch missing dependencies in useEffect, useMemo, and useCallback hooks. Consider enabling this rule and fixing the violations instead.