Skip to content

Commit d8cdafb

Browse files
Refactor JavaScript code for improved readability and consistency; update CSS styles; add translations for en-GB; implement ESLint and Prettier configurations; set up GitHub Actions for linting and formatting.
1 parent a9c2609 commit d8cdafb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12518
-8143
lines changed

.circleci/config.yml

Lines changed: 149 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,153 @@
11
version: 2.1
22
orbs:
3-
node: circleci/[email protected]
3+
node: circleci/[email protected]
44
jobs:
5-
test-v8:
6-
docker:
7-
- image: circleci/node:8
8-
steps:
9-
- checkout
10-
- run:
11-
name: Run build
12-
command: npm install
13-
- run:
14-
name: Run test
15-
command: npm run test
16-
- run:
17-
name: Verify build and test
18-
command: echo "Build and test completed successfully!"
19-
test-v10:
20-
docker:
21-
- image: cimg/base:stable
22-
steps:
23-
- checkout
24-
- node/install:
25-
node-version: "10.24"
26-
- run:
27-
name: Run build
28-
command: npm install
29-
- run:
30-
name: Run test
31-
command: npm run test
32-
- run:
33-
name: Verify build and test
34-
command: echo "Build and test completed successfully!"
35-
test-v12:
36-
docker:
37-
- image: cimg/base:stable
38-
steps:
39-
- checkout
40-
- node/install:
41-
node-version: "12.22"
42-
- run:
43-
name: Run build
44-
command: npm install
45-
- run:
46-
name: Run test
47-
command: npm run test
48-
- run:
49-
name: Verify build and test
50-
command: echo "Build and test completed successfully!"
51-
test-v14:
52-
docker:
53-
- image: cimg/base:stable
54-
steps:
55-
- checkout
56-
- node/install:
57-
node-version: "14.21"
58-
- run:
59-
name: Run build
60-
command: npm install
61-
- run:
62-
name: Run test
63-
command: npm run test
64-
- run:
65-
name: Verify build and test
66-
command: echo "Build and test completed successfully!"
67-
test-v16:
68-
docker:
69-
- image: cimg/base:stable
70-
steps:
71-
- checkout
72-
- node/install:
73-
node-version: "16.20"
74-
- run:
75-
name: Run build
76-
command: npm install
77-
- run:
78-
name: Run test
79-
command: npm run test
80-
- run:
81-
name: Verify build and test
82-
command: echo "Build and test completed successfully!"
83-
test-v18:
84-
docker:
85-
- image: cimg/base:stable
86-
steps:
87-
- checkout
88-
- node/install:
89-
node-version: "18.20"
90-
- run:
91-
name: Run build
92-
command: npm install
93-
- run:
94-
name: Run test
95-
command: npm run test
96-
- run:
97-
name: Verify build and test
98-
command: echo "Build and test completed successfully!"
99-
test-v20:
100-
docker:
101-
- image: cimg/base:stable
102-
steps:
103-
- checkout
104-
- node/install:
105-
node-version: "20.18"
106-
- run:
107-
name: Run build
108-
command: npm install
109-
- run:
110-
name: Run test
111-
command: npm run test
112-
- run:
113-
name: Verify build and test
114-
command: echo "Build and test completed successfully!"
115-
test-v22:
116-
docker:
117-
- image: cimg/base:stable
118-
steps:
119-
- checkout
120-
- node/install:
121-
node-version: "22.12"
122-
- run:
123-
name: Run build
124-
command: npm install
125-
- run:
126-
name: Run test
127-
command: npm run test
128-
- run:
129-
name: Verify build and test
130-
command: echo "Build and test completed successfully!"
5+
test-v8:
6+
docker:
7+
- image: circleci/node:8
8+
steps:
9+
- checkout
10+
- run:
11+
name: Run build
12+
command: npm install
13+
- run:
14+
name: Run test
15+
command: npm run test
16+
- run:
17+
name: Verify build and test
18+
command: echo "Build and test completed successfully!"
19+
test-v10:
20+
docker:
21+
- image: cimg/base:stable
22+
steps:
23+
- checkout
24+
- node/install:
25+
node-version: '10.24'
26+
- run:
27+
name: Run build
28+
command: npm install
29+
- run:
30+
name: Run test
31+
command: npm run test
32+
- run:
33+
name: Verify build and test
34+
command: echo "Build and test completed successfully!"
35+
test-v12:
36+
docker:
37+
- image: cimg/base:stable
38+
steps:
39+
- checkout
40+
- node/install:
41+
node-version: '12.22'
42+
- run:
43+
name: Run build
44+
command: npm install
45+
- run:
46+
name: Run test
47+
command: npm run test
48+
- run:
49+
name: Verify build and test
50+
command: echo "Build and test completed successfully!"
51+
test-v14:
52+
docker:
53+
- image: cimg/base:stable
54+
steps:
55+
- checkout
56+
- node/install:
57+
node-version: '14.21'
58+
- run:
59+
name: Run build
60+
command: npm install
61+
- run:
62+
name: Run test
63+
command: npm run test
64+
- run:
65+
name: Verify build and test
66+
command: echo "Build and test completed successfully!"
67+
test-v16:
68+
docker:
69+
- image: cimg/base:stable
70+
steps:
71+
- checkout
72+
- node/install:
73+
node-version: '16.20'
74+
- run:
75+
name: Run build
76+
command: npm install
77+
- run:
78+
name: Run test
79+
command: npm run test
80+
- run:
81+
name: Verify build and test
82+
command: echo "Build and test completed successfully!"
83+
test-v18:
84+
docker:
85+
- image: cimg/base:stable
86+
steps:
87+
- checkout
88+
- node/install:
89+
node-version: '18.20'
90+
- run:
91+
name: Run build
92+
command: npm install
93+
- run:
94+
name: Run test
95+
command: npm run test
96+
- run:
97+
name: Verify build and test
98+
command: echo "Build and test completed successfully!"
99+
test-v20:
100+
docker:
101+
- image: cimg/base:stable
102+
steps:
103+
- checkout
104+
- node/install:
105+
node-version: '20.19'
106+
- run:
107+
name: Run build
108+
command: npm install
109+
- run:
110+
name: Run test
111+
command: npm run test
112+
- run:
113+
name: Verify build and test
114+
command: echo "Build and test completed successfully!"
115+
test-v22:
116+
docker:
117+
- image: cimg/base:stable
118+
steps:
119+
- checkout
120+
- node/install:
121+
node-version: '22.17'
122+
- run:
123+
name: Run build
124+
command: npm install
125+
- run:
126+
name: Run test
127+
command: npm run test
128+
- run:
129+
name: Verify build and test
130+
command: echo "Build and test completed successfully!"
131+
test-v24:
132+
docker:
133+
- image: cimg/base:stable
134+
steps:
135+
- checkout
136+
- node/install:
137+
node-version: '24.3'
138+
- run:
139+
name: Run build
140+
command: npm install
141+
- run:
142+
name: Run tests
143+
command: npm run test
144+
- run:
145+
name: Verify build
146+
command: echo "Build and Test completed successfully!"
131147
workflows:
132-
build_and_test:
133-
jobs:
134-
- test-v16
135-
- test-v18
136-
- test-v20
137-
- test-v22
148+
build:
149+
jobs:
150+
- test-v16
151+
- test-v18
152+
- test-v20
153+
- test-v22

