Skip to content

Commit 5736bd8

Browse files
authored
Chore/biome (#1064)
* Update yarn, remove lerna * biome: typed utilities, node prefixed import statements * biome: Object.hasOwn * biome: banned types reset * biome: filter types with default values * biome: Object.hasOwn * biome: filters and lineParser default * Biome: object.has, log explicitly uses a string array getRemotes task uses correct types in implementation straightThroughBufferTask always returns a Buffer * biome: trailingArrayArguments must always be strings * biome: use overrides to ignore rules to introduce in later changes * biome: formatting * commit task to use `asStringArray` biome: formatting * Test fix, restore filterHasLength * Test fix, restore use of `String` objects in a `string[]` * biome: format * tests: restore existing TagList logic * chore: changeset * Yarn updated -> 4.10.3
1 parent 789c13e commit 5736bd8

File tree

30 files changed

+1506
-5087
lines changed

30 files changed

+1506
-5087
lines changed

.changeset/two-actors-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"simple-git": minor
3+
---
4+
5+
Change to biome for lint and format

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
node-version: 20
2121
cache: yarn
2222
- run: yarn install --immutable
23-
- run: yarn prettier --check .
23+
- run: yarn lint

.prettierignore

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

.prettierrc

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

.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-4.7.0.cjs

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

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.7.0.cjs
7+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

biome.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.1.4/schema.json",
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "off"
7+
}
8+
}
9+
},
10+
"formatter": {
11+
"enabled": true,
12+
"formatWithErrors": false,
13+
"indentStyle": "space",
14+
"indentWidth": 2,
15+
"lineEnding": "lf",
16+
"lineWidth": 100
17+
},
18+
"javascript": {
19+
"formatter": {
20+
"arrowParentheses": "always",
21+
"bracketSameLine": true,
22+
"bracketSpacing": true,
23+
"indentWidth": 3,
24+
"quoteProperties": "preserve",
25+
"quoteStyle": "single",
26+
"semicolons": "always",
27+
"trailingCommas": "es5"
28+
},
29+
"globals": ["Buffer"]
30+
},
31+
"linter": {
32+
"rules": {
33+
"complexity": {
34+
"noArguments": "off"
35+
},
36+
"performance": {
37+
"noAccumulatingSpread": "off"
38+
},
39+
"style": {
40+
"noNonNullAssertion": "off"
41+
},
42+
"suspicious": {
43+
"noAssignInExpressions": "off",
44+
"noConfusingVoidType": "off"
45+
}
46+
}
47+
},
48+
"overrides": [
49+
{
50+
"includes": ["**/*"],
51+
"linter": {
52+
"rules": {
53+
"complexity": {
54+
"noBannedTypes": "off",
55+
"noUselessEscapeInRegex": "off",
56+
"useArrowFunction": "off",
57+
"useOptionalChain": "off"
58+
},
59+
"correctness": {
60+
"noUnusedPrivateClassMembers": "off"
61+
},
62+
"style": {
63+
"useConst": "off",
64+
"useShorthandFunctionType": "off",
65+
"useTemplate": "off",
66+
"useImportType": "off",
67+
"useNodejsImportProtocol": "off"
68+
},
69+
"suspicious": {
70+
"noExplicitAny": "off",
71+
"noImplicitAnyLet": "off",
72+
"noThenProperty": "off"
73+
}
74+
}
75+
}
76+
},
77+
{
78+
"includes": ["simple-git/src/git.js", "simple-git/scripts/*"],
79+
"linter": {
80+
"rules": {
81+
"complexity": {
82+
"useArrowFunction": "off"
83+
},
84+
"correctness": {
85+
"noUnusedFunctionParameters": "off",
86+
"noUnusedVariables": "off"
87+
}
88+
}
89+
}
90+
},
91+
{
92+
"includes": [
93+
"packages/test-utils/**",
94+
"**/*.spec.ts",
95+
"**/__fixtures__/**",
96+
"**/__mocks__/**"
97+
],
98+
"assist": {
99+
"actions": {
100+
"source": {
101+
"organizeImports": "off"
102+
}
103+
}
104+
},
105+
"formatter": {
106+
"enabled": false
107+
},
108+
"linter": {
109+
"rules": {
110+
"complexity": {
111+
"noBannedTypes": "off",
112+
"useArrowFunction": "off"
113+
},
114+
"style": {
115+
"useConst": "off",
116+
"useImportType": "off",
117+
"useTemplate": "off"
118+
},
119+
"suspicious": {
120+
"noDuplicateTestHooks": "off",
121+
"noExplicitAny": "off",
122+
"noImplicitAnyLet": "off"
123+
}
124+
}
125+
}
126+
}
127+
],
128+
"files": {
129+
"includes": [
130+
"**/*.js",
131+
"**/*.ts",
132+
"**/*.json",
133+
"**/*.yml",
134+
"!node_modules/**",
135+
"!.changeset/**"
136+
]
137+
}
138+
}

lerna.json

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

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@
1010
"jest": "29.7.0"
1111
},
1212
"scripts": {
13-
"build": "lerna run build",
13+
"build": "yarn workspaces foreach -A run build",
1414
"clean": "git clean -fxd -e .idea -e node_modules -e .yarn",
1515
"clean:cache": "git clean -fxd .yarn node_modules packages simple-git",
16-
"format": "prettier --write .",
17-
"test": "lerna run test"
16+
"lint": "biome check",
17+
"lint:fix": "biome check --write",
18+
"test": "yarn workspaces foreach -A run test"
1819
},
1920
"dependencies": {
2021
"@changesets/changelog-github": "^0.5.0",
21-
"@changesets/cli": "^2.28.1",
22-
"lerna": "^8.1.9",
23-
"prettier": "^3.5.2"
22+
"@changesets/cli": "^2.28.1"
2423
},
25-
"packageManager": "yarn@4.7.0"
24+
"devDependencies": {
25+
"@biomejs/biome": "^2.1.4"
26+
},
27+
"packageManager": "yarn@4.10.3"
2628
}

0 commit comments

Comments
 (0)