Skip to content

Commit 1c46573

Browse files
authored
PoC: Migrate from Eslint + Prettier to Biome (#4545)
This PR completely removes ESLint (linter) and Prettier (formatter) and replaces them with Biome. In this initial PR, only the dependencies and CI configurations are updated to use Biome. All of Biome's failing rules have been temporarily disabled. The plan is to enable these rules incrementally in future PRs. The current Biome formatting configuration closely mirrors the existing Prettier setup, with the only new feature enabled is import sorting.
1 parent 4b8706d commit 1c46573

File tree

282 files changed

+4732
-8759
lines changed

Some content is hidden

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

282 files changed

+4732
-8759
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,20 @@ jobs:
9090
run: "yamllint -s ."
9191

9292
javascript-lint:
93-
if: needs.files-changed.outputs.javascript == 'true'
94-
needs: ["files-changed"]
9593
runs-on: ubuntu-latest
9694
timeout-minutes: 5
9795
steps:
9896
- name: "Check out repository code"
9997
uses: "actions/checkout@v4"
10098
with:
10199
submodules: true
102-
- name: Install NodeJS
103-
uses: actions/setup-node@v4
100+
- name: Setup Biome
101+
uses: biomejs/setup-biome@v2
104102
with:
105-
node-version: 20
106-
cache: 'npm'
107-
cache-dependency-path: frontend/app/package-lock.json
108-
- name: Install frontend dependencies
109-
working-directory: ./frontend/app
110-
run: npm install
111-
- name: Run ESLint
103+
version: 1.9.3
104+
- name: Run Biome
112105
working-directory: ./frontend/app
113-
run: npm run eslint
106+
run: biome ci .
114107

115108
python-lint:
116109
if: needs.files-changed.outputs.python == 'true'

frontend/app/.eslintignore

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

frontend/app/.eslintrc

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

frontend/app/.prettierignore

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

frontend/app/.prettierrc.json

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

frontend/app/biome.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
3+
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4+
"files": {
5+
"ignoreUnknown": false,
6+
"ignore": ["./coverage", "./dist", "./playwright-report", "./src/generated", "./test-results"]
7+
},
8+
"formatter": {
9+
"enabled": true,
10+
"useEditorconfig": true,
11+
"formatWithErrors": false,
12+
"indentStyle": "space",
13+
"indentWidth": 2,
14+
"lineEnding": "lf",
15+
"lineWidth": 100,
16+
"attributePosition": "auto",
17+
"bracketSpacing": true
18+
},
19+
"organizeImports": { "enabled": true },
20+
"linter": {
21+
"enabled": true,
22+
"rules": {
23+
"all": true,
24+
"a11y": {
25+
"noSvgWithoutTitle": "off",
26+
"useAriaPropsForRole": "off",
27+
"useButtonType": "off",
28+
"useKeyWithClickEvents": "off",
29+
"useSemanticElements": "off"
30+
},
31+
"complexity": {
32+
"noBannedTypes": "off",
33+
"noExcessiveCognitiveComplexity": "off",
34+
"noForEach": "off",
35+
"noUselessFragments": "off",
36+
"noUselessSwitchCase": "off",
37+
"noUselessThisAlias": "off",
38+
"useArrowFunction": "off",
39+
"useDateNow": "off",
40+
"useOptionalChain": "off",
41+
"useSimplifiedLogicExpression": "off"
42+
},
43+
"correctness": {
44+
"noSwitchDeclarations": "off",
45+
"noUndeclaredDependencies": "off",
46+
"noUndeclaredVariables": "off",
47+
"noUnusedFunctionParameters": "off",
48+
"noUnusedImports": "off",
49+
"noUnusedVariables": "off",
50+
"useExhaustiveDependencies": "off",
51+
"useHookAtTopLevel": "off",
52+
"useImportExtensions": "off"
53+
},
54+
"performance": {
55+
"noAccumulatingSpread": "off",
56+
"useTopLevelRegex": "off"
57+
},
58+
"style": {
59+
"noArguments": "off",
60+
"noDefaultExport": "off",
61+
"noImplicitBoolean": "off",
62+
"noInferrableTypes": "off",
63+
"noNamespace": "off",
64+
"noNamespaceImport": "off",
65+
"noNegationElse": "off",
66+
"noNonNullAssertion": "off",
67+
"noUselessElse": "off",
68+
"useBlockStatements": "off",
69+
"useConsistentArrayType": "off",
70+
"useConsistentBuiltinInstantiation": "off",
71+
"useConst": "off",
72+
"useDefaultSwitchClause": "off",
73+
"useEnumInitializers": "off",
74+
"useExplicitLengthCheck": "off",
75+
"useFilenamingConvention": "off",
76+
"useImportType": "off",
77+
"useNamingConvention": "off",
78+
"useNumberNamespace": "off",
79+
"useSelfClosingElements": "off",
80+
"useShorthandArrayType": "off",
81+
"useSingleCaseStatement": "off",
82+
"useTemplate": "off"
83+
},
84+
"suspicious": {
85+
"noArrayIndexKey": "off",
86+
"noAssignInExpressions": "off",
87+
"noConsole": "off",
88+
"noConsoleLog": "off",
89+
"noDoubleEquals": "off",
90+
"noEmptyBlock": "off",
91+
"noEmptyBlockStatements": "off",
92+
"noEvolvingTypes": "off",
93+
"noExplicitAny": "off",
94+
"noExportsInTest": "off",
95+
"noGlobalIsNan": "off",
96+
"noImplicitAnyLet": "off",
97+
"noReactSpecificProps": "off",
98+
"useAwait": "off"
99+
}
100+
}
101+
},
102+
"javascript": {
103+
"formatter": {
104+
"jsxQuoteStyle": "double",
105+
"quoteProperties": "asNeeded",
106+
"trailingCommas": "es5",
107+
"semicolons": "always",
108+
"arrowParentheses": "always",
109+
"bracketSameLine": false,
110+
"quoteStyle": "double",
111+
"attributePosition": "auto",
112+
"bracketSpacing": true
113+
}
114+
}
115+
}

frontend/app/cypress/support/component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ Cypress.Commands.add("mount", (component, options = {}) => {
6060
options={{
6161
searchStringToObject: queryString.parse,
6262
objectToSearchString: queryString.stringify,
63-
}}>
63+
}}
64+
>
6465
{component}
6566
</QueryParamProvider>
6667
</MemoryRouter>

0 commit comments

Comments
 (0)