From eff9a0e890d3a49b57eb01ee010eb0d6dc1ce232 Mon Sep 17 00:00:00 2001 From: Norman Rusch Date: Thu, 6 Nov 2025 11:14:41 +0100 Subject: [PATCH 1/2] Update to eslint9 with xo config --- .eslintignore | 3 - .eslintrc | 26 - eslint.config.js | 19 + package-lock.json | 1214 ++++++++++++++++++++++++++++++++------------- package.json | 4 +- 5 files changed, 895 insertions(+), 371 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 7dbf3bc..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -coverage/ -example/ -tests/ diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index a533db3..0000000 --- a/.eslintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "env": { - "node": true, - "es6": true, - "jest/globals": true - }, - "extends": [ - "eslint:recommended", - "plugin:jest/recommended" - ], - "plugins": [ - "jest" - ], - "rules": { - "comma-dangle": ["error", { - "arrays": "always-multiline", - "objects": "always-multiline", - "imports": "always-multiline", - "exports": "always-multiline", - "functions": "ignore" - }], - "indent": ["error", "tab", { - "SwitchCase": 1 - }] - } -} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..03593a3 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,19 @@ +import {defineConfig, globalIgnores} from 'eslint/config'; +import globals from 'globals'; +import ConfigXo from 'eslint-config-xo'; +import ConfigJest from 'eslint-plugin-jest'; + +export default defineConfig([ + {languageOptions: {globals: {...globals.node}}}, + ...ConfigXo, + { + files: ['**/*.test.*'], + languageOptions: {globals: {...globals.jest}}, + ...ConfigJest.configs['flat/all'], + }, + globalIgnores([ + 'coverage/', + 'example/', + 'tests/', + ]), +]); diff --git a/package-lock.json b/package-lock.json index a7fff4d..9509164 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,8 +16,10 @@ }, "devDependencies": { "concat": "^1.0.3", - "eslint": "^8.3.0", + "eslint": "^9.39.1", + "eslint-config-xo": "^0.49.0", "eslint-plugin-jest": "^29.0.1", + "globals": "^16.5.0", "husky": "^9.0.7", "jest": "^30.1.2", "lint-staged": "^16.1.0", @@ -557,10 +559,11 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.8.0.tgz", - "integrity": "sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -575,24 +578,136 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", - "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/css": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@eslint/css/-/css-0.10.0.tgz", + "integrity": "sha512-pHoYRWS08oeU0qVez1pZCcbqHzoJnM5VMtrxH2nWDJ0ukq9DkwWV1BTY+PWK+eWBbndN9W0O9WjJTyAHsDoPOg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.14.0", + "@eslint/css-tree": "^3.6.1", + "@eslint/plugin-kit": "^0.3.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/css-tree": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/@eslint/css-tree/-/css-tree-3.6.6.tgz", + "integrity": "sha512-C3YiJMY9OZyZ/3vEMFWJIesdGaRY6DmIYvmtyxMT934CbrOKqRs+Iw7NWSRlJQEaK4dPYy2lZ2y1zkaj8z0p5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.23.0", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/@eslint/css/node_modules/@eslint/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/css/node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/css/node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -600,7 +715,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -610,13 +725,28 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -629,6 +759,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -637,26 +768,107 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "node_modules/@eslint/json": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@eslint/json/-/json-0.13.2.tgz", + "integrity": "sha512-yWLyRE18rHgHXhWigRpiyv1LDPkvWtC6oa7QHXW7YdP6gosJoq7BiLZW2yCs9U7zN7X4U3ZeOJjepA10XAOIMw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.15.2", + "@eslint/plugin-kit": "^0.3.5", + "@humanwhocodes/momoa": "^3.3.9", + "natural-compare": "^1.4.0" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/json/node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/json/node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -672,11 +884,29 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true + "node_modules/@humanwhocodes/momoa": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-3.3.10.tgz", + "integrity": "sha512-KWiFQpSAqEIyrTXko3hFNLeQvSK8zXlJQzhhxsyVn58WFRYXST99b3Nqnu+ttOtjds2Pl2grUHGpe2NzhPynuQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@inquirer/ansi": { "version": "1.0.0", @@ -1856,6 +2086,67 @@ "@sinonjs/commons": "^3.0.1" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.5.0.tgz", + "integrity": "sha512-IeZF+8H0ns6prg4VrkhgL+yrvDXWDH2cKchrbh80ejG9dQgZWp10epHMbgRuQvgchLII/lfh6Xn3lu6+6L86Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.0", + "@typescript-eslint/types": "^8.46.1", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.46.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.3.tgz", + "integrity": "sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -1913,6 +2204,13 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1937,6 +2235,13 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.8.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", @@ -2399,10 +2704,11 @@ ] }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -2415,6 +2721,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -2433,6 +2740,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3072,6 +3380,13 @@ "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", "dev": true }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true, + "license": "MIT" + }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -3256,18 +3571,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dotenv": { "version": "17.2.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", @@ -3418,58 +3721,86 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, + "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-xo": { + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.49.0.tgz", + "integrity": "sha512-hGtD689+fdJxggx1QbEjWfgGOsTasmYqtfk3Rsxru9QyKg2iOhXO2fvR9C7ck8AGw+n2wy6FsA8/MBIzznt5/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint/css": "^0.10.0", + "@eslint/json": "^0.13.1", + "@stylistic/eslint-plugin": "^5.2.3", + "confusing-browser-globals": "1.0.11", + "globals": "^16.3.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + }, + "peerDependencies": { + "eslint": ">=9.33.0" } }, "node_modules/eslint-plugin-jest": { @@ -3477,6 +3808,7 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.0.1.tgz", "integrity": "sha512-EE44T0OSMCeXhDrrdsbKAhprobKkPtJTbQz5yEktysNpHeDZTAL1SfDTNKmcFfJkY6yrQLtTKZALrD3j/Gpmiw==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/utils": "^8.0.0" }, @@ -3497,6 +3829,23 @@ } } }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -3509,12 +3858,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3527,17 +3870,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3571,18 +3911,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3614,17 +3942,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3644,10 +3986,11 @@ } }, "node_modules/esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3660,6 +4003,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3778,7 +4122,8 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.3", @@ -3827,15 +4172,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -3864,23 +4210,25 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/foreground-child": { "version": "3.3.1", @@ -4066,15 +4414,13 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4086,12 +4432,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4174,25 +4514,30 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/import-local": { @@ -4388,15 +4733,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-ssh": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz", @@ -5260,6 +5596,13 @@ "node": ">=6" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5270,7 +5613,8 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -5290,6 +5634,16 @@ "node": ">=6" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -5677,6 +6031,13 @@ "tmpl": "1.0.5" } }, + "node_modules/mdn-data": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.23.0.tgz", + "integrity": "sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -6176,6 +6537,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -6435,6 +6797,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -6600,6 +6963,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -6675,21 +7039,6 @@ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-applescript": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", @@ -6887,6 +7236,16 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -7070,12 +7429,6 @@ "node": ">=8" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "node_modules/tinyexec": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", @@ -7184,18 +7537,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typescript": { "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", @@ -7294,6 +7635,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -8063,30 +8405,112 @@ } }, "@eslint-community/eslint-utils": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.8.0.tgz", - "integrity": "sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "requires": { "eslint-visitor-keys": "^3.4.3" } }, "@eslint-community/regexpp": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", - "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true }, + "@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "requires": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + } + }, + "@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "requires": { + "@eslint/core": "^0.17.0" + } + }, + "@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + }, + "@eslint/css": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@eslint/css/-/css-0.10.0.tgz", + "integrity": "sha512-pHoYRWS08oeU0qVez1pZCcbqHzoJnM5VMtrxH2nWDJ0ukq9DkwWV1BTY+PWK+eWBbndN9W0O9WjJTyAHsDoPOg==", + "dev": true, + "requires": { + "@eslint/core": "^0.14.0", + "@eslint/css-tree": "^3.6.1", + "@eslint/plugin-kit": "^0.3.1" + }, + "dependencies": { + "@eslint/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + }, + "@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "requires": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "dependencies": { + "@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + } + } + } + } + }, + "@eslint/css-tree": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/@eslint/css-tree/-/css-tree-3.6.6.tgz", + "integrity": "sha512-C3YiJMY9OZyZ/3vEMFWJIesdGaRY6DmIYvmtyxMT934CbrOKqRs+Iw7NWSRlJQEaK4dPYy2lZ2y1zkaj8z0p5A==", + "dev": true, + "requires": { + "mdn-data": "2.23.0", + "source-map-js": "^1.0.1" + } + }, "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -8100,6 +8524,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -8118,20 +8548,74 @@ } }, "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "@eslint/json": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@eslint/json/-/json-0.13.2.tgz", + "integrity": "sha512-yWLyRE18rHgHXhWigRpiyv1LDPkvWtC6oa7QHXW7YdP6gosJoq7BiLZW2yCs9U7zN7X4U3ZeOJjepA10XAOIMw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.15.2", + "@eslint/plugin-kit": "^0.3.5", + "@humanwhocodes/momoa": "^3.3.9", + "natural-compare": "^1.4.0" + }, + "dependencies": { + "@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + }, + "@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "requires": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + } + } + } + }, + "@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true + }, + "@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "requires": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + } + }, + "@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true + }, + "@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "requires": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" } }, "@humanwhocodes/module-importer": { @@ -8140,10 +8624,16 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "@humanwhocodes/momoa": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-3.3.10.tgz", + "integrity": "sha512-KWiFQpSAqEIyrTXko3hFNLeQvSK8zXlJQzhhxsyVn58WFRYXST99b3Nqnu+ttOtjds2Pl2grUHGpe2NzhPynuQ==", + "dev": true + }, + "@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true }, "@inquirer/ansi": { @@ -8973,6 +9463,40 @@ "@sinonjs/commons": "^3.0.1" } }, + "@stylistic/eslint-plugin": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.5.0.tgz", + "integrity": "sha512-IeZF+8H0ns6prg4VrkhgL+yrvDXWDH2cKchrbh80ejG9dQgZWp10epHMbgRuQvgchLII/lfh6Xn3lu6+6L86Hw==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.9.0", + "@typescript-eslint/types": "^8.46.1", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "dependencies": { + "@typescript-eslint/types": { + "version": "8.46.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.3.tgz", + "integrity": "sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + }, + "picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true + } + } + }, "@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -9030,6 +9554,12 @@ "@babel/types": "^7.28.2" } }, + "@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true + }, "@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -9054,6 +9584,12 @@ "@types/istanbul-lib-report": "*" } }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/node": { "version": "20.8.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", @@ -9332,9 +9868,9 @@ "optional": true }, "acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true }, "acorn-jsx": { @@ -9799,6 +10335,12 @@ "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", "dev": true }, + "confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -9923,15 +10465,6 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "dotenv": { "version": "17.2.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", @@ -10036,72 +10569,58 @@ } }, "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true }, "find-up": { "version": "5.0.0", @@ -10122,15 +10641,6 @@ "is-glob": "^4.0.3" } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -10151,6 +10661,19 @@ } } }, + "eslint-config-xo": { + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.49.0.tgz", + "integrity": "sha512-hGtD689+fdJxggx1QbEjWfgGOsTasmYqtfk3Rsxru9QyKg2iOhXO2fvR9C7ck8AGw+n2wy6FsA8/MBIzznt5/Q==", + "dev": true, + "requires": { + "@eslint/css": "^0.10.0", + "@eslint/json": "^0.13.1", + "@stylistic/eslint-plugin": "^5.2.3", + "confusing-browser-globals": "1.0.11", + "globals": "^16.3.0" + } + }, "eslint-plugin-jest": { "version": "29.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.0.1.tgz", @@ -10160,6 +10683,16 @@ "@typescript-eslint/utils": "^8.0.0" } }, + "eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -10167,14 +10700,22 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + } } }, "esprima": { @@ -10184,9 +10725,9 @@ "dev": true }, "esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -10324,12 +10865,12 @@ } }, "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -10352,19 +10893,19 @@ } }, "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" } }, "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "foreground-child": { @@ -10496,13 +11037,10 @@ } }, "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", + "dev": true }, "graceful-fs": { "version": "4.2.11", @@ -10510,12 +11048,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -10570,15 +11102,15 @@ } }, "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -10715,12 +11247,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, "is-ssh": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz", @@ -11370,6 +11896,12 @@ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -11394,6 +11926,15 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -11668,6 +12209,12 @@ "tmpl": "1.0.5" } }, + "mdn-data": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.23.0.tgz", + "integrity": "sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==", + "dev": true + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -12360,15 +12907,6 @@ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, "run-applescript": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", @@ -12497,6 +13035,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true + }, "source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -12630,12 +13174,6 @@ "minimatch": "^3.0.4" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "tinyexec": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", @@ -12710,12 +13248,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, "typescript": { "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", diff --git a/package.json b/package.json index 6e658e1..62bf321 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,10 @@ }, "devDependencies": { "concat": "^1.0.3", - "eslint": "^8.3.0", + "eslint": "^9.39.1", + "eslint-config-xo": "^0.49.0", "eslint-plugin-jest": "^29.0.1", + "globals": "^16.5.0", "husky": "^9.0.7", "jest": "^30.1.2", "lint-staged": "^16.1.0", From facad37a73ba10c0aba1fd6c3b9eaefddd97561a Mon Sep 17 00:00:00 2001 From: Norman Rusch Date: Thu, 6 Nov 2025 11:38:07 +0100 Subject: [PATCH 2/2] fixup! Update to eslint9 with xo config --- jest.config.js | 4 +- prettier.config.js | 2 +- src/ValidationError.js | 4 +- src/ValidationError.test.js | 19 +- src/Validator.js | 156 ++++++------- src/Validator.test.js | 421 +++++++++++++++++++----------------- src/constants/defaults.js | 12 +- src/constants/messages.js | 8 +- 8 files changed, 311 insertions(+), 315 deletions(-) diff --git a/jest.config.js b/jest.config.js index 2089f60..0999b15 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { clearMocks: true, - coverageDirectory: "coverage", - testEnvironment: "node", + coverageDirectory: 'coverage', + testEnvironment: 'node', }; diff --git a/prettier.config.js b/prettier.config.js index e169618..2e10a0e 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -24,4 +24,4 @@ module.exports = { }, }, ], -} +}; diff --git a/src/ValidationError.js b/src/ValidationError.js index a24ef2b..88ba6e2 100644 --- a/src/ValidationError.js +++ b/src/ValidationError.js @@ -1,5 +1,4 @@ class ValidationError { - constructor(data, payload) { switch (true) { case !data: @@ -25,10 +24,9 @@ class ValidationError { throw new Error('The payload must be an object.'); } - this.payload = Object.assign({}, payload); + this.payload = {...payload}; } } - } module.exports = ValidationError; diff --git a/src/ValidationError.test.js b/src/ValidationError.test.js index 8d3ee76..8d4e4c5 100644 --- a/src/ValidationError.test.js +++ b/src/ValidationError.test.js @@ -1,10 +1,9 @@ +import {describe, expect, it} from '@jest/globals'; const ValidationError = require('./ValidationError'); const MESSAGES = require('./constants/messages'); -describe('The validation error', () => { - +describe('the validation error', () => { describe('constructor', () => { - it('should throw when not passing data', () => { expect(() => new ValidationError()) .toThrow(new Error('Missing data.')); @@ -12,6 +11,7 @@ describe('The validation error', () => { it('should throw when not passing a line', () => { const data = {}; + expect(() => new ValidationError(data)) .toThrow(new Error('Missing linenumber in data.')); }); @@ -20,6 +20,7 @@ describe('The validation error', () => { const data = { line: 42, }; + expect(() => new ValidationError(data)) .toThrow(new Error('Missing errorcode in data.')); }); @@ -29,6 +30,7 @@ describe('The validation error', () => { line: 42, code: MESSAGES.INDENTATION_TABS.code, }; + expect(() => new ValidationError(data)) .toThrow(new Error('Missing errortype in data.')); }); @@ -39,6 +41,7 @@ describe('The validation error', () => { code: MESSAGES.INDENTATION_TABS.code, type: MESSAGES.INDENTATION_TABS.type, }; + expect(() => new ValidationError(data)) .toThrow(new Error('Missing errormessage in data.')); }); @@ -51,6 +54,7 @@ describe('The validation error', () => { message: MESSAGES.INDENTATION_TABS.message, }; const error = new ValidationError(data); + expect(error).toEqual(expect.objectContaining({ line: 42, code: MESSAGES.INDENTATION_TABS.code, @@ -70,12 +74,13 @@ describe('The validation error', () => { foo: true, }; const error = new ValidationError(data, payload); + expect(error).toEqual(expect.objectContaining({ line: 42, code: MESSAGES.INDENTATION_TABS.code, type: MESSAGES.INDENTATION_TABS.type, message: MESSAGES.INDENTATION_TABS.message, - payload: payload, + payload, })); expect(error.payload).not.toBe(payload); expect(error.payload).toEqual(payload); @@ -88,7 +93,8 @@ describe('The validation error', () => { type: MESSAGES.INDENTATION_TABS.type, message: MESSAGES.INDENTATION_TABS.message, }; - const payload = 'This is a payload' + const payload = 'This is a payload'; + expect(() => new ValidationError(data, payload)) .toThrow(new Error('The payload must be an object.')); }); @@ -101,10 +107,9 @@ describe('The validation error', () => { message: MESSAGES.INDENTATION_TABS.message, }; const payload = ['This is a payload']; + expect(() => new ValidationError(data, payload)) .toThrow(new Error('The payload must be an object.')); }); - }); - }); diff --git a/src/Validator.js b/src/Validator.js index b885c28..038d905 100644 --- a/src/Validator.js +++ b/src/Validator.js @@ -17,19 +17,18 @@ const APPNAME = 'lintspaces'; const EOF = '\\r?\\n'; const REGEXP_EOL = new RegExp(EOF); -const REGEXP_INDENTATION_TABS = /^\t*(?!\s).*$/; // leading tabs without leading spaces -const REGEXP_INDENTATION_TABS_WITH_BOM = /^\t*(?! |\t).*$/; // leading tabs without leading spaces (allows BOM) -const REGEXP_INDENTATION_SPACES = /^ *(?!\s).*$/; // leading spaces without leading tabs -const REGEXP_INDENTATION_SPACES_WITH_BOM = /^ *(?!\t).*$/; // leading spaces without leading tabs (allows BOM) +const REGEXP_INDENTATION_TABS = /^\t*(?!\s).*$/; // Leading tabs without leading spaces +const REGEXP_INDENTATION_TABS_WITH_BOM = /^\t*(?! |\t).*$/; // Leading tabs without leading spaces (allows BOM) +const REGEXP_INDENTATION_SPACES = /^ *(?!\s).*$/; // Leading spaces without leading tabs +const REGEXP_INDENTATION_SPACES_WITH_BOM = /^ *(?!\t).*$/; // Leading spaces without leading tabs (allows BOM) -const REGEXP_LEADING_TABS = /^(\t*).*$/; // leading tabs -const REGEXP_LEADING_SPACES = /^( *).*$/; // leading spaces +const REGEXP_LEADING_TABS = /^(\t*).*$/; // Leading tabs +const REGEXP_LEADING_SPACES = /^( *).*$/; // Leading spaces /** * The lintspaces validator. */ class Validator { - static get APPNAME() { return APPNAME; } @@ -68,11 +67,9 @@ class Validator { try { stat = fs.statSync(path); - } catch(e) { - this._fail( - MESSAGES.PATH_INVALID.message - .replace('{a}', path) - ); + } catch (e) { + this._fail(MESSAGES.PATH_INVALID.message + .replace('{a}', path)); } if (stat.isFile()) { @@ -98,10 +95,8 @@ class Validator { // Validation is done: this._done(); } else { - this._fail( - MESSAGES.PATH_ISNT_FILE.message - .replace('{a}', path) - ); + this._fail(MESSAGES.PATH_ISNT_FILE.message + .replace('{a}', path)); } } @@ -144,6 +139,7 @@ class Validator { if (!this._processedFiles.includes(this._path)) { this._processedFiles.push(this._path); } + this._cleanUp(); } @@ -197,25 +193,22 @@ class Validator { // Lookup for config file by path: try { stat = fs.statSync(this._settings.rcconfig); - } catch(e) { - this._fail( - MESSAGES.RCCONFIG_NOTFOUND.message - .replace('{a}', this._settings.rcconfig) - ); + } catch (e) { + this._fail(MESSAGES.RCCONFIG_NOTFOUND.message + .replace('{a}', this._settings.rcconfig)); } if (stat.isFile()) { this._settings = rc( APPNAME, this._settings, - {config: this._settings.rcconfig} + {config: this._settings.rcconfig}, ); } else { - this._fail( - MESSAGES.PATH_ISNT_FILE.message - .replace('{a}', this._settings.rcconfig) - ); + this._fail(MESSAGES.PATH_ISNT_FILE.message + .replace('{a}', this._settings.rcconfig)); } + break; } } @@ -233,11 +226,9 @@ class Validator { if (typeof this._settings.editorconfig === 'string') { try { stat = fs.statSync(this._settings.editorconfig); - } catch(e) { - this._fail( - MESSAGES.EDITORCONFIG_NOTFOUND.message - .replace('{a}', this._settings.editorconfig) - ); + } catch (e) { + this._fail(MESSAGES.EDITORCONFIG_NOTFOUND.message + .replace('{a}', this._settings.editorconfig)); } if (stat.isFile()) { @@ -246,11 +237,9 @@ class Validator { // To work on windows, the config path should be relative to the // current cwd. See: Issue #40 const relative = this._settings.editorconfig.replace(process.cwd(), ''); - config = editorconfig.parseSync( - this._path, { - config: relative, - } - ); + config = editorconfig.parseSync(this._path, { + config: relative, + }); if (typeof config === 'object') { // Merge editorconfig values into the correct settings names: @@ -260,12 +249,12 @@ class Validator { // and consider not to parse invalid types and value. // See: Issue #47 if ( - config[key] === 'unset' || - !MAPPINGS[key].types.includes(typeof config[key]) || - ( - typeof config[key] === 'string' && - MAPPINGS[key].regexp instanceof RegExp && - !MAPPINGS[key].regexp.test(config[key]) + config[key] === 'unset' + || !MAPPINGS[key].types.includes(typeof config[key]) + || ( + typeof config[key] === 'string' + && MAPPINGS[key].regexp instanceof RegExp + && !MAPPINGS[key].regexp.test(config[key]) ) ) { this._settings[MAPPINGS[key].name] = false; @@ -286,10 +275,8 @@ class Validator { } } } else { - this._fail( - MESSAGES.PATH_ISNT_FILE.message - .replace('{a}', this._settings.editorconfig) - ); + this._fail(MESSAGES.PATH_ISNT_FILE.message + .replace('{a}', this._settings.editorconfig)); } } } @@ -305,7 +292,7 @@ class Validator { // Load ignore patterns: if (Array.isArray(this._settings.ignores)) { - this._settings.ignores.forEach((ignore) => { + this._settings.ignores.forEach(ignore => { if (typeof ignore === 'string' && typeof PATTERNS[ignore] === 'object') { ignores.push(PATTERNS[ignore]); } else if (typeof ignore === 'object' && typeof ignore.test === 'function') { @@ -321,18 +308,14 @@ class Validator { // Index lines which match patterns, when available: if (Array.isArray(ignores)) { - // Loop all given regular expressions: - ignores.forEach((expression) => { - + ignores.forEach(expression => { const matches = this._data.match(expression) || []; - matches.forEach((match) => { - + matches.forEach(match => { // Only perform an action when match has more // than one line: if (REGEXP_EOL.test(match)) { - // Use fake replace cycle to find indices of all // lines to be ignored. Return unchanged match: this._data = this._data.replace(match, (matched, ...args) => { @@ -341,19 +324,19 @@ class Validator { let indexOfSecondLine; let totalLines; - // last argument is whole string, remove it: + // Last argument is whole string, remove it: args.pop(); - // matched string start index: + // Matched string start index: indexOfMatch = args.pop(); - // slice source data from beginning to matched + // Slice source data from beginning to matched // string start index to find index of second // line to be ignored: indexOfSecondLine = this._data.slice(0, indexOfMatch).split(REGEXP_EOL).length; totalLines = matched.split(REGEXP_EOL).length; - //Count and store lines: + // Count and store lines: while (index < totalLines) { this._ignoredLines[indexOfSecondLine + index - 1] = true; index++; @@ -364,7 +347,6 @@ class Validator { // the current 'matched' more than once: return Array(totalLines).join('\n'); }); - } }); }); @@ -408,7 +390,7 @@ class Validator { // newlines is defined. In this case update variables: if (newlines) { atLine = newlines.length + 1; - amount = amount - 1; + amount -= 1; } // Test if found lines are not in ignored lines: @@ -424,6 +406,7 @@ class Validator { foundIgnore = true; amount--; } + fromLine++; } @@ -437,17 +420,16 @@ class Validator { } if (amount > this._settings.newlineMaximum) { - // Build message and report: message = MESSAGES.NEWLINE_MAXIMUM.message .replace('{a}', amount) .replace('{b}', this._settings.newlineMaximum); - data = {message: message}; + data = {message}; data = extend({}, MESSAGES.NEWLINE_MAXIMUM, data); line = atLine + 1; payload = { - amount: amount, + amount, maximum: this._settings.newlineMaximum, }; @@ -455,15 +437,13 @@ class Validator { } return original; - } + }; this._data.replace(new RegExp(newlinesAtBeginn, 'g'), validate); this._data.replace(new RegExp(newlinesInFile, 'g'), validate); } else { - this._fail( - MESSAGES.NEWLINE_MAXIMUM_INVALIDVALUE.message - .replace('{a}', this._settings.newlineMaximum) - ); + this._fail(MESSAGES.NEWLINE_MAXIMUM_INVALIDVALUE.message + .replace('{a}', this._settings.newlineMaximum)); } } } @@ -479,12 +459,12 @@ class Validator { const index = this._lines.length - 1; - // check last line: + // Check last line: if (this._lines[index].length > 0) { this._report(MESSAGES.NEWLINE, index + 1); } - // check line before last line: + // Check line before last line: if (index - 1 > 0 && this._lines[index - 1].length === 0) { this._report(MESSAGES.NEWLINE_AMOUNT, index + 1); } @@ -500,7 +480,6 @@ class Validator { // Is there a trailing whitespace? if (matchSpaces.length > 0 && matchSpaces[0].length > 0) { - // Check the options if trainlingspaces should be ignored and the // current line is inside the ignored lines: stop reporting! // @@ -526,10 +505,9 @@ class Validator { * @private */ _validateIndentation(line, index) { - if (!this._ignoredLines[index] && - typeof this._settings.indentation === 'string' && - typeof line === 'string') { - + if (!this._ignoredLines[index] + && typeof this._settings.indentation === 'string' + && typeof line === 'string') { const tabsRegExpFinal = this._settings.allowsBOM ? REGEXP_INDENTATION_TABS_WITH_BOM : REGEXP_INDENTATION_TABS; @@ -546,7 +524,7 @@ class Validator { switch (this._settings.indentation) { case 'tabs': if (!tabsRegExpFinal.test(line)) { - // indentation failed... + // Indentation failed... return this._report(MESSAGES.INDENTATION_TABS, index + 1); } @@ -568,11 +546,11 @@ class Validator { .replace('{a}', spacesExpected) .replace('{b}', indent); - data = {message: message}; + data = {message}; data = extend({}, MESSAGES.INDENTATION_SPACES_AMOUNT, data); payload = { expected: spacesExpected, - indent: indent, + indent, }; this._report(data, index + 1, payload); @@ -591,10 +569,9 @@ class Validator { * @private */ _guessIndentation(line, index) { - if (!this._ignoredLines[index] && - this._settings.indentationGuess && - this._settings.indentation) { - + if (!this._ignoredLines[index] + && this._settings.indentationGuess + && this._settings.indentation) { const regExp = this._settings.indentation === 'tabs' ? REGEXP_LEADING_TABS : REGEXP_LEADING_SPACES; @@ -615,6 +592,7 @@ class Validator { matchPrevious = matchPrevious.length > 1 ? matchPrevious[1].length : 0; n++; } + // Calculate the indentation for both lines: indentation = match; indentationPrevious = matchPrevious; @@ -641,17 +619,16 @@ class Validator { return; } - // report: + // Report: message = MESSAGES.INDENTATION_GUESS.message .replace('{a}', indentationPrevious + 1) .replace('{b}', indentation); - - data = {message: message}; + data = {message}; data = extend({}, MESSAGES.INDENTATION_GUESS, data); this._report(data, index + 1, { - indentation: indentation, + indentation, expected: indentationPrevious + 1, }); } @@ -663,7 +640,7 @@ class Validator { */ _validateEndOfLine() { if (typeof this._settings.endOfLine === 'string') { - const isEOL = (ch) => ch === '\r' || ch === '\n'; + const isEOL = ch => ch === '\r' || ch === '\n'; let desiredEOL = '\n'; let atLine = 1; @@ -693,6 +670,7 @@ class Validator { } else { totalEOL = aCharacter; } + if (totalEOL !== desiredEOL) { payload = { expected: this._settings.endOfLine, @@ -736,12 +714,11 @@ class Validator { if (!this._invalid[this._path]) { this._invalid[this._path] = {}; } + file = this._invalid[this._path]; // Lookup for given line: - if (!file[linenumber]) { - file[linenumber] = []; - } + file[linenumber] ||= []; line = file[linenumber]; // Build error: @@ -750,7 +727,6 @@ class Validator { // Store error: line.push(validationError); } - } module.exports = Validator; diff --git a/src/Validator.test.js b/src/Validator.test.js index 631a54b..79da78a 100644 --- a/src/Validator.test.js +++ b/src/Validator.test.js @@ -1,3 +1,4 @@ +import {describe, expect, it} from '@jest/globals'; const extend = require('deep-extend'); const fs = require('fs'); const path = require('path'); @@ -9,12 +10,10 @@ const Validator = require('./Validator'); const __fromFixtures = (...args) => path.join.apply(null, [__dirname, '__fixtures__'].concat(args)); -describe('The validator', () => { - +describe('the validator', () => { // Static // ------------------------------------------------------------------------- describe('static', () => { - it('should export appname', () => { expect(Validator.APPNAME).toBe('lintspaces'); }); @@ -30,20 +29,19 @@ describe('The validator', () => { it('should export ignore patterns', () => { expect(Validator.PATTERNS).toEqual(Patterns); }); - }); // Core // ------------------------------------------------------------------------- describe('core', () => { - it('should throw if file does not exist', () => { const validator = new Validator({trailingspaces: true}); const cases = [path.join('this', 'file', 'does', 'not', 'exists.js')]; - cases.forEach((file) => { + cases.forEach(file => { const message = Messages.PATH_INVALID.message.replace('{a}', file); const error = new Error(message); + expect(() => validator.validate(file)).toThrow(error); }); }); @@ -56,18 +54,17 @@ describe('The validator', () => { __fromFixtures(), ]; - cases.forEach((file) => { + cases.forEach(file => { const message = Messages.PATH_ISNT_FILE.message.replace('{a}', file); const error = new Error(message); + expect(() => validator.validate(file)).toThrow(error); }); - }); describe('rcconfig', () => { - it('should override settings', () => { - // fake loading: + // Fake loading: const validator = new Validator({ trailingspaces: false, newlineMaximum: false, @@ -93,13 +90,13 @@ describe('The validator', () => { it('should load by appname', () => { const config = path.join(__dirname, '..', `.${Validator.APPNAME}rc`); - // create config file: + // Create config file: fs.writeFileSync(config, JSON.stringify({ indentation: 'spaces', trailingspaces: true, })); - // fake loading: + // Fake loading: const validator = new Validator({rcconfig: true}); validator._path = __filename; validator._loadSettings(); @@ -107,7 +104,7 @@ describe('The validator', () => { expect(validator._settings.indentation).toBe('spaces'); expect(validator._settings.trailingspaces).toBeTruthy(); - // remove config file: + // Remove config file: fs.unlinkSync(config); }); @@ -116,9 +113,10 @@ describe('The validator', () => { [ '.', __dirname, - ].forEach((rcconfig) => { + ].forEach(rcconfig => { const message = Messages.PATH_ISNT_FILE.message.replace('{a}', rcconfig); const error = new Error(message); + expect(() => new Validator({rcconfig}).validate(file)).toThrow(error); }); }); @@ -127,19 +125,18 @@ describe('The validator', () => { const file = __fromFixtures('core.fixture'); [ path.join(__dirname, 'path', 'that', 'doesnt', 'existis', '.rcconfig'), - ].forEach((rcconfig) => { + ].forEach(rcconfig => { const message = Messages.RCCONFIG_NOTFOUND.message.replace('{a}', rcconfig); const error = new Error(message); + expect(() => new Validator({rcconfig}).validate(file)).toThrow(error); }); }); - }); describe('editorconfig', () => { - it('should override settings', () => { - // fake loading: + // Fake loading: const validator = new Validator({ editorconfig: __fromFixtures('.editorconfig'), @@ -168,7 +165,7 @@ describe('The validator', () => { }); it('should load specific settings by extension', () => { - // fake loading: + // Fake loading: const validator = new Validator({ editorconfig: __fromFixtures('.editorconfig'), @@ -186,6 +183,7 @@ describe('The validator', () => { // Load editorconfig with extension where options are disabled: validator._path = __fromFixtures('core.fixture'); validator._loadSettings(); + expect(validator._settings.trailingspaces).toBeFalsy(); expect(validator._settings.newline).toBeFalsy(); expect(validator._settings.endOfLine).toBe('lf'); @@ -193,13 +191,14 @@ describe('The validator', () => { // Load editorconfig with extension where options are enabled: validator._path = __fromFixtures('corer.other-fixture'); validator._loadSettings(); + expect(validator._settings.trailingspaces).toBeTruthy(); expect(validator._settings.newline).toBeTruthy(); expect(validator._settings.endOfLine).toBe('crlf'); }); it('should be more relevant than rcconfig', () => { - // fake loading: + // Fake loading: const validator = new Validator({ rcconfig: __fromFixtures('.lintspacesrc'), editorconfig: __fromFixtures('.editorconfig'), @@ -208,7 +207,7 @@ describe('The validator', () => { validator._path = __fromFixtures('corer.other-fixture'); validator._loadSettings(); - // test for expected properties by editorconfig: + // Test for expected properties by editorconfig: expect(validator._settings.indentation).toBe('tabs'); expect(validator._settings.spaces).toBe(false); expect(validator._settings.trailingspaces).toBeTruthy(); @@ -216,7 +215,7 @@ describe('The validator', () => { }); it('should parse "unset" value as false', () => { - // fake loading: + // Fake loading: const validator = new Validator({ editorconfig: __fromFixtures('.editorconfig.unset'), @@ -231,17 +230,18 @@ describe('The validator', () => { // Load editorconfig with extension where options are disabled: validator._path = __fromFixtures('core.fixture'); validator._loadSettings(); + expect(validator._settings).toEqual(expect.objectContaining({ trailingspaces: false, newline: false, indentation: false, spaces: false, endOfLine: false, - })) + })); }); it('should parse invalid value as false', () => { - // fake loading: + // Fake loading: const validator = new Validator({ editorconfig: __fromFixtures('.editorconfig.invalid'), @@ -256,13 +256,14 @@ describe('The validator', () => { // Load editorconfig with extension where options are disabled: validator._path = __fromFixtures('core.fixture'); validator._loadSettings(); + expect(validator._settings).toEqual(expect.objectContaining({ trailingspaces: false, newline: false, indentation: false, spaces: false, endOfLine: false, - })) + })); }); it('should throw if is not a file', () => { @@ -270,9 +271,10 @@ describe('The validator', () => { [ '.', __dirname, - ].forEach((editorconfig) => { + ].forEach(editorconfig => { const message = Messages.PATH_ISNT_FILE.message.replace('{a}', editorconfig); const error = new Error(message); + expect(() => new Validator({editorconfig}).validate(file)).toThrow(error); }); }); @@ -281,25 +283,24 @@ describe('The validator', () => { const file = __fromFixtures('core.fixture'); [ path.join(__dirname, 'path', 'that', 'doesnt', 'existis', '.editorconfig'), - ].forEach((editorconfig) => { + ].forEach(editorconfig => { const message = Messages.EDITORCONFIG_NOTFOUND.message.replace('{a}', editorconfig); const error = new Error(message); + expect(() => new Validator({editorconfig}).validate(file)).toThrow(error); }); }); - }); - }); // Reports // ------------------------------------------------------------------------- describe('reports', () => { - describe('invalid files', () => { it('should initially be empty', () => { const validator = new Validator({endOfLine: 'CR'}); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -315,15 +316,16 @@ describe('The validator', () => { const payload = {expected: 'CR', end_of_line: 'LF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file1]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }, }); }); @@ -333,6 +335,7 @@ describe('The validator', () => { it('should be empty when passing invalid path', () => { const validator = new Validator({endOfLine: 'CR'}); const report = validator.getInvalidLines('foo/bar/'); + expect(report).toEqual({}); }); @@ -342,6 +345,7 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidLines(file); + expect(report).toEqual({}); }); @@ -353,57 +357,57 @@ describe('The validator', () => { const payload = {expected: 'CR', end_of_line: 'LF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidLines(file); + expect(report).toEqual({ - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }); }); }); describe('processed files', () => { - it('should return number of processed files', () => { const validator = new Validator({endOfLine: 'CR'}); + expect(validator.getProcessedFiles()).toBe(0); let file = __fromFixtures('endofline.cr.fixture'); validator.validate(file); + expect(validator.getProcessedFiles()).toBe(1); file = __fromFixtures('endofline.lf.fixture'); validator.validate(file); + expect(validator.getProcessedFiles()).toBe(2); }); it('should not increase number of processed files when validate file twice', () => { const validator = new Validator({endOfLine: 'CR'}); + expect(validator.getProcessedFiles()).toBe(0); const file = __fromFixtures('endofline.cr.fixture'); validator.validate(file); validator.validate(file); + expect(validator.getProcessedFiles()).toBe(1); }); - }); - }); // Validations // ------------------------------------------------------------------------- describe('validations', () => { - // End of line // --------------------------------------------------------------------- describe('end of line', () => { - describe('carriage return', () => { - it('should pass', () => { const file = __fromFixtures('endofline.cr.fixture'); const validator = new Validator({endOfLine: 'CR'}); @@ -420,15 +424,16 @@ describe('The validator', () => { const payload = {expected: 'CR', end_of_line: 'LF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }, }); }); @@ -441,11 +446,12 @@ describe('The validator', () => { const payload = {expected: 'CR', end_of_line: 'CRLF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], }, }); }); @@ -458,24 +464,24 @@ describe('The validator', () => { const payload = {expected: 'CR'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, defaults, {line: 2}, {payload: {end_of_line: 'LF'}})], - '3': [extend({}, defaults, {line: 3}, {payload: {end_of_line: 'CRLF'}})], + 2: [extend({}, defaults, {line: 2}, {payload: {end_of_line: 'LF'}})], + 3: [extend({}, defaults, {line: 3}, {payload: {end_of_line: 'CRLF'}})], }, }); }); - }); describe('line feed', () => { - it('should pass', () => { const file = __fromFixtures('endofline.lf.fixture'); const validator = new Validator({endOfLine: 'LF'}); validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -487,15 +493,16 @@ describe('The validator', () => { const payload = {expected: 'LF', end_of_line: 'CR'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }, }); }); @@ -508,11 +515,12 @@ describe('The validator', () => { const payload = {expected: 'LF', end_of_line: 'CRLF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], }, }); }); @@ -525,24 +533,24 @@ describe('The validator', () => { const payload = {expected: 'LF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1}, {payload: {end_of_line: 'CR'}})], - '3': [extend({}, defaults, {line: 3}, {payload: {end_of_line: 'CRLF'}})], + 1: [extend({}, defaults, {line: 1}, {payload: {end_of_line: 'CR'}})], + 3: [extend({}, defaults, {line: 3}, {payload: {end_of_line: 'CRLF'}})], }, }); }); - }); describe('carriage return, line feed', () => { - it('should pass', () => { const file = __fromFixtures('endofline.crlf.fixture'); const validator = new Validator({endOfLine: 'CRLF'}); validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -554,15 +562,16 @@ describe('The validator', () => { const payload = {expected: 'CRLF', end_of_line: 'CR'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }, }); }); @@ -575,15 +584,16 @@ describe('The validator', () => { const payload = {expected: 'CRLF', end_of_line: 'LF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1})], - '2': [extend({}, defaults, {line: 2})], - '3': [extend({}, defaults, {line: 3})], - '4': [extend({}, defaults, {line: 4})], - '5': [extend({}, defaults, {line: 5})], - '6': [extend({}, defaults, {line: 6})], - '7': [extend({}, defaults, {line: 7})], + 1: [extend({}, defaults, {line: 1})], + 2: [extend({}, defaults, {line: 2})], + 3: [extend({}, defaults, {line: 3})], + 4: [extend({}, defaults, {line: 4})], + 5: [extend({}, defaults, {line: 5})], + 6: [extend({}, defaults, {line: 6})], + 7: [extend({}, defaults, {line: 7})], }, }); }); @@ -596,30 +606,28 @@ describe('The validator', () => { const payload = {expected: 'CRLF'}; const defaults = extend({payload}, Messages.END_OF_LINE); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, defaults, {line: 1}, {payload: {end_of_line: 'CR'}})], - '2': [extend({}, defaults, {line: 2}, {payload: {end_of_line: 'LF'}})], + 1: [extend({}, defaults, {line: 1}, {payload: {end_of_line: 'CR'}})], + 2: [extend({}, defaults, {line: 2}, {payload: {end_of_line: 'LF'}})], }, }); }); - }); - }); // Indentation // --------------------------------------------------------------------- describe('indentation', () => { - describe('tabs', () => { - it('should pass', () => { const file = __fromFixtures('indentation.tabs.fixture'); const validator = new Validator({indentation: 'tabs'}); validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -629,10 +637,11 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '5': [extend({}, Messages.INDENTATION_TABS, {line: 5})], - '6': [extend({}, Messages.INDENTATION_TABS, {line: 6})], + 5: [extend({}, Messages.INDENTATION_TABS, {line: 5})], + 6: [extend({}, Messages.INDENTATION_TABS, {line: 6})], }, }); }); @@ -646,6 +655,7 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -658,23 +668,23 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, Messages.INDENTATION_TABS, {line: 1})], + 1: [extend({}, Messages.INDENTATION_TABS, {line: 1})], }, }); }); - }); describe('spaces', () => { - it('should pass', () => { const file = __fromFixtures('indentation.spaces.fixture'); const validator = new Validator({indentation: 'spaces'}); validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -684,14 +694,15 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, Messages.INDENTATION_SPACES, {line: 2})], - '3': [extend({}, Messages.INDENTATION_SPACES, {line: 3})], - '4': [extend({}, Messages.INDENTATION_SPACES, {line: 4})], - '5': [extend({}, Messages.INDENTATION_SPACES, {line: 5})], - '6': [extend({}, Messages.INDENTATION_SPACES, {line: 6})], - '7': [extend({}, Messages.INDENTATION_SPACES, {line: 7})], + 2: [extend({}, Messages.INDENTATION_SPACES, {line: 2})], + 3: [extend({}, Messages.INDENTATION_SPACES, {line: 3})], + 4: [extend({}, Messages.INDENTATION_SPACES, {line: 4})], + 5: [extend({}, Messages.INDENTATION_SPACES, {line: 5})], + 6: [extend({}, Messages.INDENTATION_SPACES, {line: 6})], + 7: [extend({}, Messages.INDENTATION_SPACES, {line: 7})], }, }); }); @@ -702,13 +713,14 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, Messages.INDENTATION_SPACES, {line: 2})], - '3': [extend({}, Messages.INDENTATION_SPACES, {line: 3})], - '4': [extend({}, Messages.INDENTATION_SPACES, {line: 4})], - '5': [extend({}, Messages.INDENTATION_SPACES, {line: 5})], - '7': [extend({}, Messages.INDENTATION_SPACES, {line: 7})], + 2: [extend({}, Messages.INDENTATION_SPACES, {line: 2})], + 3: [extend({}, Messages.INDENTATION_SPACES, {line: 3})], + 4: [extend({}, Messages.INDENTATION_SPACES, {line: 4})], + 5: [extend({}, Messages.INDENTATION_SPACES, {line: 5})], + 7: [extend({}, Messages.INDENTATION_SPACES, {line: 7})], }, }); }); @@ -722,9 +734,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '3': [extend({}, Messages.INDENTATION_SPACES_AMOUNT, { + 3: [extend({}, Messages.INDENTATION_SPACES_AMOUNT, { message: Messages .INDENTATION_SPACES_AMOUNT .message @@ -736,7 +749,7 @@ describe('The validator', () => { indent: 5, }, })], - '5': [extend({}, Messages.INDENTATION_SPACES_AMOUNT, { + 5: [extend({}, Messages.INDENTATION_SPACES_AMOUNT, { message: Messages .INDENTATION_SPACES_AMOUNT .message @@ -761,6 +774,7 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -773,17 +787,16 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, Messages.INDENTATION_SPACES, {line: 1})], + 1: [extend({}, Messages.INDENTATION_SPACES, {line: 1})], }, }); }); - }); describe('guess', () => { - it('should guess incorrect using tabs', () => { const file = __fromFixtures('indentation.guess.tabs.fixture'); const validator = new Validator({ @@ -793,9 +806,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '10': [extend({}, Messages.INDENTATION_GUESS, { + 10: [extend({}, Messages.INDENTATION_GUESS, { message: Messages .INDENTATION_GUESS .message @@ -807,7 +821,7 @@ describe('The validator', () => { expected: 2, }, })], - '15': [extend({}, Messages.INDENTATION_GUESS, { + 15: [extend({}, Messages.INDENTATION_GUESS, { message: Messages .INDENTATION_GUESS .message @@ -833,9 +847,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '10': [extend({}, Messages.INDENTATION_GUESS, { + 10: [extend({}, Messages.INDENTATION_GUESS, { message: Messages .INDENTATION_GUESS .message @@ -847,7 +862,7 @@ describe('The validator', () => { expected: 2, }, })], - '15': [extend({}, Messages.INDENTATION_GUESS, { + 15: [extend({}, Messages.INDENTATION_GUESS, { message: Messages .INDENTATION_GUESS .message @@ -872,9 +887,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '7': [extend({}, Messages.INDENTATION_GUESS, { + 7: [extend({}, Messages.INDENTATION_GUESS, { message: Messages .INDENTATION_GUESS .message @@ -896,42 +912,41 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, Messages.INDENTATION_SPACES, {line: 2})], - '3': [extend({}, Messages.INDENTATION_SPACES, {line: 3})], - '5': [extend({}, Messages.INDENTATION_SPACES, {line: 5})], - '6': [extend({}, Messages.INDENTATION_SPACES, {line: 6})], - '7': [extend({}, Messages.INDENTATION_SPACES, {line: 7})], - '9': [extend({}, Messages.INDENTATION_SPACES, {line: 9})], - '10': [extend({}, Messages.INDENTATION_SPACES, {line: 10})], - '11': [extend({}, Messages.INDENTATION_SPACES, {line: 11})], - '13': [extend({}, Messages.INDENTATION_SPACES, {line: 13})], - '14': [extend({}, Messages.INDENTATION_SPACES, {line: 14})], - '15': [extend({}, Messages.INDENTATION_SPACES, {line: 15})], - '16': [extend({}, Messages.INDENTATION_SPACES, {line: 16})], - '17': [extend({}, Messages.INDENTATION_SPACES, {line: 17})], - '18': [extend({}, Messages.INDENTATION_SPACES, {line: 18})], - '19': [extend({}, Messages.INDENTATION_SPACES, {line: 19})], - '20': [extend({}, Messages.INDENTATION_SPACES, {line: 20})], + 2: [extend({}, Messages.INDENTATION_SPACES, {line: 2})], + 3: [extend({}, Messages.INDENTATION_SPACES, {line: 3})], + 5: [extend({}, Messages.INDENTATION_SPACES, {line: 5})], + 6: [extend({}, Messages.INDENTATION_SPACES, {line: 6})], + 7: [extend({}, Messages.INDENTATION_SPACES, {line: 7})], + 9: [extend({}, Messages.INDENTATION_SPACES, {line: 9})], + 10: [extend({}, Messages.INDENTATION_SPACES, {line: 10})], + 11: [extend({}, Messages.INDENTATION_SPACES, {line: 11})], + 13: [extend({}, Messages.INDENTATION_SPACES, {line: 13})], + 14: [extend({}, Messages.INDENTATION_SPACES, {line: 14})], + 15: [extend({}, Messages.INDENTATION_SPACES, {line: 15})], + 16: [extend({}, Messages.INDENTATION_SPACES, {line: 16})], + 17: [extend({}, Messages.INDENTATION_SPACES, {line: 17})], + 18: [extend({}, Messages.INDENTATION_SPACES, {line: 18})], + 19: [extend({}, Messages.INDENTATION_SPACES, {line: 19})], + 20: [extend({}, Messages.INDENTATION_SPACES, {line: 20})], }, }); }); - }); - }); // Trailing spaces // --------------------------------------------------------------------- describe('trailingspaces', () => { - it('should pass', () => { const file = __fromFixtures('trailingspaces.valid.fixture'); const validator = new Validator({trailingspaces: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -940,12 +955,13 @@ describe('The validator', () => { const validator = new Validator({trailingspaces: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, Messages.TRAILINGSPACES, {line: 2})], - '5': [extend({}, Messages.TRAILINGSPACES, {line: 5})], - '8': [extend({}, Messages.TRAILINGSPACES, {line: 8})], + 2: [extend({}, Messages.TRAILINGSPACES, {line: 2})], + 5: [extend({}, Messages.TRAILINGSPACES, {line: 5})], + 8: [extend({}, Messages.TRAILINGSPACES, {line: 8})], }, }); }); @@ -959,15 +975,16 @@ describe('The validator', () => { }); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '9': [extend({}, Messages.TRAILINGSPACES, {line: 9})], // singleline - '11': [extend({}, Messages.TRAILINGSPACES, {line: 11})], // singleline - '15': [extend({}, Messages.TRAILINGSPACES, {line: 15})], // multiline - '17': [extend({}, Messages.TRAILINGSPACES, {line: 17})], // singleline - '21': [extend({}, Messages.TRAILINGSPACES, {line: 21})], // multiline - '26': [extend({}, Messages.TRAILINGSPACES, {line: 26})], // multiline + 9: [extend({}, Messages.TRAILINGSPACES, {line: 9})], // Singleline + 11: [extend({}, Messages.TRAILINGSPACES, {line: 11})], // Singleline + 15: [extend({}, Messages.TRAILINGSPACES, {line: 15})], // Multiline + 17: [extend({}, Messages.TRAILINGSPACES, {line: 17})], // Singleline + 21: [extend({}, Messages.TRAILINGSPACES, {line: 21})], // Multiline + 26: [extend({}, Messages.TRAILINGSPACES, {line: 26})], // Multiline }, }); }); @@ -980,27 +997,27 @@ describe('The validator', () => { }); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '2': [extend({}, Messages.TRAILINGSPACES, {line: 2})], - '8': [extend({}, Messages.TRAILINGSPACES, {line: 8})], + 2: [extend({}, Messages.TRAILINGSPACES, {line: 2})], + 8: [extend({}, Messages.TRAILINGSPACES, {line: 8})], }, }); }); - }); // Newline (at the end of file) // --------------------------------------------------------------------- describe('newline (at the end of file)', () => { - it('should pass', () => { const file = __fromFixtures('newlines.endoffile.valid.fixture'); const validator = new Validator({newline: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -1009,10 +1026,11 @@ describe('The validator', () => { const validator = new Validator({newline: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '8': [extend({}, Messages.NEWLINE, {line: 8})], + 8: [extend({}, Messages.NEWLINE, {line: 8})], }, }); }); @@ -1022,10 +1040,11 @@ describe('The validator', () => { const validator = new Validator({newline: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, Messages.NEWLINE, {line: 1})], + 1: [extend({}, Messages.NEWLINE, {line: 1})], }, }); }); @@ -1035,26 +1054,26 @@ describe('The validator', () => { const validator = new Validator({newline: true}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '12': [extend({}, Messages.NEWLINE_AMOUNT, {line: 12})], + 12: [extend({}, Messages.NEWLINE_AMOUNT, {line: 12})], }, }); }); - }); // Newlines maximum // --------------------------------------------------------------------- describe('newlines maximum', () => { - it('should pass', () => { const file = __fromFixtures('newlines.blocks.fixture'); const validator = new Validator({newlineMaximum: 4}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({}); }); @@ -1063,10 +1082,11 @@ describe('The validator', () => { const validator = new Validator({newlineMaximum: 2}); validator.validate(file); - const report = validator.getInvalidFiles() + const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '8': [extend({}, Messages.NEWLINE_MAXIMUM, { + 8: [extend({}, Messages.NEWLINE_MAXIMUM, { message: Messages.NEWLINE_MAXIMUM .message .replace('{a}', 3) @@ -1077,7 +1097,7 @@ describe('The validator', () => { maximum: 2, }, })], - '16': [extend({}, Messages.NEWLINE_MAXIMUM, { + 16: [extend({}, Messages.NEWLINE_MAXIMUM, { message: Messages.NEWLINE_MAXIMUM .message .replace('{a}', 4) @@ -1098,15 +1118,12 @@ describe('The validator', () => { expect(() => validator.validate(file)).toThrow(Error); }); - }); // Ignores // --------------------------------------------------------------------- describe('ignores', () => { - describe('build in', () => { - it('should ignore indentaion', () => { const file = __fromFixtures('ignores.buildin.js.fixture'); const validator = new Validator({ @@ -1116,9 +1133,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '16': [extend({}, Messages.INDENTATION_TABS, {line: 16})], + 16: [extend({}, Messages.INDENTATION_TABS, {line: 16})], }, }); }); @@ -1132,12 +1150,13 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '3': [extend({}, Messages.TRAILINGSPACES, {line: 3})], - '11': [extend({}, Messages.TRAILINGSPACES, {line: 11})], - '19': [extend({}, Messages.TRAILINGSPACES, {line: 19})], - '28': [extend({}, Messages.TRAILINGSPACES, {line: 28})], + 3: [extend({}, Messages.TRAILINGSPACES, {line: 3})], + 11: [extend({}, Messages.TRAILINGSPACES, {line: 11})], + 19: [extend({}, Messages.TRAILINGSPACES, {line: 19})], + 28: [extend({}, Messages.TRAILINGSPACES, {line: 28})], }, }); }); @@ -1153,21 +1172,20 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '3': [extend({}, Messages.TRAILINGSPACES, {line: 3})], - '11': [extend({}, Messages.TRAILINGSPACES, {line: 11})], - '16': [extend({}, Messages.INDENTATION_TABS, {line: 16})], - '19': [extend({}, Messages.TRAILINGSPACES, {line: 19})], - '28': [extend({}, Messages.TRAILINGSPACES, {line: 28})], + 3: [extend({}, Messages.TRAILINGSPACES, {line: 3})], + 11: [extend({}, Messages.TRAILINGSPACES, {line: 11})], + 16: [extend({}, Messages.INDENTATION_TABS, {line: 16})], + 19: [extend({}, Messages.TRAILINGSPACES, {line: 19})], + 28: [extend({}, Messages.TRAILINGSPACES, {line: 28})], }, }); }); - }); describe('user defined', () => { - it('should ignore indentaion', () => { const file = __fromFixtures('ignores.userdefined.fixture'); const validator = new Validator({ @@ -1179,12 +1197,13 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, Messages.INDENTATION_TABS, {line: 1})], - '4': [extend({}, Messages.INDENTATION_TABS, {line: 4})], - '10': [extend({}, Messages.INDENTATION_TABS, {line: 10})], - '11': [extend({}, Messages.INDENTATION_TABS, {line: 11})], + 1: [extend({}, Messages.INDENTATION_TABS, {line: 1})], + 4: [extend({}, Messages.INDENTATION_TABS, {line: 4})], + 10: [extend({}, Messages.INDENTATION_TABS, {line: 10})], + 11: [extend({}, Messages.INDENTATION_TABS, {line: 11})], }, }); }); @@ -1200,9 +1219,10 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '7': [extend({}, Messages.TRAILINGSPACES, {line: 7})], + 7: [extend({}, Messages.TRAILINGSPACES, {line: 7})], }, }); }); @@ -1220,21 +1240,18 @@ describe('The validator', () => { validator.validate(file); const report = validator.getInvalidFiles(); + expect(report).toEqual({ [file]: { - '1': [extend({}, Messages.INDENTATION_TABS, {line: 1})], - '4': [extend({}, Messages.INDENTATION_TABS, {line: 4})], - '7': [extend({}, Messages.TRAILINGSPACES, {line: 7})], - '10': [extend({}, Messages.INDENTATION_TABS, {line: 10})], - '11': [extend({}, Messages.INDENTATION_TABS, {line: 11})], + 1: [extend({}, Messages.INDENTATION_TABS, {line: 1})], + 4: [extend({}, Messages.INDENTATION_TABS, {line: 4})], + 7: [extend({}, Messages.TRAILINGSPACES, {line: 7})], + 10: [extend({}, Messages.INDENTATION_TABS, {line: 10})], + 11: [extend({}, Messages.INDENTATION_TABS, {line: 11})], }, }); }); - }); - }); - }); - }); diff --git a/src/constants/defaults.js b/src/constants/defaults.js index 25361f7..70c6512 100644 --- a/src/constants/defaults.js +++ b/src/constants/defaults.js @@ -3,14 +3,14 @@ module.exports = { newline: false, newlineMaximum: false, indentation: false, // 'tabs' or 'spaces' or false - spaces: 4, // amount of spaces when 'indentation' is set to 'spaces' - indentationGuess: false, // guess indentation + spaces: 4, // Amount of spaces when 'indentation' is set to 'spaces' + indentationGuess: false, // Guess indentation trailingspaces: false, trailingspacesToIgnores: false, // ignore trailingspaces in ignored lines - trailingspacesSkipBlanks: false, // skip trailingspaces in blank lines - ignores: false, // pattern or string for lines to ignore - editorconfig: false, // path to editor-config file - rcconfig: false, // path to rc-config file + trailingspacesSkipBlanks: false, // Skip trailingspaces in blank lines + ignores: false, // Pattern or string for lines to ignore + editorconfig: false, // Path to editor-config file + rcconfig: false, // Path to rc-config file allowsBOM: false, endOfLine: false, // 'LF' or 'CRLF' or 'CR' or false to disable checking }; diff --git a/src/constants/messages.js b/src/constants/messages.js index 243fd08..41d4cf5 100644 --- a/src/constants/messages.js +++ b/src/constants/messages.js @@ -29,8 +29,8 @@ module.exports = { INDENTATION_GUESS: { type: TYPES.HINT, code: 'NEWLINE_GUESS', - message: 'The indentation in this line seems to be incorrect. ' + - 'The expected indention is {a}, but {b} was found.', + message: 'The indentation in this line seems to be incorrect. ' + + 'The expected indention is {a}, but {b} was found.', }, TRAILINGSPACES: { code: 'TRAILINGSPACES', @@ -50,8 +50,8 @@ module.exports = { NEWLINE_MAXIMUM: { code: 'NEWLINE_MAXIMUM', type: TYPES.WARNING, - message: 'Maximum amount of newlines exceeded. Found {a} newlines, ' + - 'expected maximum is {b}.', + message: 'Maximum amount of newlines exceeded. Found {a} newlines, ' + + 'expected maximum is {b}.', }, NEWLINE_MAXIMUM_INVALIDVALUE: { type: TYPES.WARNING,