Skip to content

Commit fd24333

Browse files
authored
Merge pull request #100 from getlarge/chore-update-nestjs-11
chore: update to support nestjs 11
2 parents 5f41614 + 62fa32b commit fd24333

Some content is hidden

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

58 files changed

+2873
-3353
lines changed

.eslintignore

-3
This file was deleted.

.eslintrc.json

-109
This file was deleted.

.github/workflows/node.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646

4747
strategy:
4848
matrix:
49-
node-version: [18.x, 20.x, 22.x]
49+
node-version: [20.x, 22.x]
5050

5151
services:
5252
rabbitmq:
53-
image: rabbitmq:3.13-management-alpine
53+
image: rabbitmq:4-management-alpine
5454
options: >-
5555
--health-cmd "rabbitmq-diagnostics status"
5656
--health-interval 10s
@@ -142,7 +142,7 @@ jobs:
142142

143143
strategy:
144144
matrix:
145-
node-version: [20.x]
145+
node-version: [22.x]
146146

147147
steps:
148148
- name: Check out repository code
@@ -166,10 +166,10 @@ jobs:
166166
path: ./coverage
167167

168168
- name: SonarCloud Scan
169-
uses: sonarsource/sonarcloud-github-action@master
169+
uses: SonarSource/sonarqube-scan-action@v4.2.1
170170
env:
171-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172171
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
172+
SONAR_HOST_URL: https://sonarcloud.io
173173
with:
174174
args: >
175175
-Dsonar.projectVersion=${{ steps.package-version.outputs.current-version }}

eslint.config.mjs

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
import { FlatCompat } from '@eslint/eslintrc';
2+
import { dirname } from 'path';
3+
import { fileURLToPath } from 'url';
4+
import js from '@eslint/js';
5+
import nxEslintPlugin from '@nx/eslint-plugin';
6+
7+
const compat = new FlatCompat({
8+
baseDirectory: dirname(fileURLToPath(import.meta.url)),
9+
recommendedConfig: js.configs.recommended,
10+
});
11+
12+
export default [
13+
{
14+
ignores: ['**/dist'],
15+
},
16+
{ plugins: { '@nx': nxEslintPlugin } },
17+
{
18+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
19+
rules: {
20+
'@nx/enforce-module-boundaries': [
21+
'error',
22+
{
23+
enforceBuildableLibDependency: true,
24+
allow: [],
25+
depConstraints: [
26+
{
27+
sourceTag: '*',
28+
onlyDependOnLibsWithTags: ['*'],
29+
},
30+
],
31+
},
32+
],
33+
},
34+
},
35+
...compat
36+
.config({
37+
extends: ['plugin:@nx/typescript', 'eslint:recommended', 'plugin:@typescript-eslint/recommended'],
38+
plugins: [
39+
'@typescript-eslint/eslint-plugin',
40+
'unused-imports',
41+
'import',
42+
'max-params-no-constructor',
43+
'simple-import-sort',
44+
],
45+
})
46+
.map((config) => ({
47+
...config,
48+
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
49+
rules: {
50+
...config.rules,
51+
'arrow-parens': 'off',
52+
complexity: 'error',
53+
'interface-name': 'off',
54+
'max-depth': 'error',
55+
'max-lines': [
56+
'error',
57+
{
58+
max: 400,
59+
},
60+
],
61+
'max-lines-per-function': [
62+
'error',
63+
{
64+
max: 50,
65+
},
66+
],
67+
'max-nested-callbacks': [
68+
'error',
69+
{
70+
max: 3,
71+
},
72+
],
73+
'max-params': ['error', 10],
74+
'max-params-no-constructor/max-params-no-constructor': ['error', 4],
75+
'member-access': 'off',
76+
'no-console': [
77+
'error',
78+
{
79+
allow: ['error', 'warn', 'info', 'table'],
80+
},
81+
],
82+
'no-duplicate-imports': 'error',
83+
'no-empty': 'error',
84+
'no-fallthrough': 'error',
85+
'no-param-reassign': 'error',
86+
'no-unreachable': 'error',
87+
'no-unreachable-loop': 'error',
88+
'no-var': 'error',
89+
'object-literal-sort-keys': 'off',
90+
'prefer-const': 'error',
91+
quotes: [
92+
'warn',
93+
'single',
94+
{
95+
avoidEscape: true,
96+
},
97+
],
98+
'simple-import-sort/imports': [
99+
'error',
100+
{
101+
groups: [['^\\u0000'], ['^@?\\w'], ['^'], ['^\\.']],
102+
},
103+
],
104+
'simple-import-sort/exports': 'error',
105+
'no-extra-semi': 'off',
106+
},
107+
})),
108+
...compat
109+
.config({
110+
extends: ['plugin:@nx/javascript'],
111+
})
112+
.map((config) => ({
113+
...config,
114+
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
115+
rules: {
116+
...config.rules,
117+
'no-extra-semi': 'off',
118+
},
119+
})),
120+
...compat
121+
.config({
122+
env: {
123+
jest: true,
124+
},
125+
})
126+
.map((config) => ({
127+
...config,
128+
files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.spec.js', '**/*.spec.jsx'],
129+
rules: {
130+
...config.rules,
131+
},
132+
})),
133+
{
134+
ignores: ['dist', 'build'],
135+
},
136+
];

nx.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"default",
1414
"!{projectRoot}/test/**",
1515
"!{projectRoot}/**/*.{spec,test}.ts",
16-
"!{projectRoot}/node_modules/**"
16+
"!{projectRoot}/node_modules/**",
17+
"!{projectRoot}/eslint.config.mjs"
1718
]
1819
},
1920
"release": {
@@ -77,5 +78,6 @@
7778
}
7879
}
7980
],
80-
"nxCloudAccessToken": "OGYyNDIzN2ItNDZmZC00NjFmLTg3MDgtYzc0Nzc0NzdkMDk3fHJlYWQtd3JpdGU="
81+
"nxCloudAccessToken": "OGYyNDIzN2ItNDZmZC00NjFmLTg3MDgtYzc0Nzc0NzdkMDk3fHJlYWQtd3JpdGU=",
82+
"useLegacyCache": false
8183
}

0 commit comments

Comments
 (0)