Skip to content

Commit abbbc9d

Browse files
committed
chore: fixes code smells
1 parent 83d0d68 commit abbbc9d

File tree

8 files changed

+15
-17
lines changed

8 files changed

+15
-17
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM denoland/deno:2.5.2
1+
FROM denoland/deno:2.5.3
22

33
# Install tools
44
RUN apt-get update && \

.github/workflows/master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20-
- name: Setup Deno v2.5.2
20+
- name: Setup Deno v2.5.3
2121
uses: denoland/setup-deno@v2
2222
with:
23-
deno-version: v2.5.2
23+
deno-version: v2.5.3
2424

2525
- name: Setup LCOV
2626
run: sudo apt install -y lcov

.github/workflows/re-release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
build-test:
1313
name: Build & Test
1414
runs-on: ubuntu-latest
15-
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
1615

1716
steps:
1817
- name: Git checkout
@@ -21,10 +20,10 @@ jobs:
2120
fetch-depth: 0
2221
ref: ${{ github.event.inputs.tag }}
2322

24-
- name: Setup Deno v2.5.2
23+
- name: Setup Deno v2.5.3
2524
uses: denoland/setup-deno@v2
2625
with:
27-
deno-version: v2.5.2
26+
deno-version: v2.5.3
2827

2928
- name: Verify formatting
3029
run: deno task fmt

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ jobs:
88
build-test:
99
name: Build & Test
1010
runs-on: ubuntu-latest
11-
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
1211

1312
steps:
1413
- name: Git checkout
1514
uses: actions/checkout@v5
1615
with:
1716
fetch-depth: 0
1817

19-
- name: Setup Deno v2.5.2
18+
- name: Setup Deno v2.5.3
2019
uses: denoland/setup-deno@v2
2120
with:
22-
deno-version: v2.5.2
21+
deno-version: v2.5.3
2322

2423
- name: Verify formatting
2524
run: deno task fmt

.github/workflows/sonar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
ref: ${{ steps.pr.outputs.head_sha }}
3434
fetch-depth: 0
3535

36-
- name: Setup Deno v2.5.2
36+
- name: Setup Deno v2.5.3
3737
uses: denoland/setup-deno@v2
3838
with:
39-
deno-version: v2.5.2
39+
deno-version: v2.5.3
4040

4141
- name: Setup LCOV
4242
run: sudo apt install -y lcov

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM denoland/deno:alpine-2.5.2
1+
FROM denoland/deno:alpine-2.5.3
22

33
ENV APP_HOME=/home/app
44
WORKDIR $APP_HOME

src/middleware/rate-limit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { Context, Middleware, Next } from '../deps.ts';
22
import { responseError } from '../utils.ts';
33

44
class RequestStore {
5-
private count: number;
6-
private timestamp: number;
5+
private readonly count: number;
6+
private readonly timestamp: number;
77

88
constructor(count: number, timestamp: number) {
99
this.count = count;
@@ -25,7 +25,7 @@ interface RateLimitParams {
2525
}
2626

2727
export default class RateLimit {
28-
private map: Map<string, RequestStore>;
28+
private readonly map: Map<string, RequestStore>;
2929

3030
constructor() {
3131
this.map = new Map();

src/services/feature.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class FeatureService {
2626
};
2727

2828
if (featureReq?.parameters) {
29-
Object.entries(featureReq.parameters).forEach(([key, val]) => {
29+
for (const [key, val] of Object.entries(featureReq.parameters)) {
3030
if (paramHandlers[key]) {
3131
paramHandlers[key](val);
3232
}
33-
});
33+
}
3434
}
3535

3636
return {

0 commit comments

Comments
 (0)