Skip to content

Commit 9f7e6cb

Browse files
committed
Update github workflow
1 parent daf3354 commit 9f7e6cb

File tree

9 files changed

+1662
-45
lines changed

9 files changed

+1662
-45
lines changed

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ jobs:
2828
- name: Run eslint
2929
working-directory: ./backend/question-service
3030
run: npm run lint
31+
user-service:
32+
runs-on: ubuntu-latest
33+
name: User service
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
- name: Setting node version
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: ${{ env.NODE_VERSION }}
41+
- name: Install dependences
42+
working-directory: ./backend/user-service
43+
run: npm install
44+
- name: Run eslint
45+
working-directory: ./backend/user-service
46+
run: npm run lint
3147
frontend:
3248
runs-on: ubuntu-latest
3349
name: Frontend
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
5+
export default [
6+
{ files: ["**/*.{js,mjs,cjs,ts}"] },
7+
{ languageOptions: { globals: globals.node } },
8+
{
9+
rules: {
10+
"@typescript-eslint/no-unused-vars": [
11+
"warn",
12+
{
13+
argsIgnorePattern: "^_",
14+
varsIgnorePattern: "^_",
15+
caughtErrorsIgnorePattern: "^_",
16+
},
17+
],
18+
},
19+
},
20+
pluginJs.configs.recommended,
21+
...tseslint.configs.recommended,
22+
];

backend/question-service/eslint.config.mjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

backend/question-service/src/controllers/questionController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export const readQuestionsList = async (
177177
return;
178178
}
179179

180+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
180181
const query: any = {};
181182

182183
if (title) {

backend/user-service/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ app.use((req: Request, res: Response, next: NextFunction) => {
4444
app.use("/api/users", userRoutes);
4545
app.use("/api/auth", authRoutes);
4646
app.use("/docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));
47-
app.get("/", (req: Request, res: Response, next: NextFunction) => {
47+
app.get("/", (req: Request, res: Response, _next: NextFunction) => {
4848
console.log("Sending Greetings!");
4949
res.json({
5050
message: "Hello World from user-service",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
5+
export default [
6+
{ files: ["**/*.{js,mjs,cjs,ts}"] },
7+
{ languageOptions: { globals: globals.node } },
8+
{
9+
rules: {
10+
"@typescript-eslint/no-unused-vars": [
11+
"warn",
12+
{
13+
argsIgnorePattern: "^_",
14+
varsIgnorePattern: "^_",
15+
caughtErrorsIgnorePattern: "^_",
16+
},
17+
],
18+
},
19+
},
20+
pluginJs.configs.recommended,
21+
...tseslint.configs.recommended,
22+
];

0 commit comments

Comments
 (0)