From 22b8c140ef97e3591858beca7a6acca4f29510a7 Mon Sep 17 00:00:00 2001 From: Yves Lavoie Date: Mon, 3 Jun 2024 01:53:23 -0400 Subject: [PATCH] Lint Jest test files --- UI/package.json | 4 +- UI/tests/common/i18n.js | 10 +- UI/tests/common/jest-setup.js | 122 +++++++------ UI/tests/common/jest.polyfills.js | 15 +- UI/tests/common/mocks/handlers.js | 27 +-- UI/tests/common/mocks/login_handlers.js | 39 +++-- UI/tests/common/mocks/lsmb_elements.js | 83 +++++---- UI/tests/common/mocks/server.js | 5 +- .../mocks/store_business-types_handlers.js | 154 +++++++++-------- .../common/mocks/store_countries_handlers.js | 158 +++++++++-------- UI/tests/common/mocks/store_gifi_handlers.js | 163 +++++++++--------- .../common/mocks/store_language_handlers.js | 162 ++++++++--------- .../mocks/store_pricegroups_handlers.js | 135 ++++++++------- UI/tests/common/mocks/store_sics_handlers.js | 144 ++++++++-------- .../common/mocks/store_warehouses_handlers.js | 141 ++++++++------- .../API-contacts-business_types.spec.js | 1 + .../specs/openapi/API-contacts-sic.spec.js | 1 + UI/tests/specs/openapi/API-country.spec.js | 1 + UI/tests/specs/openapi/API-gifi.spec.js | 1 + UI/tests/specs/openapi/API-invoices.spec.js | 1 + UI/tests/specs/openapi/API-languages.spec.js | 1 + UI/tests/specs/openapi/API-orders.spec.js | 1 + .../openapi/API-products-pricegroups.spec.js | 1 + .../openapi/API-products-warehouses.spec.js | 1 + UI/tests/specs/openapi/database.js | 31 ++-- UI/yarn.lock | 47 ++--- 26 files changed, 775 insertions(+), 674 deletions(-) diff --git a/UI/package.json b/UI/package.json index ddfb733b17..74927b7e19 100644 --- a/UI/package.json +++ b/UI/package.json @@ -146,8 +146,8 @@ "build:dev": "webpack --progress --mode=development --stats errors-warnings", "lint": "yarn run lint:css && yarn run lint:js && yarn run lint:markdown && yarn run lint:vue", "lint:css": "stylelint css/**/*.css", - "lint:js": "eslint {src,js-src}/**/*.js", - "lint:js:fix": "eslint --fix {src,js-src}/**/*.js", + "lint:js": "eslint {src,js-src,tests}/**/*.js", + "lint:js:fix": "eslint --fix {src,js-src,tests}/**/*.js", "lint:markdown": "markdownlint --config ../.markdownlint.json --ignore ./node_modules --ignore ./js .", "lint:vue": "eslint src/**/*.vue", "lint:vue:fix": "eslint --fix src/**/*.vue", diff --git a/UI/tests/common/i18n.js b/UI/tests/common/i18n.js index 3c784dea9a..6ac2d37c03 100644 --- a/UI/tests/common/i18n.js +++ b/UI/tests/common/i18n.js @@ -4,7 +4,7 @@ const rtlDetect = require("rtl-detect"); import { createI18n } from "vue-i18n"; -const SUPPORT_LOCALES = [ "en", "fr_CA", "ar_EG" ]; +const SUPPORT_LOCALES = ["en", "fr_CA", "ar_EG"]; function _mapLocale(locale) { const _locale = locale.match(/([a-z]{2})-([a-z]{2})/); @@ -17,7 +17,7 @@ function _mapLocale(locale) { var _messages = {}; SUPPORT_LOCALES.forEach(function (it) { const locale = _mapLocale(it); - // eslint-disable-next-line global-require + // eslint-disable-next-line import-x/no-dynamic-require, global-require _messages[locale] = require("@/locales/" + locale + ".json"); }); @@ -35,8 +35,10 @@ export async function setI18nLanguage(lang) { const locale = _mapLocale(lang.value); // If the language hasn't been loaded yet - if (i18n.global.availableLocales.includes(locale) && - await document.querySelector("html").setAttribute("lang", locale)) { + if ( + i18n.global.availableLocales.includes(locale) && + document.querySelector("html").setAttribute("lang", locale) + ) { if (rtlDetect.isRtlLang(locale)) { document.querySelector("html").setAttribute("dir", "rtl"); } diff --git a/UI/tests/common/jest-setup.js b/UI/tests/common/jest-setup.js index 309740a312..e9abf7514e 100644 --- a/UI/tests/common/jest-setup.js +++ b/UI/tests/common/jest-setup.js @@ -1,10 +1,17 @@ - -import { jest, beforeAll, afterAll, beforeEach, afterEach } from "@jest/globals"; -import 'core-js'; -import { setGlobalOrigin } from 'undici'; +/** @format */ + +import { + jest, + beforeAll, + afterAll, + beforeEach, + afterEach +} from "@jest/globals"; +import "core-js"; +import { setGlobalOrigin } from "undici"; import "./mocks/lsmb_elements"; -import { server } from './mocks/server.js'; +import { server } from "./mocks/server.js"; Object.defineProperty(window, "lsmbConfig", { writable: true, @@ -15,77 +22,78 @@ Object.defineProperty(window, "lsmbConfig", { }); // Enable i18n -import { config } from '@vue/test-utils' -import { i18n } from '../common/i18n' +import { config } from "@vue/test-utils"; +import { i18n } from "../common/i18n"; -config.global.plugins = [i18n] +config.global.plugins = [i18n]; const oldWindowLocation = window.location; beforeAll(() => { - delete window.location - - window.location = Object.defineProperties( - {}, - { - ...Object.getOwnPropertyDescriptors(oldWindowLocation), - assign: { - configurable: true, - value: jest.fn(), - } - }, - ) - - // Establish API mocking before all tests. - server.listen({ - onUnhandledRequest(req) { - console.error( - 'Found an unhandled %s request to %s', - req.method, - req.url.href - ) - } - }) -}) + delete window.location; + + window.location = Object.defineProperties( + {}, + { + ...Object.getOwnPropertyDescriptors(oldWindowLocation), + assign: { + configurable: true, + value: jest.fn() + } + } + ); + + // Establish API mocking before all tests. + server.listen({ + onUnhandledRequest(req) { + console.error( + "Found an unhandled %s request to %s", + req.method, + req.url.href + ); + } + }); +}); afterAll(() => { - // restore `window.location` to the original `jsdom` - // `Location` object - window.location = oldWindowLocation + // restore `window.location` to the original `jsdom` + // `Location` object + window.location = oldWindowLocation; - // Clean up after the tests are finished. - server.close(); -}) + // Clean up after the tests are finished. + server.close(); +}); beforeEach(() => { - // Set the global origin (used by fetch) to the url provided in vitest.config.ts - setGlobalOrigin(window.location.href) -}) + // Set the global origin (used by fetch) to the url provided in vitest.config.ts + setGlobalOrigin(window.location.href); +}); // Reset any request handlers that we may add during the tests, // so they don't affect other tests. afterEach(() => { - server.resetHandlers(); + server.resetHandlers(); }); // Helper function to wait for DOM updates // eslint no-unused-expressions: ["error", { "allowTernary": true }] export const retry = (assertion, { interval = 20, timeout = 1000 } = {}) => { - return new Promise((resolve, reject) => { - const startTime = Date.now(); - - const tryAgain = () => { - setTimeout(() => { - try { - resolve(assertion()); - } catch (err) { - Date.now() - startTime > timeout ? reject(err) : tryAgain(); - } - }, interval); - }; - - tryAgain(); - }); + return new Promise((resolve, reject) => { + const startTime = Date.now(); + + const tryAgain = () => { + setTimeout(() => { + try { + resolve(assertion()); + } catch (err) { + // eslint-disable-next-line no-unused-expressions + Date.now() - startTime > timeout ? reject(err) : tryAgain(); + } + }, interval); + }; + + tryAgain(); + }); }; window.retry = retry; diff --git a/UI/tests/common/jest.polyfills.js b/UI/tests/common/jest.polyfills.js index 11e2e67ea1..7b1a5617c7 100644 --- a/UI/tests/common/jest.polyfills.js +++ b/UI/tests/common/jest.polyfills.js @@ -1,16 +1,17 @@ +/* @format */ /* global globalThis */ -const { TextEncoder, TextDecoder } = require('node:util') -const { performance } = require('node:perf_hooks') +const { TextEncoder, TextDecoder } = require("node:util"); +const { performance } = require("node:perf_hooks"); Object.defineProperties(globalThis, { TextDecoder: { value: TextDecoder }, TextEncoder: { value: TextEncoder }, performance: { value: performance } -}) +}); -const { Blob } = require('node:buffer') -const { fetch, Headers, FormData, Request, Response } = require('undici') +const { Blob } = require("node:buffer"); +const { fetch, Headers, FormData, Request, Response } = require("undici"); Object.defineProperties(globalThis, { fetch: { value: fetch, writable: true }, @@ -18,5 +19,5 @@ Object.defineProperties(globalThis, { Headers: { value: Headers }, FormData: { value: FormData }, Request: { value: Request }, - Response: { value: Response }, -}) + Response: { value: Response } +}); diff --git a/UI/tests/common/mocks/handlers.js b/UI/tests/common/mocks/handlers.js index f4e6c03f02..16289023b0 100644 --- a/UI/tests/common/mocks/handlers.js +++ b/UI/tests/common/mocks/handlers.js @@ -1,7 +1,9 @@ +/** @format */ + // MSW Handlers // Stores -import { businessTypesHandlers} from "./store_business-types_handlers"; +import { businessTypesHandlers } from "./store_business-types_handlers"; import { gifiHandlers } from "./store_gifi_handlers"; import { countriesHandlers } from "./store_countries_handlers"; import { languageHandlers } from "./store_language_handlers"; @@ -14,16 +16,15 @@ import { warehousesHandlers } from "./store_warehouses_handlers"; import { loginHandlers } from "./login_handlers"; export const handlers = [ - // Stores - ...businessTypesHandlers, - ...countriesHandlers, - ...gifiHandlers, - ...languageHandlers, - ...pricegroupHandlers, - ...sessionUserHandlers, - ...sicsHandlers, - ...warehousesHandlers, - // Views - ...loginHandlers + // Stores + ...businessTypesHandlers, + ...countriesHandlers, + ...gifiHandlers, + ...languageHandlers, + ...pricegroupHandlers, + ...sessionUserHandlers, + ...sicsHandlers, + ...warehousesHandlers, + // Views + ...loginHandlers ]; - diff --git a/UI/tests/common/mocks/login_handlers.js b/UI/tests/common/mocks/login_handlers.js index 8fd45350b2..efc2f77e0b 100644 --- a/UI/tests/common/mocks/login_handlers.js +++ b/UI/tests/common/mocks/login_handlers.js @@ -1,40 +1,43 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const loginHandlers = [ - - http.post('login.pl', async ({ request }) => { +import { http, HttpResponse } from "msw"; +export const loginHandlers = [ + http.post("login.pl", async ({ request }) => { const url = new URL(request.url); - const action = url.searchParams.get('action'); + const action = url.searchParams.get("action"); const params = await request.json(); const username = params.login; const password = params.password; const company = params.company; - if ( action === 'authenticate' ) { - if ( username === 'MyUser' && password === 'MyPassword' && company === 'MyCompany' ) { - window.location.assign('http://lsmb/erp.pl?action=root'); + if (action === "authenticate") { + if ( + username === "MyUser" && + password === "MyPassword" && + company === "MyCompany" + ) { + window.location.assign("http://lsmb/erp.pl?action=root"); return new HttpResponse(null, { status: 200 - }) + }); } - if ( username && password && company === 'MyOldCompany' ) { + if (username && password && company === "MyOldCompany") { return new HttpResponse(null, { status: 521 - }) + }); } - if ( username === 'BadUser' && password && company ) { + if (username === "BadUser" && password && company) { return new HttpResponse(null, { status: 401 - }) + }); } } - if (username === 'My' && password === 'My' && company === 'My') { + if (username === "My" && password === "My" && company === "My") { return new HttpResponse(null, { status: 500 - }) + }); } - return new HttpResponse.error('Failed to connect'); + return new HttpResponse.error("Failed to connect"); }) -] - +]; diff --git a/UI/tests/common/mocks/lsmb_elements.js b/UI/tests/common/mocks/lsmb_elements.js index 6265855ec5..6cc6dd904f 100644 --- a/UI/tests/common/mocks/lsmb_elements.js +++ b/UI/tests/common/mocks/lsmb_elements.js @@ -1,21 +1,29 @@ /** @format */ /* eslint-disable vue/component-definition-name-casing */ /* eslint-disable vue/require-prop-types, vue/one-component-per-file */ -/* eslint-disable global-require */ import { config } from "@vue/test-utils"; import { defineComponent } from "vue"; const lsmbText = defineComponent({ - name: "lsmb-text", - props: [ - "autocomplete", "id", "label", "name", "required", - "size", "tabindex", "type", "value" - ], - computed: { - widgetid() { return 'widgetid_' + this.id } - }, - template: ` + name: "lsmb-text", + props: [ + "autocomplete", + "id", + "label", + "name", + "required", + "size", + "tabindex", + "type", + "value" + ], + computed: { + widgetid() { + return "widgetid_" + this.id; + } + }, + template: `
@@ -56,9 +73,9 @@ const lsmbButton = defineComponent({ }); const lsmbDate = defineComponent({ - name: "lsmb-date", - props: ["id", "title", "name", "size", "required"], - template: ` + name: "lsmb-date", + props: ["id", "title", "name", "size", "required"], + template: `
@@ -67,9 +84,9 @@ const lsmbDate = defineComponent({ }); const lsmbFile = defineComponent({ - name: "lsmb-file", - props: ["id", "label", "accept", "disabled", "name", "required"], - template: ` + name: "lsmb-file", + props: ["id", "label", "accept", "disabled", "name", "required"], + template: `
@@ -81,9 +98,9 @@ const lsmbFile = defineComponent({ }); config.global.stubs = { - lsmbButton, - lsmbPassword, - lsmbText, - lsmbDate, - lsmbFile + lsmbButton, + lsmbPassword, + lsmbText, + lsmbDate, + lsmbFile }; diff --git a/UI/tests/common/mocks/server.js b/UI/tests/common/mocks/server.js index 573c9731a6..428359a091 100644 --- a/UI/tests/common/mocks/server.js +++ b/UI/tests/common/mocks/server.js @@ -1,6 +1,7 @@ +/** @format */ -import { setupServer } from 'msw/node'; -import { handlers } from './handlers'; +import { setupServer } from "msw/node"; +import { handlers } from "./handlers"; // This configures a Service Server with the given request handlers. export const server = setupServer(...handlers); diff --git a/UI/tests/common/mocks/store_business-types_handlers.js b/UI/tests/common/mocks/store_business-types_handlers.js index 9666939b3a..35ba5086d0 100644 --- a/UI/tests/common/mocks/store_business-types_handlers.js +++ b/UI/tests/common/mocks/store_business-types_handlers.js @@ -1,75 +1,93 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const businessTypesHandlers = [ - - http.get('/erp/api/v0/contacts/business-types', () => { - - return HttpResponse.json( - { - items: [ - { id: "1", description: "Big customer", discount: 0.05, _meta: { ETag: "1234567890" }}, - { id: "2", description: "Bigger customer", discount: 0.15, _meta: { ETag: "1234567890" }} - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, { - status: 200, - }) - }), - - http.get('/erp/api/v0/contacts/business-types/2', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { - id: "2", - description: "Bigger customer", - discount: 0.15 - }, { - status: 200, - headers: { - ETag: '1234567890' - } - }) - }), - - http.get('/erp/api/v0/contacts/business-types/3', () => { - - return HttpResponse.json( - { id: "", code: "", description: "" }, { - status: 404 - }) - }), +export const businessTypesHandlers = [ + http.get("/erp/api/v0/contacts/business-types", () => { + return HttpResponse.json( + { + items: [ + { + id: "1", + description: "Big customer", + discount: 0.05, + _meta: { ETag: "1234567890" } + }, + { + id: "2", + description: "Bigger customer", + discount: 0.15, + _meta: { ETag: "1234567890" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { + status: 200 + } + ); + }), - http.post('/erp/api/v0/contacts/business-types', () => { + http.get("/erp/api/v0/contacts/business-types/2", () => { + return HttpResponse.json( + { + id: "2", + description: "Bigger customer", + discount: 0.15 + }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - return HttpResponse.json( - { - id: "3", - description: "Great customer", - discount: 0.22 - }, { - status: 201, - headers: { - ETag: '1234567891' - } - }) - }), + http.get("/erp/api/v0/contacts/business-types/3", () => { + return HttpResponse.json( + { id: "", code: "", description: "" }, + { + status: 404 + } + ); + }), - http.put('/erp/api/v0/contacts/business-types/2', () => { + http.post("/erp/api/v0/contacts/business-types", () => { + return HttpResponse.json( + { + id: "3", + description: "Great customer", + discount: 0.22 + }, + { + status: 201, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { - id: "2", - description: "Bigger customer", - discount: 0.25 - }, { - status: 200, - headers: { - ETag: '1234567891' - } + http.put("/erp/api/v0/contacts/business-types/2", () => { + return HttpResponse.json( + { + id: "2", + description: "Bigger customer", + discount: 0.25 + }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); }) - }) -] +]; diff --git a/UI/tests/common/mocks/store_countries_handlers.js b/UI/tests/common/mocks/store_countries_handlers.js index 28d0f7e479..bfd6a8a682 100644 --- a/UI/tests/common/mocks/store_countries_handlers.js +++ b/UI/tests/common/mocks/store_countries_handlers.js @@ -1,85 +1,91 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const countriesHandlers = [ - - http.get('/erp/api/v0/countries', () => { - - return HttpResponse.json( - { - items: [ - { code: "ca", default: false, name: "Canada", _meta: { ETag: '2345678901' }}, - { code: "us", default: false, name: "United States", _meta: { ETag: '1234567890' }} - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, { - status: 200 - }) - }), - - http.get('/erp/api/v0/countries/us', () => { - - return HttpResponse.json( - { code: "us", name: "United States" }, - { - status: 200, - headers: { - ETag: '1234567890' - } - } - ) - }), - - http.get('/erp/api/v0/countries/zz', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { code: "", name: "" }, - { status: 404 } - ) - }), - - http.post('/erp/api/v0/countries', () => { +export const countriesHandlers = [ + http.get("/erp/api/v0/countries", () => { + return HttpResponse.json( + { + items: [ + { + code: "ca", + default: false, + name: "Canada", + _meta: { ETag: "2345678901" } + }, + { + code: "us", + default: false, + name: "United States", + _meta: { ETag: "1234567890" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { + status: 200 + } + ); + }), - return HttpResponse.json( - { - code: "zz", - name: "Atlantida", - }, - { - status: 201, - headers: { - ETag: '1234567891' - } - } - ) - }), + http.get("/erp/api/v0/countries/us", () => { + return HttpResponse.json( + { code: "us", name: "United States" }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - http.put('/erp/api/v0/countries/us', () => { + http.get("/erp/api/v0/countries/zz", () => { + return HttpResponse.json({ code: "", name: "" }, { status: 404 }); + }), - return HttpResponse.json( - { code: "us", default: false, name: "America" }, - { - status: 200, - headers: { - ETag: '1234567891' + http.post("/erp/api/v0/countries", () => { + return HttpResponse.json( + { + code: "zz", + name: "Atlantida" + }, + { + status: 201, + headers: { + ETag: "1234567891" + } } - } - ) - }), + ); + }), - http.put('/erp/api/v0/countries/ca', () => { + http.put("/erp/api/v0/countries/us", () => { + return HttpResponse.json( + { code: "us", default: false, name: "America" }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { code: "ca", default: true, name: "Canada" }, - { - status: 200, - headers: { - ETag: '2345678901' + http.put("/erp/api/v0/countries/ca", () => { + return HttpResponse.json( + { code: "ca", default: true, name: "Canada" }, + { + status: 200, + headers: { + ETag: "2345678901" + } } - } - ) - }) -] + ); + }) +]; diff --git a/UI/tests/common/mocks/store_gifi_handlers.js b/UI/tests/common/mocks/store_gifi_handlers.js index 30d40bb900..46df1e2638 100644 --- a/UI/tests/common/mocks/store_gifi_handlers.js +++ b/UI/tests/common/mocks/store_gifi_handlers.js @@ -1,88 +1,89 @@ -import { http, HttpResponse } from 'msw' +/** @format */ -export const gifiHandlers = [ - - http.get('/erp/api/v0/gl/gifi', () => { - - return HttpResponse.json( - { - items : [ - { - "accno" : "0000", - "description" : "Dummy account", - _meta: { ETag: "1234567890" } - }, - { - "accno" : "0001", - "description" : "Dummy account 1", - _meta: { ETag: "1234567889" } - } - ], - _links : [ - { - "href" : "?format=HTML", - "rel" : "download", - "title" : "HTML" - } - ] - }, - { - status: 200 - } - ) - }), - - http.get('/erp/api/v0/gl/gifi/0000', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { - "accno" : "0000", - "description" : "Dummy account" - }, { - status: 200, - headers: { - ETag: '1234567890' - } - } - ) - }), +export const gifiHandlers = [ + http.get("/erp/api/v0/gl/gifi", () => { + return HttpResponse.json( + { + items: [ + { + accno: "0000", + description: "Dummy account", + _meta: { ETag: "1234567890" } + }, + { + accno: "0001", + description: "Dummy account 1", + _meta: { ETag: "1234567889" } + } + ], + _links: [ + { + href: "?format=HTML", + rel: "download", + title: "HTML" + } + ] + }, + { + status: 200 + } + ); + }), - http.get('/erp/api/v0/gl/gifi/0002', () => { + http.get("/erp/api/v0/gl/gifi/0000", () => { + return HttpResponse.json( + { + accno: "0000", + description: "Dummy account" + }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - return HttpResponse.json( - { - code: "", - description: "" - }, - { status: 404 } - ) - }), + http.get("/erp/api/v0/gl/gifi/0002", () => { + return HttpResponse.json( + { + code: "", + description: "" + }, + { status: 404 } + ); + }), - http.post('/erp/api/v0/gl/gifi', () => { + http.post("/erp/api/v0/gl/gifi", () => { + return HttpResponse.json( + { + accno: "0002", + description: "Dummy account 2" + }, + { + status: 201, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { - accno: "0002", - description: "Dummy account 2", - }, { - status: 201, - headers: { - ETag: '1234567891' - } + http.put("/erp/api/v0/gl/gifi/0000", () => { + return HttpResponse.json( + { + accno: "0000", + description: "Funny account" + }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); }) - }), - - http.put('/erp/api/v0/gl/gifi/0000', () => { - - return HttpResponse.json( - { - accno: "0000", - description: "Funny account" - }, { - status: 200, - headers: { - ETag: '1234567891' - } - }) - }) -] +]; diff --git a/UI/tests/common/mocks/store_language_handlers.js b/UI/tests/common/mocks/store_language_handlers.js index 4c6ab26cc8..d4d9c91498 100644 --- a/UI/tests/common/mocks/store_language_handlers.js +++ b/UI/tests/common/mocks/store_language_handlers.js @@ -1,84 +1,92 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const languageHandlers = [ - - http.get('/erp/api/v0/languages', () => { - - return HttpResponse.json( - { - items: [ - { code: "en", default: false, description: "English", _meta: { ETag: '1234567890' } }, - { code: "fr", default: false, description: "Français", _meta: { ETag: '2345678901' } } - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, - { status: 200 } - ) - }), - - http.get('/erp/api/v0/languages/en', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { code: "en", description: "English" }, - { - status: 200, - headers: { - 'ETag': '1234567890' - } - } - ) - }), - - http.get('/erp/api/v0/languages/zz', () => { - - return HttpResponse.json( - { code: "", default: false, description: "" }, - { status: 404 } - ) - }), - - http.post('/erp/api/v0/languages', () => { +export const languageHandlers = [ + http.get("/erp/api/v0/languages", () => { + return HttpResponse.json( + { + items: [ + { + code: "en", + default: false, + description: "English", + _meta: { ETag: "1234567890" } + }, + { + code: "fr", + default: false, + description: "Français", + _meta: { ETag: "2345678901" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { status: 200 } + ); + }), - return HttpResponse.json( - { - code: "my", - description: "Mayan", - }, { - status: 201, - headers: { - 'ETag': '1234567891' - } - } - ) - }), + http.get("/erp/api/v0/languages/en", () => { + return HttpResponse.json( + { code: "en", description: "English" }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - http.put('/erp/api/v0/languages/en', () => { + http.get("/erp/api/v0/languages/zz", () => { + return HttpResponse.json( + { code: "", default: false, description: "" }, + { status: 404 } + ); + }), - return HttpResponse.json( - { code: "en", default: false, description: "English (american)" }, - { - status: 200, - headers: { - 'ETag': '1234567891' - } - } - ) - }), + http.post("/erp/api/v0/languages", () => { + return HttpResponse.json( + { + code: "my", + description: "Mayan" + }, + { + status: 201, + headers: { + ETag: "1234567891" + } + } + ); + }), - http.put('/erp/api/v0/languages/fr', () => { + http.put("/erp/api/v0/languages/en", () => { + return HttpResponse.json( + { code: "en", default: false, description: "English (american)" }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { code: "en", default: true, description: "Français" }, - { - status: 200, - headers: { - ETag: '2345678910' - } - } - ) - }) -] + http.put("/erp/api/v0/languages/fr", () => { + return HttpResponse.json( + { code: "en", default: true, description: "Français" }, + { + status: 200, + headers: { + ETag: "2345678910" + } + } + ); + }) +]; diff --git a/UI/tests/common/mocks/store_pricegroups_handlers.js b/UI/tests/common/mocks/store_pricegroups_handlers.js index 1e34a8f8ab..49e8b3c728 100644 --- a/UI/tests/common/mocks/store_pricegroups_handlers.js +++ b/UI/tests/common/mocks/store_pricegroups_handlers.js @@ -1,72 +1,75 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const pricegroupHandlers = [ - - http.get('/erp/api/v0/products/pricegroups', () => { - - return HttpResponse.json( - { - items: [ - { id: "1", description: "Price group 1", _meta: { ETag: "1234567890" } }, - { id: "2", description: "Price group 2", _meta: { ETag: "1234567889" } } - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, - { status: 200 } - ) - }), - - http.get('/erp/api/v0/products/pricegroups/1', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { id: "1", description: "Price group 1" }, - { - status: 200, - headers: { - 'ETag': ['1234567890'] - } - } - ) - }), - - http.get('/erp/api/v0/products/pricegroups/3', () => { - - return HttpResponse.json( - { id: "", description: "" }, - { status: 404 } - ) - }), +export const pricegroupHandlers = [ + http.get("/erp/api/v0/products/pricegroups", () => { + return HttpResponse.json( + { + items: [ + { + id: "1", + description: "Price group 1", + _meta: { ETag: "1234567890" } + }, + { + id: "2", + description: "Price group 2", + _meta: { ETag: "1234567889" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { status: 200 } + ); + }), - http.post('/erp/api/v0/products/pricegroups', () => { + http.get("/erp/api/v0/products/pricegroups/1", () => { + return HttpResponse.json( + { id: "1", description: "Price group 1" }, + { + status: 200, + headers: { + ETag: ["1234567890"] + } + } + ); + }), - return HttpResponse.json( - { - id: "3", - description: "Price Group #3", - }, - { - status: 201, - headers: { - 'ETag': ['1234567891'] - } - } - ) - }), + http.get("/erp/api/v0/products/pricegroups/3", () => { + return HttpResponse.json({ id: "", description: "" }, { status: 404 }); + }), - http.put('/erp/api/v0/products/pricegroups/1', () => { + http.post("/erp/api/v0/products/pricegroups", () => { + return HttpResponse.json( + { + id: "3", + description: "Price Group #3" + }, + { + status: 201, + headers: { + ETag: ["1234567891"] + } + } + ); + }), - return HttpResponse.json( - { id: "1", description: "Price Group #1" }, - { - status: 200, - headers: { - 'ETag': ['1234567891'] - } - } - ) - }) -] + http.put("/erp/api/v0/products/pricegroups/1", () => { + return HttpResponse.json( + { id: "1", description: "Price Group #1" }, + { + status: 200, + headers: { + ETag: ["1234567891"] + } + } + ); + }) +]; diff --git a/UI/tests/common/mocks/store_sics_handlers.js b/UI/tests/common/mocks/store_sics_handlers.js index 287d7f1f52..cc1e69a4e9 100644 --- a/UI/tests/common/mocks/store_sics_handlers.js +++ b/UI/tests/common/mocks/store_sics_handlers.js @@ -1,74 +1,82 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const sicsHandlers = [ - - http.get('/erp/api/v0/contacts/sic', () => { - - return HttpResponse.json( - { - items: [ - { code: "541330", description: "Engineering service", _meta: { ETag: "1234567890" } }, - { code: "611430", description: "Professional and management development training", _meta: { ETag: "1234567889" } } - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, - { status: 200 } - ) - }), - - http.get('/erp/api/v0/contacts/sic/541330', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { code: "541330", description: "Engineering service" }, - { - status: 200, - headers: { - ETag: '1234567890' - } - } - ) - }), - - http.get('/erp/api/v0/contacts/sic/541510', () => { - - return HttpResponse.json( - { code: "", description: "" }, - { status: 404 } - ) - }), +export const sicsHandlers = [ + http.get("/erp/api/v0/contacts/sic", () => { + return HttpResponse.json( + { + items: [ + { + code: "541330", + description: "Engineering service", + _meta: { ETag: "1234567890" } + }, + { + code: "611430", + description: + "Professional and management development training", + _meta: { ETag: "1234567889" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { status: 200 } + ); + }), - http.post('/erp/api/v0/contacts/sic', () => { + http.get("/erp/api/v0/contacts/sic/541330", () => { + return HttpResponse.json( + { code: "541330", description: "Engineering service" }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - return HttpResponse.json( - { - code: "541510", - description: "Design of computer systems", - }, - { - status: 201, - headers: { - ETag: '1234567891' - }} - ) - }), + http.get("/erp/api/v0/contacts/sic/541510", () => { + return HttpResponse.json( + { code: "", description: "" }, + { status: 404 } + ); + }), - http.put('/erp/api/v0/contacts/sic/541330', () => { + http.post("/erp/api/v0/contacts/sic", () => { + return HttpResponse.json( + { + code: "541510", + description: "Design of computer systems" + }, + { + status: 201, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { - code: "541330", - description: "Engineering services" - }, - { - status: 200, - headers: { - ETag: '1234567891' - } - } - ) - }) -] + http.put("/erp/api/v0/contacts/sic/541330", () => { + return HttpResponse.json( + { + code: "541330", + description: "Engineering services" + }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); + }) +]; diff --git a/UI/tests/common/mocks/store_warehouses_handlers.js b/UI/tests/common/mocks/store_warehouses_handlers.js index dee7592d59..0a059de129 100644 --- a/UI/tests/common/mocks/store_warehouses_handlers.js +++ b/UI/tests/common/mocks/store_warehouses_handlers.js @@ -1,73 +1,80 @@ -import { http, HttpResponse } from 'msw'; +/** @format */ -export const warehousesHandlers = [ - - http.get('/erp/api/v0/products/warehouses', () => { - - return HttpResponse.json( - { - items: [ - { id: "1", description: "Modern warehouse", _meta: { ETag: "1234567892" } }, - { id: "2", description: "Huge warehouse", _meta: { ETag: "1234567890" } }, - { id: "3", description: "Moon warehouse", _meta: { ETag: "1234567893" } }, - ], - _links: [{ - title : "HTML", - rel : "download", - href : "?format=HTML" - }] - }, - { status: 200 } - ) - }), - - http.get('/erp/api/v0/products/warehouses/2', () => { +import { http, HttpResponse } from "msw"; - return HttpResponse.json( - { id: "2", description: "Huge warehouse" }, - { - status: 200, - headers: { - ETag: '1234567890' - } - } - ) - }), - - http.get('/erp/api/v0/products/warehouses/4', () => { - - return HttpResponse.json( - { id: "", description: "" }, - { status: 404 } - ) - }), +export const warehousesHandlers = [ + http.get("/erp/api/v0/products/warehouses", () => { + return HttpResponse.json( + { + items: [ + { + id: "1", + description: "Modern warehouse", + _meta: { ETag: "1234567892" } + }, + { + id: "2", + description: "Huge warehouse", + _meta: { ETag: "1234567890" } + }, + { + id: "3", + description: "Moon warehouse", + _meta: { ETag: "1234567893" } + } + ], + _links: [ + { + title: "HTML", + rel: "download", + href: "?format=HTML" + } + ] + }, + { status: 200 } + ); + }), - http.post('/erp/api/v0/products/warehouses', () => { + http.get("/erp/api/v0/products/warehouses/2", () => { + return HttpResponse.json( + { id: "2", description: "Huge warehouse" }, + { + status: 200, + headers: { + ETag: "1234567890" + } + } + ); + }), - return HttpResponse.json( - { - id: "4", - description: "Mars warehouse", - }, - { - status: 201, - headers: { - ETag: '1234567891' - } - } - ) - }), + http.get("/erp/api/v0/products/warehouses/4", () => { + return HttpResponse.json({ id: "", description: "" }, { status: 404 }); + }), - http.put('/erp/api/v0/products/warehouses/2', () => { + http.post("/erp/api/v0/products/warehouses", () => { + return HttpResponse.json( + { + id: "4", + description: "Mars warehouse" + }, + { + status: 201, + headers: { + ETag: "1234567891" + } + } + ); + }), - return HttpResponse.json( - { id: "2", description: "Biggest warehouse" }, - { - status: 200, - headers: { - ETag: '1234567891' - } - } - ) - }) -] + http.put("/erp/api/v0/products/warehouses/2", () => { + return HttpResponse.json( + { id: "2", description: "Biggest warehouse" }, + { + status: 200, + headers: { + ETag: "1234567891" + } + } + ); + }) +]; diff --git a/UI/tests/specs/openapi/API-contacts-business_types.spec.js b/UI/tests/specs/openapi/API-contacts-business_types.spec.js index 062a9bd989..dfbbb63f9d 100644 --- a/UI/tests/specs/openapi/API-contacts-business_types.spec.js +++ b/UI/tests/specs/openapi/API-contacts-business_types.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-contacts-sic.spec.js b/UI/tests/specs/openapi/API-contacts-sic.spec.js index 5c562925be..de27d4685f 100644 --- a/UI/tests/specs/openapi/API-contacts-sic.spec.js +++ b/UI/tests/specs/openapi/API-contacts-sic.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-country.spec.js b/UI/tests/specs/openapi/API-country.spec.js index 49df142738..ea3dc7af03 100644 --- a/UI/tests/specs/openapi/API-country.spec.js +++ b/UI/tests/specs/openapi/API-country.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-gifi.spec.js b/UI/tests/specs/openapi/API-gifi.spec.js index 2d77234c00..1acbe846d2 100644 --- a/UI/tests/specs/openapi/API-gifi.spec.js +++ b/UI/tests/specs/openapi/API-gifi.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-invoices.spec.js b/UI/tests/specs/openapi/API-invoices.spec.js index 4e3190fef8..82c2c715b9 100644 --- a/UI/tests/specs/openapi/API-invoices.spec.js +++ b/UI/tests/specs/openapi/API-invoices.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-languages.spec.js b/UI/tests/specs/openapi/API-languages.spec.js index 70310226fc..c1778fe8ae 100644 --- a/UI/tests/specs/openapi/API-languages.spec.js +++ b/UI/tests/specs/openapi/API-languages.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-orders.spec.js b/UI/tests/specs/openapi/API-orders.spec.js index 00b5fb2ae8..4a94509643 100644 --- a/UI/tests/specs/openapi/API-orders.spec.js +++ b/UI/tests/specs/openapi/API-orders.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-products-pricegroups.spec.js b/UI/tests/specs/openapi/API-products-pricegroups.spec.js index 11d20ba62a..71c1ed55c3 100644 --- a/UI/tests/specs/openapi/API-products-pricegroups.spec.js +++ b/UI/tests/specs/openapi/API-products-pricegroups.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/API-products-warehouses.spec.js b/UI/tests/specs/openapi/API-products-warehouses.spec.js index ed3a01ae0d..e7d25a12c9 100644 --- a/UI/tests/specs/openapi/API-products-warehouses.spec.js +++ b/UI/tests/specs/openapi/API-products-warehouses.spec.js @@ -1,4 +1,5 @@ /** @format */ +/* global process, require */ // Import test packages import jestOpenAPI from "jest-openapi"; diff --git a/UI/tests/specs/openapi/database.js b/UI/tests/specs/openapi/database.js index e96784d2e2..9418a05763 100644 --- a/UI/tests/specs/openapi/database.js +++ b/UI/tests/specs/openapi/database.js @@ -1,3 +1,6 @@ +/** @format */ +/* eslint-disable camelcase */ + // Import test packages import { spawnSync } from "child_process"; @@ -60,7 +63,7 @@ export function load_coa(username, password, company, coa) { { cwd: process.env.PWD + "/.." } - ); + ); if (cmd.status !== 0) { throw new Error(cmd.stderr.toString()); } @@ -78,10 +81,14 @@ export function initialize(company, file) { [ `--username=${pg_user}`, `--host=${pg_host}`, - "-d", company, - "-c", "set search_path='xyz','public'", - "-v", "ON_ERROR_STOP=on", - "-f", file + "-d", + company, + "-c", + "set search_path='xyz','public'", + "-v", + "ON_ERROR_STOP=on", + "-f", + file ], { cwd: process.env.PWD + "/..", @@ -91,7 +98,7 @@ export function initialize(company, file) { PERL5OPT: "" } } - ); + ); if (cmd.status !== 0) { throw new Error(cmd.stderr.toString()); } @@ -104,16 +111,12 @@ export function initialize(company, file) { } export function drop_database(company) { - let cmd = spawnSync( - "dropdb", - [company], - { - env: { - ...process.env, + let cmd = spawnSync("dropdb", [company], { + env: { + ...process.env, PERL5OPT: "" - } } - ); + }); if (cmd.status !== 0) { throw new Error(cmd.stderr.toString()); } diff --git a/UI/yarn.lock b/UI/yarn.lock index 041917ff21..e13e2f1307 100644 --- a/UI/yarn.lock +++ b/UI/yarn.lock @@ -1315,6 +1315,15 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== +"@eslint/config-array@^0.15.1": + version "0.15.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.15.1.tgz#1fa78b422d98f4e7979f2211a1fde137e26c7d61" + integrity sha512-K4gzNq+yymn/EVsXYmf+SBcBro8MTf+aXJZUphM96CdzUEr+ClGDvAbpmaEK+cGVigVXIgs9gNmvHAlrzzY5JQ== + dependencies: + "@eslint/object-schema" "^2.1.3" + debug "^4.3.1" + minimatch "^3.0.5" + "@eslint/eslintrc@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" @@ -1345,11 +1354,21 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.3.0", "@eslint/js@^9.0.0": +"@eslint/js@9.4.0": + version "9.4.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.4.0.tgz#96a2edd37ec0551ce5f9540705be23951c008a0c" + integrity sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg== + +"@eslint/js@^9.0.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.3.0.tgz#2e8f65c9c55227abc4845b1513c69c32c679d8fe" integrity sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw== +"@eslint/object-schema@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.3.tgz#e65ae80ee2927b4fd8c5c26b15ecacc2b2a6cc2a" + integrity sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw== + "@exodus/schemasafe@^1.0.0-rc.2": version "1.3.0" resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.3.0.tgz#731656abe21e8e769a7f70a4d833e6312fe59b7f" @@ -1360,25 +1379,11 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== - dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" - "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - "@humanwhocodes/retry@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" @@ -4703,16 +4708,16 @@ eslint-webpack-plugin@4.2.0: normalize-path "^3.0.0" schema-utils "^4.2.0" -eslint@9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.3.0.tgz#36a96db84592618d6ed9074d677e92f4e58c08b9" - integrity sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ== +eslint@9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.4.0.tgz#79150c3610ae606eb131f1d648d5f43b3d45f3cd" + integrity sha512-sjc7Y8cUD1IlwYcTS9qPSvGjAC8Ne9LctpxKKu3x/1IC9bnOg98Zy6GxEJUfr1NojMgVPlyANXYns8oE2c1TAA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" + "@eslint/config-array" "^0.15.1" "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.3.0" - "@humanwhocodes/config-array" "^0.13.0" + "@eslint/js" "9.4.0" "@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/retry" "^0.3.0" "@nodelib/fs.walk" "^1.2.8"