Skip to content

Commit 29ad448

Browse files
authored
Merge pull request #93 from ungdev/dev
chore: fix lint issues
2 parents 1ae8c0b + 0212702 commit 29ad448

198 files changed

Lines changed: 29977 additions & 25257 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yaml

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,61 @@ on:
1010
- prod
1111
- dev
1212

13+
env:
14+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
15+
1316
jobs:
17+
lint-api:
18+
runs-on: self-hosted
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v5
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v5
25+
with:
26+
node-version: '24'
27+
28+
- name: Install dependencies
29+
working-directory: ./backend
30+
run: npm ci
31+
32+
- name: Lint
33+
working-directory: ./backend
34+
run: npm run lint
35+
36+
lint-front:
37+
runs-on: self-hosted
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v5
41+
42+
- name: Set up Node.js
43+
uses: actions/setup-node@v5
44+
with:
45+
node-version: '24'
46+
47+
- name: Install dependencies
48+
working-directory: ./frontend
49+
run: npm ci
50+
51+
- name: Lint
52+
working-directory: ./frontend
53+
run: npm run lint
54+
1455
build-api:
1556
runs-on: self-hosted
16-
if : github.event_name == 'pull_request'
57+
if : github.event_name == 'pull_request'
58+
needs:
59+
- lint-api
1760
steps:
1861
- name: Checkout repository
19-
uses: actions/checkout@v4
62+
uses: actions/checkout@v5
2063

2164
- name: Set up Node.js
22-
uses: actions/setup-node@v3
65+
uses: actions/setup-node@v5
2366
with:
24-
node-version: '23'
67+
node-version: '24'
2568

2669
- name: Install dependencies
2770
working-directory: ./backend
@@ -35,14 +78,16 @@ jobs:
3578
build-front:
3679
runs-on: self-hosted
3780
if : github.event_name == 'pull_request'
81+
needs:
82+
- lint-front
3883
steps:
3984
- name: Checkout repository
40-
uses: actions/checkout@v4
85+
uses: actions/checkout@v5
4186

4287
- name: Set up Node.js
43-
uses: actions/setup-node@v3
88+
uses: actions/setup-node@v5
4489
with:
45-
node-version: '23'
90+
node-version: '24'
4691

4792
- name: Install dependencies
4893
working-directory: ./frontend
@@ -56,10 +101,11 @@ jobs:
56101
deploy-api:
57102
runs-on: self-hosted
58103
if : github.event_name == 'push'
59-
104+
needs:
105+
- lint-api
60106
steps:
61107
- name: Checkout repository
62-
uses: actions/checkout@v4
108+
uses: actions/checkout@v5
63109

64110
- name: Login to registry
65111
uses: docker/login-action@v3
@@ -82,10 +128,11 @@ jobs:
82128
deploy-front:
83129
runs-on: self-hosted
84130
if : github.event_name == 'push'
85-
131+
needs:
132+
- lint-front
86133
steps:
87134
- name: Checkout repository
88-
uses: actions/checkout@v4
135+
uses: actions/checkout@v5
89136

90137
- name: Login to registry
91138
uses: docker/login-action@v3

backend/eslint.config.mjs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import js from '@eslint/js'
2+
import importPlugin from 'eslint-plugin-import'
3+
import unusedImports from 'eslint-plugin-unused-imports'
4+
import globals from 'globals'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{
9+
ignores: [
10+
'dist/**',
11+
'node_modules/**',
12+
'src/database/migrations/**',
13+
'src/database/initdb/**',
14+
'uploads/**',
15+
],
16+
},
17+
js.configs.recommended,
18+
{
19+
files: ['**/*.{ts,tsx}'],
20+
extends: [...tseslint.configs.recommended],
21+
languageOptions: {
22+
ecmaVersion: 'latest',
23+
sourceType: 'module',
24+
globals: {
25+
...globals.node,
26+
},
27+
},
28+
plugins: {
29+
import: importPlugin,
30+
'unused-imports': unusedImports,
31+
},
32+
rules: {
33+
'@typescript-eslint/consistent-type-imports': [
34+
'error',
35+
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
36+
],
37+
'@typescript-eslint/no-explicit-any': 'warn',
38+
'import/first': 'error',
39+
'import/newline-after-import': 'error',
40+
'unused-imports/no-unused-imports': 'error',
41+
'unused-imports/no-unused-vars': [
42+
'warn',
43+
{
44+
vars: 'all',
45+
varsIgnorePattern: '^_',
46+
args: 'after-used',
47+
argsIgnorePattern: '^_',
48+
},
49+
],
50+
},
51+
},
52+
)

0 commit comments

Comments
 (0)