Skip to content

Commit dad7f74

Browse files
committed
perf: replace eslint with biome
BREAKING CHANGE: we decided to replace eslint and prettier with biome. No new feature, just syntax changes
1 parent 5a3d889 commit dad7f74

64 files changed

Lines changed: 392 additions & 376 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 87 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
// List of extensions which should be recommended for users of this workspace.
66
"recommendations": [
7-
"esbenp.prettier-vscode",
8-
"dbaeumer.vscode-eslint",
7+
"biomejs.biome",
98
"bradlc.vscode-tailwindcss",
109
"stylelint.vscode-stylelint",
1110
"ms-playwright.playwright"

.vscode/launch.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib",
3+
"biome.enabled": true,
4+
"editor.defaultFormatter": "biomejs.biome",
35
"editor.formatOnSave": true,
4-
// "typescript.referencesCodeLens.enabled": false,
5-
"eslint.validate": [
6-
"javascript",
7-
"javascriptreact",
8-
"typescript",
9-
"typescriptreact"
10-
],
11-
"css.validate": false,
12-
"less.validate": false,
13-
"scss.validate": false,
146
"editor.codeActionsOnSave": {
15-
"source.fixAll.eslint": "explicit"
7+
"quickfix.biome": "explicit",
8+
"source.organizeImports.biome": "explicit"
169
}
17-
}
10+
}

@typings/checkout.d.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare namespace Organization {
22
type DefaultConfig =
3-
import("@commercelayer/organization-config").DefaultConfig
3+
import('@commercelayer/organization-config').DefaultConfig
44
}
55

66
type NullableType<T> = T | null | undefined
@@ -41,18 +41,18 @@ interface InvalidCheckoutSettings {
4141

4242
type CheckoutPageContextProps = Pick<
4343
CheckoutSettings,
44-
| "accessToken"
45-
| "orderId"
46-
| "logoUrl"
47-
| "isGuest"
48-
| "companyName"
49-
| "endpoint"
50-
| "language"
51-
| "primaryColor"
52-
| "favicon"
53-
| "gtmId"
54-
| "supportEmail"
55-
| "supportPhone"
56-
| "termsUrl"
57-
| "privacyUrl"
44+
| 'accessToken'
45+
| 'orderId'
46+
| 'logoUrl'
47+
| 'isGuest'
48+
| 'companyName'
49+
| 'endpoint'
50+
| 'language'
51+
| 'primaryColor'
52+
| 'favicon'
53+
| 'gtmId'
54+
| 'supportEmail'
55+
| 'supportPhone'
56+
| 'termsUrl'
57+
| 'privacyUrl'
5858
>

biome.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"formatWithErrors": true
17+
},
18+
"organizeImports": {
19+
"enabled": true
20+
},
21+
"linter": {
22+
"enabled": true,
23+
"rules": {
24+
"suspicious": {
25+
"noArrayIndexKey": "off",
26+
"noExplicitAny": "off"
27+
},
28+
"a11y": {
29+
"useAnchorContent": "off",
30+
"useKeyWithClickEvents": "off"
31+
},
32+
"recommended": true,
33+
"complexity": {
34+
"noUselessFragments": "off",
35+
"noForEach": "off"
36+
},
37+
"correctness": {
38+
"useExhaustiveDependencies": "off"
39+
}
40+
}
41+
},
42+
"javascript": {
43+
"formatter": {
44+
"semicolons": "asNeeded"
45+
}
46+
}
47+
}

components/composite/Checkout/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import {
1616
} from "components/composite/StepCustomer"
1717
import { StepNav } from "components/composite/StepNav"
1818
import {
19-
StepPayment,
2019
StepHeaderPayment,
20+
StepPayment,
2121
} from "components/composite/StepPayment"
2222
import { PaymentContainer } from "components/composite/StepPayment/PaymentContainer"
2323
import StepPlaceOrder from "components/composite/StepPlaceOrder"
2424
import {
25-
StepShipping,
2625
StepHeaderShipping,
26+
StepShipping,
2727
} from "components/composite/StepShipping"
2828
import { AccordionProvider } from "components/data/AccordionProvider"
2929
import { AppContext } from "components/data/AppProvider"

0 commit comments

Comments
 (0)