Ревью кода: исправление найденных проблем
This commit is contained in:
+11
-1
@@ -300,9 +300,19 @@ export default defineConfig(
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'server/jwt',
|
||||
files: ['src/utils/jwt.ts'],
|
||||
rules: {
|
||||
// env.jwtExpiresIn — string, а SignOptions.expiresIn ожидает StringValue из пакета ms;
|
||||
// double-assertion — стандартная практика для env-значений
|
||||
'@typescript-eslint/consistent-type-assertions': 'off',
|
||||
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'server/import-default-exports',
|
||||
files: ['src/app.ts', 'src/utils/jwt.ts', 'src/middleware/upload.middleware.ts'],
|
||||
files: ['src/app.ts', 'src/middleware/upload.middleware.ts', 'src/utils/jwt.ts'],
|
||||
rules: {
|
||||
// express.static, jwt.sign/verify, multer.diskStorage — default export API
|
||||
'import-x/no-named-as-default-member': 'off',
|
||||
|
||||
Reference in New Issue
Block a user