@voiceflow/eslint-config 7.9.0 → 7.9.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/package.json +2 -2
- package/src/index.js +1 -1
- package/src/presets/nest.js +16 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/eslint-config",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.1",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"volta": {
|
|
44
44
|
"extends": "../../package.json"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d3370234f64841e096a7a9ae3f6a6025471e6584"
|
|
47
47
|
}
|
package/src/index.js
CHANGED
package/src/presets/nest.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/** @type {import('eslint').Linter.Config} */
|
|
2
|
-
module.exports =
|
|
3
|
-
|
|
2
|
+
module.exports = [
|
|
3
|
+
{
|
|
4
|
+
files: ['**/*.controller.ts', '**/*.decorator.ts', '**/*.factory.ts', '**/*.module.ts', '**/*.service.ts'],
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
rules: {
|
|
7
|
+
// NestJS imports can be considered "unused" by this rule, but NestJS uses them for dependency injection.
|
|
8
|
+
// We can enforce no type imports to ensure that NestJS can inject correctly.
|
|
9
|
+
// See: https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580
|
|
10
|
+
'@typescript-eslint/consistent-type-imports': ['off'],
|
|
11
|
+
},
|
|
10
12
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'max-params': 'off',
|
|
17
|
-
},
|
|
13
|
+
{
|
|
14
|
+
files: ['**/*.controller.ts'],
|
|
15
|
+
rules: {
|
|
16
|
+
// NestJS controllers can inject many parameters, so we should not enforce a maximum.
|
|
17
|
+
'max-params': 'off',
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
},
|
|
20
|
+
];
|