Skip to content

Commit 261069a

Browse files
committed
style(lint): Updated Biome rules to a more strict subset
Force to error out on unused variables, import statements, function arguments and private class members
1 parent 5fdfcfa commit 261069a

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

biome.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"noStaticOnlyClass": "off"
3030
},
3131
"correctness": {
32+
"noUnusedVariables": "error",
33+
"noUnusedFunctionParameters": "error",
34+
"noUnusedImports": "error",
35+
"noUnusedPrivateClassMembers": "error",
3236
"useImportExtensions": {
3337
"options": {
3438
"suggestedExtensions": {

scripts/build-stories.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class StoriesBuilder {
120120
const isArray = (type) => type.includes('[]');
121121
const isGeneric = (type) => type.match(/<.*>/);
122122

123-
const t = type.split('|').map((t) => {
123+
type.split('|').map((t) => {
124124
const part = t.trim().replace(/'/g, '"');
125125
if (
126126
part &&
@@ -348,7 +348,7 @@ class StoriesBuilder {
348348

349349
try {
350350
data = await readFile(file, 'utf8');
351-
} catch (e) {
351+
} catch {
352352
return;
353353
}
354354

src/components/icon/icon.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ describe('Icon broadcast service', () => {
262262
const broadcast1 = new IconsStateBroadcast(collections, references);
263263
const broadcast2 = new IconsStateBroadcast(collections, references);
264264
// 1 global one, initialized when you get the icon registry first time.
265-
const iconReg = getIconRegistry();
266-
// total - 3 services now.
267265

268266
// a peer is requesting a state sync
269267
channel.postMessage({ actionType: ActionType.SyncState });

stories/dialog.stories.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ const closeDialog = (id: string) =>
9191
(document.getElementById(id) as IgcDialogComponent).hide();
9292

9393
const authMethods = ['Basic', 'Bearer', 'Digest', 'OAuth'];
94-
const authSelected = (ev: CustomEvent) => {
95-
(ev.target as HTMLElement).querySelector('igc-input')!.value =
96-
ev.detail.value;
97-
};
9894

9995
const Template = ({
10096
keepOpenOnEscape,

stories/textarea.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function getInput(event: CustomEvent<string>) {
326326
}
327327

328328
export const Validation: Story = {
329-
play: async (args) => {
329+
play: async () => {
330330
setMaxChars();
331331
},
332332
render: () => html`

stories/tree.stories.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ const addChildren = (
9393
const log = () => {
9494
const item = document.getElementById('parent2');
9595
item?.parentElement?.removeChild(item);
96-
const tree = document.getElementById('tree') as IgcTreeComponent;
9796
};
9897

9998
const log1 = () => {

0 commit comments

Comments
 (0)