@bratislava/eslint-config-nest 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -34
- package/package.json +3 -9
package/index.js
CHANGED
|
@@ -5,24 +5,12 @@
|
|
|
5
5
|
* Extends base config with NestJS-specific rules and plugins.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
disabledRules,
|
|
10
|
-
eslintRules,
|
|
11
|
-
simpleImportSortConfig,
|
|
12
|
-
sonarjsRules,
|
|
13
|
-
typescriptRules,
|
|
14
|
-
} from "@bratislava/eslint-config";
|
|
8
|
+
import { baseConfig } from "@bratislava/eslint-config";
|
|
15
9
|
import eslintNestJs from "@darraghor/eslint-plugin-nestjs-typed";
|
|
16
|
-
import eslint from "@eslint/js";
|
|
17
10
|
import json from "@eslint/json";
|
|
18
11
|
import markdown from "@eslint/markdown";
|
|
19
|
-
import prettier from "eslint-config-prettier";
|
|
20
12
|
import jest from "eslint-plugin-jest";
|
|
21
|
-
import noUnsanitized from "eslint-plugin-no-unsanitized";
|
|
22
|
-
import security from "eslint-plugin-security";
|
|
23
|
-
import sonarjs from "eslint-plugin-sonarjs";
|
|
24
13
|
import globals from "globals";
|
|
25
|
-
import tseslint from "typescript-eslint";
|
|
26
14
|
|
|
27
15
|
/**
|
|
28
16
|
* NestJS-specific rules
|
|
@@ -78,15 +66,11 @@ const jestConfig = {
|
|
|
78
66
|
export function createNestConfig(options = {}) {
|
|
79
67
|
const { tsconfigRootDir = process.cwd(), ignores = [] } = options;
|
|
80
68
|
|
|
81
|
-
return
|
|
82
|
-
// Base
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
prettier,
|
|
87
|
-
security.configs.recommended,
|
|
88
|
-
noUnsanitized.configs.recommended,
|
|
89
|
-
sonarjs.configs.recommended,
|
|
69
|
+
return [
|
|
70
|
+
// Base configuration (eslint, typescript, prettier, security, sonarjs, etc.)
|
|
71
|
+
...baseConfig,
|
|
72
|
+
|
|
73
|
+
// NestJS plugin
|
|
90
74
|
eslintNestJs.configs.flatRecommended,
|
|
91
75
|
|
|
92
76
|
// Markdown support
|
|
@@ -105,30 +89,21 @@ export function createNestConfig(options = {}) {
|
|
|
105
89
|
...json.configs.recommended,
|
|
106
90
|
},
|
|
107
91
|
|
|
108
|
-
//
|
|
109
|
-
simpleImportSortConfig,
|
|
110
|
-
|
|
111
|
-
// Language options
|
|
92
|
+
// Language options (extend base with node globals and tsconfigRootDir)
|
|
112
93
|
{
|
|
113
94
|
languageOptions: {
|
|
114
95
|
parserOptions: {
|
|
115
|
-
projectService: true,
|
|
116
96
|
tsconfigRootDir,
|
|
117
97
|
},
|
|
118
98
|
globals: {
|
|
119
99
|
...globals.node,
|
|
120
|
-
...globals.es2021,
|
|
121
100
|
},
|
|
122
101
|
},
|
|
123
102
|
},
|
|
124
103
|
|
|
125
|
-
//
|
|
104
|
+
// NestJS and backend-specific rules
|
|
126
105
|
{
|
|
127
106
|
rules: {
|
|
128
|
-
...typescriptRules,
|
|
129
|
-
...eslintRules,
|
|
130
|
-
...sonarjsRules,
|
|
131
|
-
...disabledRules,
|
|
132
107
|
...nestRules,
|
|
133
108
|
...backendRules,
|
|
134
109
|
},
|
|
@@ -152,7 +127,7 @@ export function createNestConfig(options = {}) {
|
|
|
152
127
|
...ignores,
|
|
153
128
|
],
|
|
154
129
|
},
|
|
155
|
-
|
|
130
|
+
];
|
|
156
131
|
}
|
|
157
132
|
|
|
158
133
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bratislava/eslint-config-nest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "ESLint configuration for NestJS backend projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -30,18 +30,12 @@
|
|
|
30
30
|
"typescript": ">= 5"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@bratislava/eslint-config": "0.
|
|
33
|
+
"@bratislava/eslint-config": "0.5.1",
|
|
34
34
|
"@darraghor/eslint-plugin-nestjs-typed": "7.1.3",
|
|
35
|
-
"@eslint/js": "9.34.0",
|
|
36
35
|
"@eslint/json": "0.14.0",
|
|
37
36
|
"@eslint/markdown": "6.6.0",
|
|
38
|
-
"eslint-config-prettier": "10.1.8",
|
|
39
37
|
"eslint-plugin-jest": "28.13.5",
|
|
40
|
-
"
|
|
41
|
-
"eslint-plugin-security": "3.0.1",
|
|
42
|
-
"eslint-plugin-sonarjs": "3.0.5",
|
|
43
|
-
"globals": "16.5.0",
|
|
44
|
-
"typescript-eslint": "8.52.0"
|
|
38
|
+
"globals": "16.5.0"
|
|
45
39
|
},
|
|
46
40
|
"engines": {
|
|
47
41
|
"node": ">=22"
|