Skip to content

Commit cc3cf92

Browse files
committed
migrate to biome
1 parent 5d15147 commit cc3cf92

File tree

21 files changed

+208
-3092
lines changed

21 files changed

+208
-3092
lines changed

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.organizeImports": "never",
4+
"source.organizeImports.biome": "explicit"
5+
},
6+
"editor.defaultFormatter": "biomejs.biome",
7+
"editor.formatOnSave": true,
8+
"prettier.enable": false,
9+
"prettier.prettierPath": "",
10+
"eslint.format.enable": false,
11+
"eslint.enable": false
12+
}

app/profile/[login]/components/overview-cards/overview-rank-card.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const CardFooterRank: FC<PropsWithChildren> = ({ children }) => {
3232

3333
export const ProfileRankCard: FC<ProfileRankCardProps> = ({ login, ranks, tiers, country }) => {
3434
const { sTier, cTier, fTier, bestTier } = calculateTiers(ranks, tiers as RankTier);
35-
const sRank = sTier?.notRanked || sTier?.notAvailable ? 0 : ranks?.s ?? ranks?.sProvisional ?? 0;
36-
const cRank = cTier?.notRanked || cTier?.notAvailable ? 0 : ranks?.c ?? ranks?.cProvisional ?? 0;
37-
const fRank = fTier?.notRanked || fTier?.notAvailable ? 0 : ranks?.f ?? ranks?.fProvisional ?? 0;
35+
const sRank = sTier?.notRanked || sTier?.notAvailable ? 0 : (ranks?.s ?? ranks?.sProvisional ?? 0);
36+
const cRank = cTier?.notRanked || cTier?.notAvailable ? 0 : (ranks?.c ?? ranks?.cProvisional ?? 0);
37+
const fRank = fTier?.notRanked || fTier?.notAvailable ? 0 : (ranks?.f ?? ranks?.fProvisional ?? 0);
3838

3939
const getCardContent = () => {
4040
if (sTier?.notAvailable && cTier?.notAvailable && fTier?.notAvailable) {

biome.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"indentStyle": "space",
6+
"indentWidth": 2,
7+
"lineWidth": 120
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true,
13+
"a11y": { "recommended": true },
14+
"style": {
15+
"noNonNullAssertion": "off"
16+
}
17+
}
18+
},
19+
"javascript": {
20+
"formatter": {
21+
"quoteStyle": "single",
22+
"jsxQuoteStyle": "double"
23+
}
24+
},
25+
"vcs": {
26+
"enabled": true,
27+
"clientKind": "git",
28+
"useIgnoreFile": true
29+
},
30+
"files": {
31+
"ignoreUnknown": false,
32+
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "!components/ui", "!types/generated"]
33+
}
34+
}

components/icons/follower.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgFollower = (props: SVGProps<SVGSVGElement>) => (
4-
<svg
5-
xmlns="http://www.w3.org/2000/svg"
6-
fill="none"
7-
viewBox="0 0 24 24"
8-
{...props}
9-
>
4+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" {...props}>
105
<path
116
stroke="currentColor"
127
strokeLinecap="round"

components/icons/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { default as Follower } from "./follower";
2-
export { default as PullRequest } from "./pull-request";
3-
export { default as Star } from "./star";
1+
export { default as Follower } from './follower';
2+
export { default as PullRequest } from './pull-request';
3+
export { default as Star } from './star';

components/icons/pull-request.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgPullRequest = (props: SVGProps<SVGSVGElement>) => (
4-
<svg
5-
xmlns="http://www.w3.org/2000/svg"
6-
fill="none"
7-
viewBox="0 0 24 24"
8-
{...props}
9-
>
4+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" {...props}>
105
<path
116
stroke="currentColor"
127
strokeLinecap="round"

components/icons/star.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgStar = (props: SVGProps<SVGSVGElement>) => (
4-
<svg
5-
xmlns="http://www.w3.org/2000/svg"
6-
fill="none"
7-
viewBox="0 0 24 24"
8-
{...props}
9-
>
4+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" {...props}>
105
<path
116
stroke="currentColor"
127
strokeLinecap="round"

components/monster-avatar/svg/monster-1.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgMonster1 = (props: SVGProps<SVGSVGElement>) => (
4-
<svg
5-
xmlns="http://www.w3.org/2000/svg"
6-
fill="none"
7-
overflow="visible"
8-
viewBox="35.6 34 106.8 104.444"
9-
{...props}
10-
>
4+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" overflow="visible" viewBox="35.6 34 106.8 104.444" {...props}>
115
<path
126
fill="#020303"
137
fillRule="evenodd"

components/monster-avatar/svg/monster-10.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgMonster10 = (props: SVGProps<SVGSVGElement>) => (
44
<svg
55
xmlns="http://www.w3.org/2000/svg"

components/monster-avatar/svg/monster-2.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from "react";
2-
import type { SVGProps } from "react";
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
33
const SvgMonster2 = (props: SVGProps<SVGSVGElement>) => (
44
<svg
55
xmlns="http://www.w3.org/2000/svg"

0 commit comments

Comments
 (0)