Skip to content

Commit d3dc61e

Browse files
build(deps-dev): bump @biomejs/biome from 1.9.4 to 2.0.6 (#470)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
1 parent f647c89 commit d3dc61e

File tree

6 files changed

+76
-64
lines changed

6 files changed

+76
-64
lines changed

biome.json

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"ignore": ["*.json"],
4+
"includes": ["**", "!**/*.json", "!coverage"],
55
"ignoreUnknown": true
66
},
77
"formatter": {
@@ -10,11 +10,27 @@
1010
"linter": {
1111
"enabled": true,
1212
"rules": {
13-
"recommended": true
13+
"recommended": true,
14+
"style": {
15+
"noParameterAssign": "error",
16+
"useAsConstAssertion": "error",
17+
"useDefaultParameterLast": "error",
18+
"useEnumInitializers": "error",
19+
"useSelfClosingElements": "error",
20+
"useSingleVarDeclarator": "error",
21+
"noUnusedTemplateLiteral": "error",
22+
"useNumberNamespace": "error",
23+
"noInferrableTypes": "error",
24+
"noUselessElse": "error"
25+
}
1426
}
1527
},
16-
"organizeImports": {
17-
"enabled": true
28+
"assist": {
29+
"actions": {
30+
"source": {
31+
"organizeImports": "on"
32+
}
33+
}
1834
},
1935
"vcs": {
2036
"enabled": true,

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"markup-js": "^1.5.21"
4646
},
4747
"devDependencies": {
48-
"@biomejs/biome": "^1.9.4",
48+
"@biomejs/biome": "^2.0.6",
4949
"@types/chai": "^5.0.1",
5050
"@types/flat": "^5.0.5",
5151
"@types/js-yaml": "^4.0.9",

src/send.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default async function send(core) {
1313
const config = new Config(core);
1414
try {
1515
await post(config);
16-
config.core.setOutput("time", Math.floor(new Date().valueOf() / 1000));
16+
config.core.setOutput("time", Math.floor(Date.now() / 1000));
1717
} catch (/** @type {any} */ error) {
18-
config.core.setOutput("time", Math.floor(new Date().valueOf() / 1000));
18+
config.core.setOutput("time", Math.floor(Date.now() / 1000));
1919
if (config.inputs.errors) {
2020
core.setFailed(error);
2121
throw new SlackError(core, error);

test/client.spec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ describe("client", () => {
206206
);
207207
assert.equal(mocks.core.setOutput.getCall(5).firstArg, "time");
208208
assert.equal(mocks.core.setOutput.getCalls().length, 6);
209-
} catch (error) {
210-
console.error(error);
209+
} catch (err) {
210+
console.error(err);
211211
assert.fail("Unexpected error when calling the method");
212212
}
213213
});
@@ -244,8 +244,8 @@ describe("client", () => {
244244
assert.equal(mocks.core.setOutput.getCall(2).lastArg, "C0101010101");
245245
assert.equal(mocks.core.setOutput.getCall(3).firstArg, "time");
246246
assert.equal(mocks.core.setOutput.getCalls().length, 4);
247-
} catch (error) {
248-
console.error(error);
247+
} catch (err) {
248+
console.error(err);
249249
assert.fail("Unexpected error when calling the method");
250250
}
251251
});
@@ -277,8 +277,8 @@ describe("client", () => {
277277
);
278278
assert.equal(mocks.core.setOutput.getCall(2).firstArg, "time");
279279
assert.equal(mocks.core.setOutput.getCalls().length, 3);
280-
} catch (error) {
281-
console.error(error);
280+
} catch (err) {
281+
console.error(err);
282282
assert.fail("Unexpected error when calling the method");
283283
}
284284
});
@@ -305,7 +305,7 @@ describe("client", () => {
305305
mocks.calls.rejects(errors.requestErrorWithOriginal(response, true));
306306
await send(mocks.core);
307307
assert.fail("Expected an error but none was found");
308-
} catch (error) {
308+
} catch (_err) {
309309
assert.isTrue(mocks.core.setFailed.called);
310310
assert.equal(mocks.core.setOutput.getCall(0).firstArg, "ok");
311311
assert.equal(mocks.core.setOutput.getCall(0).lastArg, false);
@@ -340,7 +340,7 @@ describe("client", () => {
340340
mocks.calls.rejects(errors.httpErrorFromResponse(response));
341341
await send(mocks.core);
342342
assert.fail("Expected an error but none was found");
343-
} catch (error) {
343+
} catch (_err) {
344344
assert.isFalse(mocks.core.setFailed.called);
345345
assert.equal(mocks.core.setOutput.getCall(0).firstArg, "ok");
346346
assert.equal(mocks.core.setOutput.getCall(0).lastArg, false);
@@ -376,7 +376,7 @@ describe("client", () => {
376376
mocks.calls.rejects(errors.platformErrorFromResult(response));
377377
await send(mocks.core);
378378
assert.fail("Expected an error but none was found");
379-
} catch (error) {
379+
} catch (_err) {
380380
assert.isTrue(mocks.core.setFailed.called);
381381
assert.equal(mocks.core.setOutput.getCall(0).firstArg, "ok");
382382
assert.equal(mocks.core.setOutput.getCall(0).lastArg, false);
@@ -405,7 +405,7 @@ describe("client", () => {
405405
mocks.calls.rejects(errors.platformErrorFromResult(response));
406406
await send(mocks.core);
407407
assert.fail("Expected an error but none was found");
408-
} catch (error) {
408+
} catch (_err) {
409409
assert.isFalse(mocks.core.setFailed.called);
410410
assert.equal(mocks.core.setOutput.getCall(0).firstArg, "ok");
411411
assert.equal(mocks.core.setOutput.getCall(0).lastArg, false);
@@ -431,7 +431,7 @@ describe("client", () => {
431431
mocks.calls.rejects(errors.rateLimitedErrorWithDelay(12));
432432
await send(mocks.core);
433433
assert.fail("Expected an error but none was found");
434-
} catch (error) {
434+
} catch (_err) {
435435
assert.isFalse(mocks.core.setFailed.called);
436436
assert.equal(mocks.core.setOutput.getCall(0).firstArg, "ok");
437437
assert.equal(mocks.core.setOutput.getCall(0).lastArg, false);

test/content.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ describe("content", () => {
9191
}
9292
`);
9393
const config = new Config(mocks.core);
94+
// biome-ignore-start lint/suspicious/noTemplateCurlyInString: GitHub Action YAML variable syntax
9495
const expected = {
9596
message: "this matches an existing variable: ${{ github.apiUrl }}",
9697
channel: "C0123456789",
9798
};
99+
// biome-ignore-end lint/suspicious/noTemplateCurlyInString: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#using-contexts-to-access-variable-values
98100
assert.deepEqual(config.content.values, expected);
99101
});
100102

@@ -206,9 +208,11 @@ describe("content", () => {
206208
* @see {@link https://github.com/slackapi/slack-github-action/issues/203}
207209
*/
208210
it("templatizes variables with missing variables", async () => {
211+
// biome-ignore-start lint/suspicious/noTemplateCurlyInString: GitHub Action YAML variable syntax
209212
mocks.core.getInput
210213
.withArgs("payload")
211214
.returns("message: What makes ${{ env.TREASURE }} a secret");
215+
// biome-ignore-end lint/suspicious/noTemplateCurlyInString: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#using-contexts-to-access-variable-values
212216
mocks.core.getBooleanInput.withArgs("payload-templated").returns(true);
213217
const config = new Config(mocks.core);
214218
const expected = {
@@ -366,10 +370,12 @@ describe("content", () => {
366370
}
367371
`);
368372
const config = new Config(mocks.core);
373+
// biome-ignore-start lint/suspicious/noTemplateCurlyInString: GitHub Action YAML variable syntax
369374
const expected = {
370375
message: "this matches an existing variable: ${{ github.apiUrl }}",
371376
channel: "C0123456789",
372377
};
378+
// biome-ignore-end lint/suspicious/noTemplateCurlyInString: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#using-contexts-to-access-variable-values
373379
assert.deepEqual(config.content.values, expected);
374380
});
375381

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy