Skip to content

Commit 41cf263

Browse files
authored
Use BiomeJS for linting, formatting (#1626)
1 parent 1f9d08f commit 41cf263

Some content is hidden

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

76 files changed

+733
-2504
lines changed

.eslintignore

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

.eslintrc.cjs

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

.prettierignore

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

.prettierrc

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

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["biomejs.biome"]
3+
}

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"[javascript]": {
3+
"editor.defaultFormatter": "biomejs.biome"
4+
},
5+
"[json]": {
6+
"editor.defaultFormatter": "biomejs.biome"
7+
},
8+
"[markdown]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
}
14+
}

biome.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
3+
"organizeImports": {
4+
"enabled": false
5+
},
6+
"files": {
7+
"ignore": ["**/dist/**"]
8+
},
9+
"formatter": {
10+
"indentStyle": "space",
11+
"indentWidth": 2,
12+
"lineWidth": 120
13+
},
14+
"linter": {
15+
"enabled": true,
16+
"rules": {
17+
"recommended": true,
18+
"complexity": {
19+
"noExcessiveNestedTestSuites": "off",
20+
"useArrowFunction": "off"
21+
},
22+
"suspicious": {
23+
"noConsoleLog": "error",
24+
"noExplicitAny": "off"
25+
},
26+
"style": {
27+
"noUselessElse": "off",
28+
"useBlockStatements": "error"
29+
}
30+
}
31+
}
32+
}

docs/scripts/update-contributors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ async function main() {
206206
lastFetch: new Date().getTime(),
207207
};
208208
upsert(contributors[repo], userData);
209-
console.log(`Updated old contributor data for ${username}`); // eslint-disable-line no-console
209+
console.log(`Updated old contributor data for ${username}`); // biome-disable-line no-console
210210
fs.writeFileSync(
211211
new URL("../data/contributors.json", import.meta.url),
212212
JSON.stringify(contributors),

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,15 @@
1010
"scripts": {
1111
"build": "pnpm run -r --parallel --filter \"!*docs\" build",
1212
"lint": "pnpm run -r --parallel lint",
13+
"format": "pnpm run -r --parallel format",
1314
"test": "pnpm run -r --parallel test",
1415
"version": "pnpm run build && changeset version && pnpm i"
1516
},
1617
"devDependencies": {
18+
"@biomejs/biome": "^1.7.1",
1719
"@changesets/changelog-github": "^0.5.0",
1820
"@changesets/cli": "^2.27.1",
19-
"@typescript-eslint/eslint-plugin": "^7.7.1",
20-
"@typescript-eslint/parser": "^7.7.1",
2121
"del-cli": "^5.1.0",
22-
"eslint": "^8.57.0",
23-
"eslint-config-prettier": "^9.1.0",
24-
"eslint-plugin-import": "^2.29.1",
25-
"eslint-plugin-no-only-tests": "^3.1.0",
26-
"eslint-plugin-prettier": "^5.1.3",
27-
"eslint-plugin-vitest": "^0.2.8",
2822
"prettier": "^3.2.5",
2923
"typescript": "^5.4.5"
3024
}

packages/openapi-fetch/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)