.github/workflows/lint-format.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: ['main', 'dev']
6+
pull_request:
7+
branches: ['main', 'dev']
8+
9+
jobs:
10+
lint-and-format:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22.x'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Run ESLint
25+
run: npm run lint
26+
27+
- name: Run Prettier (check only)
28+
run: npx prettier --ignore-path .gitignore --check "**/*.+(js|ts|json)"

.github/workflows/node.js.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
name: Node.js CI
1+
name: CI
22

33
on:
4-
push:
5-
branches: [ "main", "dev" ]
6-
pull_request:
7-
branches: [ "main", "dev" ]
4+
push:
5+
branches: ['main', 'dev']
6+
pull_request:
7+
branches: ['main', 'dev']
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
node-version: [16.x, 18.x, 20.x, 22.x]
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [16.x, 18.x, 20.x, 22.x]
1515

16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: ${{ matrix.node-version }}
22-
- name: Run build
23-
run: npm isntall
24-
- name: Run test
25-
run: npm run test
26-
- name: Verify build and test
27-
run: echo "Build and test completed successfully!"
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Run build
23+
run: npm isntall
24+
- name: Run test
25+
run: npm run test
26+
- name: Verify build and test
27+
run: echo "Build and test completed successfully!"

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.17.0

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore HTML template files
2+
website/pages/**/*.html
3+
# Add other patterns as needed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"tabWidth": 4,
5+
"trailingComma": "none",
6+
"endOfLine": "lf"
7+
}

0 commit comments

Comments
 (0)