Skip to content

Commit 8102802

Browse files
update biome
1 parent f4d0352 commit 8102802

29 files changed

+107
-103
lines changed

biome.json

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3-
"organizeImports": {
4-
"enabled": true
5-
},
6-
"javascript": {
7-
"formatter": {
8-
"trailingCommas": "none",
9-
"indentStyle": "space",
10-
"quoteStyle": "single"
11-
}
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
127
},
138
"files": {
14-
"ignore": [
15-
"src/components/oc-client/*",
16-
"test/fixtures/*",
17-
"package.json",
18-
"biome.json"
9+
"ignoreUnknown": false,
10+
"includes": [
11+
"src/**/*",
12+
"!src/components/oc-client/**/*"
1913
]
2014
},
15+
"formatter": {
16+
"enabled": true,
17+
"indentStyle": "tab"
18+
},
2119
"linter": {
2220
"enabled": true,
2321
"rules": {
@@ -38,5 +36,20 @@
3836
"noExplicitAny": "off"
3937
}
4038
}
39+
},
40+
"javascript": {
41+
"formatter": {
42+
"trailingCommas": "none",
43+
"indentStyle": "space",
44+
"quoteStyle": "single"
45+
}
46+
},
47+
"assist": {
48+
"enabled": true,
49+
"actions": {
50+
"source": {
51+
"organizeImports": "on"
52+
}
53+
}
4154
}
4255
}

package-lock.json

Lines changed: 38 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"oc"
4242
],
4343
"devDependencies": {
44-
"@biomejs/biome": "1.9.4",
44+
"@biomejs/biome": "2.1.2",
4545
"@types/accept-language-parser": "^1.5.6",
4646
"@types/async": "^3.2.24",
4747
"@types/cross-spawn": "^6.0.6",
@@ -123,4 +123,4 @@
123123
"universalify": "^2.0.0",
124124
"yargs": "^17.7.2"
125125
}
126-
}
126+
}

src/cli/domain/get-components-by-dir.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function getComponentsByDir() {
1414

1515
try {
1616
content = fs.readJsonSync(packagePath);
17-
} catch (err) {
17+
} catch {
1818
return false;
1919
}
2020

@@ -40,7 +40,7 @@ export default function getComponentsByDir() {
4040
.map((component) => path.resolve(componentsDir, component));
4141

4242
return components;
43-
} catch (err) {
43+
} catch {
4444
return [];
4545
}
4646
};

src/cli/domain/handle-dependencies/install-compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default async function installCompiler(options: {
3535
}
3636

3737
return compiler;
38-
} catch (err) {
38+
} catch {
3939
logger.err('FAIL');
4040

4141
throw errorMsg;

src/cli/domain/init-template/install-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default async function installTemplate(
4646
);
4747

4848
return { ok: true };
49-
} catch (err) {
49+
} catch {
5050
throw errorMessage;
5151
}
5252
}

src/cli/domain/local.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function local() {
6464
compiler: `${templateType}-compiler`
6565
})
6666
);
67-
} catch (e) {
67+
} catch {
6868
throw 'template type not valid';
6969
}
7070
},

src/cli/domain/registry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function registry(opts: RegistryOptions = {}) {
5454
}
5555

5656
return fs.writeJson(settings.configFile.src, res);
57-
} catch (err) {
57+
} catch {
5858
throw 'oc registry not available';
5959
}
6060
},
@@ -70,7 +70,7 @@ export default function registry(opts: RegistryOptions = {}) {
7070
throw 'No oc registries';
7171

7272
return res.registries;
73-
} catch (err) {
73+
} catch {
7474
throw 'No oc registries';
7575
}
7676
},
@@ -112,7 +112,7 @@ export default function registry(opts: RegistryOptions = {}) {
112112
if (!parsedError || typeof parsedError !== 'object') {
113113
try {
114114
parsedError = JSON.parse(String(parsedError));
115-
} catch (er) {}
115+
} catch {}
116116
}
117117

118118
if (!!parsedError.code && parsedError.code === 'ECONNREFUSED') {

src/cli/facade/clean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const clean = ({
3232
});
3333
const lowered = result.toLowerCase().trim();
3434
return lowered === 'y' || lowered === 'yes';
35-
} catch (err) {
35+
} catch {
3636
return false;
3737
}
3838
};

src/cli/facade/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const preview = ({
1919
);
2020
await open(href);
2121
return href;
22-
} catch (err) {
22+
} catch {
2323
logger.err(strings.errors.cli.COMPONENT_HREF_NOT_FOUND);
2424
throw strings.errors.cli.COMPONENT_HREF_NOT_FOUND;
2525
}

0 commit comments

Comments
 (0)