@@ -88,6 +88,11 @@ const restrictedImports = [
88
88
path : '@nestjs/platform-fastify' ,
89
89
replacement : { path : '~/core/http' } ,
90
90
} ,
91
+ {
92
+ path : 'type-fest' ,
93
+ kind : 'value' ,
94
+ message : 'Be sure to specify the `type` modifier' ,
95
+ } ,
91
96
] ;
92
97
93
98
const namingConvention = [
@@ -161,24 +166,20 @@ const namingConvention = [
161
166
/** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config } */
162
167
const config = {
163
168
root : true ,
164
- plugins : [
165
- '@seedcompany' ,
166
- 'typescript-sort-keys' ,
167
- 'no-only-tests' ,
168
- ] ,
169
+ plugins : [ '@seedcompany' , 'typescript-sort-keys' , 'no-only-tests' ] ,
169
170
extends : [ 'plugin:@seedcompany/nestjs' ] ,
170
171
rules : {
171
172
'no-console' : 'error' ,
172
173
'no-only-tests/no-only-tests' : 'error' ,
173
174
'@typescript-eslint/naming-convention' : [ 'warn' , ...namingConvention ] ,
174
- 'no-restricted-imports' : [ 'error' , { ' paths' : oldRestrictedImports } ] ,
175
+ 'no-restricted-imports' : [ 'error' , { paths : oldRestrictedImports } ] ,
175
176
'@seedcompany/no-restricted-imports' : [ 'error' , ...restrictedImports ] ,
176
177
'no-restricted-syntax' : [
177
178
'error' ,
178
179
...baseConfig . rules [ 'no-restricted-syntax' ] ?. slice ( 1 ) ,
179
180
{
180
181
selector : 'NewExpression[callee.name="Logger"]' ,
181
- ' message' : `
182
+ message : `
182
183
Inject a logger instead
183
184
184
185
constructor(
@@ -187,6 +188,14 @@ const config = {
187
188
` ,
188
189
} ,
189
190
] ,
191
+ '@typescript-eslint/consistent-type-imports' : [
192
+ 'error' ,
193
+ { fixStyle : 'inline-type-imports' } ,
194
+ ] ,
195
+ '@typescript-eslint/consistent-type-exports' : [
196
+ 'error' ,
197
+ { fixMixedExportsWithInlineTypeSpecifier : true } ,
198
+ ] ,
190
199
// TODO Enable this and fix errors (both types & logic changes will be needed)
191
200
'@typescript-eslint/no-unnecessary-condition' : 'off' ,
192
201
} ,
0 commit comments