fix: corrige erros do ESLint e configura variáveis globais

- Adiciona variáveis globais do Node.js (process, console, __dirname, require, module, exports)
- Adiciona variáveis globais do Jest (describe, it, beforeEach, fail, etc.)
- Configura ESLint para arquivos JavaScript de configuração
- Remove diretivas eslint-disable não utilizadas
- Corrige variáveis não usadas prefixando com _
- Ajusta regras do ESLint para ignorar variáveis que começam com _
- Formata código com Prettier
This commit is contained in:
JuruSysadmin
2025-11-21 17:05:07 -03:00
parent d5286fe91a
commit 233734fdea
48 changed files with 395 additions and 319 deletions

View File

@@ -1,8 +1,4 @@
import {
HttpException,
HttpStatus,
Injectable,
} from '@nestjs/common';
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { createOracleConfig } from '../core/configs/typeorm.oracle.config';
import { createPostgresConfig } from '../core/configs/typeorm.postgres.config';
import { CarOutDelivery } from '../core/models/car-out-delivery.model';
@@ -55,7 +51,7 @@ export class LogisticService {
where dados.data_saida >= current_date
ORDER BY dados.data_saida desc `;
const sql = `SELECT COUNT(DISTINCT PCCARREG.NUMCAR) as "qtde"
const _sql = `SELECT COUNT(DISTINCT PCCARREG.NUMCAR) as "qtde"
,SUM(PCPEDI.QT * PCPRODUT.PESOBRUTO) as "totalKG"
,SUM(CASE WHEN PCPEDC.DTINICIALSEP IS NULL THEN PCPEDI.QT ELSE 0 END * PCPRODUT.PESOBRUTO) as "total_nao_iniciado"
,SUM(CASE WHEN PCPEDC.DTINICIALSEP IS NOT NULL
@@ -103,7 +99,7 @@ export class LogisticService {
}
}
async getDeliveries(placa: string) {
async getDeliveries(_placa: string) {
const dataSource = new DataSource(createOracleConfig(this.configService));
await dataSource.initialize();
const queryRunner = dataSource.createQueryRunner();
@@ -202,10 +198,10 @@ export class LogisticService {
let helperId1 = 0;
let helperId2 = 0;
let helperId3 = 0;
const image1 = '';
const image2 = '';
const image3 = '';
const image4 = '';
const _image1 = '';
const _image2 = '';
const _image3 = '';
const _image4 = '';
data.helpers.forEach((helper) => {
switch (i) {
@@ -283,11 +279,11 @@ export class LogisticService {
);
}
const i = 0;
const image1 = '';
const image2 = '';
const image3 = '';
const image4 = '';
const _i = 0;
const _image1 = '';
const _image2 = '';
const _image3 = '';
const _image4 = '';
for (let y = 0; y < data.invoices.length; y++) {
const invoice = data.invoices[y];