From 51455e3c21c06a8ff0244b112735e15d816a9c5d Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Tue, 16 Apr 2024 22:29:31 -0400 Subject: [PATCH] Update --- dist/package.json | 16 +- dist/prettier.d.ts | 13 ++ dist/types.d.ts | 22 ++ package.json | 23 +- patch/eslint-plugin-n.patch | 111 +-------- patch/eslint-plugin-react.patch | 8 +- pnpm-lock.yaml | 324 +++++++++++++++------------ scripts/build.ts | 22 +- scripts/pull.sh | 11 +- src/commits.json | 38 ++++ src/index.ts | 2 +- src/local/index.ts | 5 +- src/{types.d.ts => modules.d.ts} | 15 ++ src/prettier.ts | 37 +++ src/redirect.ts | 15 +- src/rules/no-empty-object-literal.ts | 25 +-- src/types.ts | 26 +++ 17 files changed, 410 insertions(+), 303 deletions(-) create mode 100644 dist/prettier.d.ts create mode 100644 dist/types.d.ts create mode 100644 src/commits.json rename src/{types.d.ts => modules.d.ts} (68%) create mode 100644 src/prettier.ts create mode 100644 src/types.ts diff --git a/dist/package.json b/dist/package.json index 635f464..b166ac0 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,18 +1,18 @@ { "name": "@aet/eslint-rules", - "version": "0.0.21", + "version": "0.0.23", "license": "UNLICENSED", "peerDependencies": { - "eslint": "^9.0.0", + "eslint": "^8.57.0", "typescript": "^5.4.4" }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/eslint": "^8.56.7", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", - "@typescript-eslint/type-utils": "^7.5.0", - "@typescript-eslint/utils": "^7.5.0", + "@types/eslint": "^8.56.9", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", + "@typescript-eslint/type-utils": "^7.7.0", + "@typescript-eslint/utils": "^7.7.0", "aria-query": "^5.3.0", "axe-core": "^4.9.0", "axobject-query": "^4.0.0", @@ -55,4 +55,4 @@ "supports-preserve-symlinks-flag": "file:./overrides/supports-preserve-symlinks-flag" } } -} \ No newline at end of file +} diff --git a/dist/prettier.d.ts b/dist/prettier.d.ts new file mode 100644 index 0000000..d8fe1af --- /dev/null +++ b/dist/prettier.d.ts @@ -0,0 +1,13 @@ +// Generated by dts-bundle-generator v9.3.1 + +import { Config } from 'prettier'; + +declare function defineConfig({ tailwind, ...config }: Partial & { + tailwind?: boolean; +}): Config; + +export { + defineConfig as default, +}; + +export {}; diff --git a/dist/types.d.ts b/dist/types.d.ts new file mode 100644 index 0000000..a3eb703 --- /dev/null +++ b/dist/types.d.ts @@ -0,0 +1,22 @@ +// Generated by dts-bundle-generator v9.3.1 + +import { ESLintUtils } from '@typescript-eslint/utils'; +import { Rule } from 'eslint'; + +export declare function defineRules(rules: { + [ruleName: string]: Rule.RuleModule | ESLintUtils.RuleModule; +}): { + [ruleName: string]: + | Rule.RuleModule + | ESLintUtils.RuleModule; +}; +export declare function defineRule({ + name, + create, + ...meta +}: Rule.RuleMetaData & { + name?: string; + create: (context: Rule.RuleContext) => Rule.RuleListener; +}): Rule.RuleModule; + +export {}; diff --git a/package.json b/package.json index 862a3be..c8e67e0 100644 --- a/package.json +++ b/package.json @@ -11,22 +11,22 @@ "@babel/preset-env": "^7.24.4", "@types/babel-plugin-macros": "^3.1.3", "@types/babel__core": "^7.20.5", - "@types/eslint": "^8.56.7", + "@types/eslint": "^8.56.9", "@types/estree": "^1.0.5", "@types/estree-jsx": "^1.0.5", "@types/lodash": "^4.17.0", - "@types/node": "^20.12.5", - "@typescript-eslint/eslint-plugin": "7.5.0", - "@typescript-eslint/type-utils": "^7.5.0", - "@typescript-eslint/types": "^7.5.0", - "@typescript-eslint/typescript-estree": "^7.5.0", - "@typescript-eslint/utils": "^7.5.0", + "@types/node": "^20.12.7", + "@typescript-eslint/eslint-plugin": "7.7.0", + "@typescript-eslint/type-utils": "^7.7.0", + "@typescript-eslint/types": "^7.7.0", + "@typescript-eslint/typescript-estree": "^7.7.0", + "@typescript-eslint/utils": "^7.7.0", "babel-plugin-macros": "^3.1.0", - "dts-bundle-generator": "^9.3.1", + "dts-bundle-generator": "^9.4.0", "esbin": "0.0.4", "esbuild": "0.20.2", "esbuild-plugin-alias": "^0.2.1", - "eslint": "9.0.0", + "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^1.24.1", "fast-glob": "^3.3.2", @@ -38,7 +38,7 @@ "picocolors": "^1.0.0", "prettier": "^3.2.5", "prop-types": "^15.8.1", - "typescript": "^5.4.4" + "typescript": "^5.4.5" }, "prettier": { "arrowParens": "avoid", @@ -57,7 +57,8 @@ "isarray": "npm:@nolyfill/isarray@latest", "jsonify": "npm:@nolyfill/jsonify@latest", "object-keys": "npm:@nolyfill/object-keys@latest", - "set-function-length": "npm:@nolyfill/set-function-length@latest" + "set-function-length": "npm:@nolyfill/set-function-length@latest", + "@babel/types": "7.24.0" } } } diff --git a/patch/eslint-plugin-n.patch b/patch/eslint-plugin-n.patch index 40d3443..fe146da 100644 --- a/patch/eslint-plugin-n.patch +++ b/patch/eslint-plugin-n.patch @@ -1,5 +1,5 @@ diff --git a/lib/index.js b/lib/index.js -index 39331a6..4c3a27d 100644 +index 49fd4c7..a0fdd81 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,9 +1,9 @@ @@ -14,111 +14,16 @@ index 39331a6..4c3a27d 100644 +import cjsConfig from "./configs/recommended-script" +import recommendedConfig from "./configs/recommended" - const rules = { - "callback-return": require("./rules/callback-return"), -@@ -52,8 +52,8 @@ const rules = { - - const mod = { + /** + * @typedef {{ +@@ -20,8 +20,8 @@ const recommendedConfig = require("./configs/recommended") + /** @type {import('eslint').ESLint.Plugin & { configs: Configs }} */ + const plugin = { meta: { - name: pkg.name, - version: pkg.version, + name, + version, }, - rules, - } -diff --git a/tests/fixtures/no-extraneous/dependencies/node_modules/@bbb/aaa.js b/tests/fixtures/no-extraneous/dependencies/node_modules/@bbb/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/dependencies/node_modules/aaa.js b/tests/fixtures/no-extraneous/dependencies/node_modules/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/dependencies/node_modules/bbb/index.js b/tests/fixtures/no-extraneous/dependencies/node_modules/bbb/index.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/dependencies/node_modules/bbb/package.json b/tests/fixtures/no-extraneous/dependencies/node_modules/bbb/package.json -deleted file mode 100644 -index b7d25e2..0000000 ---- a/tests/fixtures/no-extraneous/dependencies/node_modules/bbb/package.json -+++ /dev/null -@@ -1,4 +0,0 @@ --{ -- "name": "bbb", -- "main": "index.js" --} -\ No newline at end of file -diff --git a/tests/fixtures/no-extraneous/devDependencies/node_modules/@bbb/aaa.js b/tests/fixtures/no-extraneous/devDependencies/node_modules/@bbb/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/devDependencies/node_modules/aaa.js b/tests/fixtures/no-extraneous/devDependencies/node_modules/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/devDependencies/node_modules/bbb/index.js b/tests/fixtures/no-extraneous/devDependencies/node_modules/bbb/index.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/devDependencies/node_modules/bbb/package.json b/tests/fixtures/no-extraneous/devDependencies/node_modules/bbb/package.json -deleted file mode 100644 -index b7d25e2..0000000 ---- a/tests/fixtures/no-extraneous/devDependencies/node_modules/bbb/package.json -+++ /dev/null -@@ -1,4 +0,0 @@ --{ -- "name": "bbb", -- "main": "index.js" --} -\ No newline at end of file -diff --git a/tests/fixtures/no-extraneous/noDependencies/node_modules/@bbb/aaa.js b/tests/fixtures/no-extraneous/noDependencies/node_modules/@bbb/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/noDependencies/node_modules/aaa.js b/tests/fixtures/no-extraneous/noDependencies/node_modules/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/noDependencies/node_modules/bbb.js b/tests/fixtures/no-extraneous/noDependencies/node_modules/bbb.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/optionalDependencies/node_modules/@bbb/aaa.js b/tests/fixtures/no-extraneous/optionalDependencies/node_modules/@bbb/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/optionalDependencies/node_modules/aaa.js b/tests/fixtures/no-extraneous/optionalDependencies/node_modules/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/optionalDependencies/node_modules/bbb/index.js b/tests/fixtures/no-extraneous/optionalDependencies/node_modules/bbb/index.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/optionalDependencies/node_modules/bbb/package.json b/tests/fixtures/no-extraneous/optionalDependencies/node_modules/bbb/package.json -deleted file mode 100644 -index b7d25e2..0000000 ---- a/tests/fixtures/no-extraneous/optionalDependencies/node_modules/bbb/package.json -+++ /dev/null -@@ -1,4 +0,0 @@ --{ -- "name": "bbb", -- "main": "index.js" --} -\ No newline at end of file -diff --git a/tests/fixtures/no-extraneous/peerDependencies/node_modules/@bbb/aaa.js b/tests/fixtures/no-extraneous/peerDependencies/node_modules/@bbb/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/peerDependencies/node_modules/aaa.js b/tests/fixtures/no-extraneous/peerDependencies/node_modules/aaa.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/peerDependencies/node_modules/bbb/index.js b/tests/fixtures/no-extraneous/peerDependencies/node_modules/bbb/index.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-extraneous/peerDependencies/node_modules/bbb/package.json b/tests/fixtures/no-extraneous/peerDependencies/node_modules/bbb/package.json -deleted file mode 100644 -index b7d25e2..0000000 ---- a/tests/fixtures/no-extraneous/peerDependencies/node_modules/bbb/package.json -+++ /dev/null -@@ -1,4 +0,0 @@ --{ -- "name": "bbb", -- "main": "index.js" --} -\ No newline at end of file -diff --git a/tests/fixtures/no-hide-core-modules/indirect-thirdparty/node_modules/util/index.js b/tests/fixtures/no-hide-core-modules/indirect-thirdparty/node_modules/util/index.js -deleted file mode 100644 -index e69de29..0000000 -diff --git a/tests/fixtures/no-hide-core-modules/thirdparty/node_modules/util/index.js b/tests/fixtures/no-hide-core-modules/thirdparty/node_modules/util/index.js -deleted file mode 100644 -index e69de29..0000000 + rules: /** @type {Record} */ ({ + "callback-return": require("./rules/callback-return"), diff --git a/patch/eslint-plugin-react.patch b/patch/eslint-plugin-react.patch index a4f36db..6f6109d 100644 --- a/patch/eslint-plugin-react.patch +++ b/patch/eslint-plugin-react.patch @@ -171,7 +171,7 @@ index 38b4dd8b..d0575572 100644 const variableUtil = require('../util/variable'); const testReactVersion = require('../util/version').testReactVersion; diff --git a/lib/rules/jsx-key.js b/lib/rules/jsx-key.js -index c13a00cf..fb457e63 100644 +index 7ea874d0..48df0dba 100644 --- a/lib/rules/jsx-key.js +++ b/lib/rules/jsx-key.js @@ -5,8 +5,7 @@ @@ -198,7 +198,7 @@ index 17e56e2e..cb6dec1a 100644 const jsxUtil = require('../util/jsx'); const report = require('../util/report'); diff --git a/lib/rules/jsx-pascal-case.js b/lib/rules/jsx-pascal-case.js -index a1bb4811..db051356 100644 +index efeef403..33df4653 100644 --- a/lib/rules/jsx-pascal-case.js +++ b/lib/rules/jsx-pascal-case.js @@ -5,7 +5,7 @@ @@ -211,7 +211,7 @@ index a1bb4811..db051356 100644 const docsUrl = require('../util/docsUrl'); const jsxUtil = require('../util/jsx'); diff --git a/lib/rules/jsx-sort-props.js b/lib/rules/jsx-sort-props.js -index 6d19f201..4b1849cc 100644 +index 3ca1724e..faf58f91 100644 --- a/lib/rules/jsx-sort-props.js +++ b/lib/rules/jsx-sort-props.js @@ -5,7 +5,7 @@ @@ -224,7 +224,7 @@ index 6d19f201..4b1849cc 100644 const toSorted = require('array.prototype.tosorted'); diff --git a/lib/rules/no-namespace.js b/lib/rules/no-namespace.js -index 64bbc8d5..b5e9c803 100644 +index d7559f5e..fbfad23a 100644 --- a/lib/rules/no-namespace.js +++ b/lib/rules/no-namespace.js @@ -5,7 +5,7 @@ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3853d2e..25c4cf3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,7 @@ overrides: jsonify: npm:@nolyfill/jsonify@latest object-keys: npm:@nolyfill/object-keys@latest set-function-length: npm:@nolyfill/set-function-length@latest + '@babel/types': 7.24.0 devDependencies: '@babel/core': @@ -31,8 +32,8 @@ devDependencies: specifier: ^7.20.5 version: 7.20.5 '@types/eslint': - specifier: ^8.56.7 - version: 8.56.7 + specifier: ^8.56.9 + version: 8.56.9 '@types/estree': specifier: ^1.0.5 version: 1.0.5 @@ -43,29 +44,29 @@ devDependencies: specifier: ^4.17.0 version: 4.17.0 '@types/node': - specifier: ^20.12.5 - version: 20.12.5 + specifier: ^20.12.7 + version: 20.12.7 '@typescript-eslint/eslint-plugin': - specifier: 7.5.0 - version: 7.5.0(@typescript-eslint/parser@7.0.2)(eslint@9.0.0)(typescript@5.4.4) + specifier: 7.7.0 + version: 7.7.0(@typescript-eslint/parser@7.0.2)(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/type-utils': - specifier: ^7.5.0 - version: 7.5.0(eslint@9.0.0)(typescript@5.4.4) + specifier: ^7.7.0 + version: 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/types': - specifier: ^7.5.0 - version: 7.5.0 + specifier: ^7.7.0 + version: 7.7.0 '@typescript-eslint/typescript-estree': - specifier: ^7.5.0 - version: 7.5.0(typescript@5.4.4) + specifier: ^7.7.0 + version: 7.7.0(typescript@5.4.5) '@typescript-eslint/utils': - specifier: ^7.5.0 - version: 7.5.0(eslint@9.0.0)(typescript@5.4.4) + specifier: ^7.7.0 + version: 7.7.0(eslint@8.57.0)(typescript@5.4.5) babel-plugin-macros: specifier: ^3.1.0 version: 3.1.0 dts-bundle-generator: - specifier: ^9.3.1 - version: 9.3.1 + specifier: ^9.4.0 + version: 9.4.0 esbin: specifier: 0.0.4 version: 0.0.4(esbuild@0.20.2) @@ -76,11 +77,11 @@ devDependencies: specifier: ^0.2.1 version: 0.2.1 eslint: - specifier: 9.0.0 - version: 9.0.0 + specifier: 8.57.0 + version: 8.57.0 eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.0.0) + version: 9.1.0(eslint@8.57.0) eslint-define-config: specifier: ^1.24.1 version: 1.24.1 @@ -112,8 +113,8 @@ devDependencies: specifier: ^15.8.1 version: 15.8.1 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 packages: @@ -1375,15 +1376,6 @@ packages: - supports-color dev: true - /@babel/types@7.23.5: - resolution: {integrity: sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - dev: true - /@babel/types@7.24.0: resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} @@ -1600,13 +1592,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@9.0.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 9.0.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1615,14 +1607,14 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@3.0.2: - resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 10.0.1 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1632,13 +1624,13 @@ packages: - supports-color dev: true - /@eslint/js@9.0.0: - resolution: {integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /@eslint/js@8.57.0: + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.12.3: - resolution: {integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -1764,7 +1756,7 @@ packages: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: '@babel/parser': 7.23.5 - '@babel/types': 7.23.5 + '@babel/types': 7.24.0 '@types/babel__generator': 7.6.7 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.4 @@ -1789,8 +1781,8 @@ packages: '@babel/types': 7.24.0 dev: true - /@types/eslint@8.56.7: - resolution: {integrity: sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==} + /@types/eslint@8.56.9: + resolution: {integrity: sha512-W4W3KcqzjJ0sHg2vAq9vfml6OhsJ53TcUjUqfzzZf/EChUtwspszj/S0pzMxnfRcO55/iGq47dscXw71Fxc4Zg==} dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -1814,8 +1806,8 @@ packages: resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} dev: true - /@types/node@20.12.5: - resolution: {integrity: sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} dependencies: undici-types: 5.26.5 dev: true @@ -1824,12 +1816,12 @@ packages: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} dev: true - /@types/semver@7.5.6: - resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} + /@types/semver@7.5.8: + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true - /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.0.2)(eslint@9.0.0)(typescript@5.4.4): - resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} + /@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.0.2)(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1840,24 +1832,24 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.0.2(eslint@9.0.0)(typescript@5.4.4) - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/type-utils': 7.5.0(eslint@9.0.0)(typescript@5.4.4) - '@typescript-eslint/utils': 7.5.0(eslint@9.0.0)(typescript@5.4.4) - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/parser': 7.0.2(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.7.0 + '@typescript-eslint/type-utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.7.0 debug: 4.3.4 - eslint: 9.0.0 + eslint: 8.57.0 graphemer: 1.4.0 - ignore: 5.3.0 + ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.4.4) - typescript: 5.4.4 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@7.0.2(eslint@9.0.0)(typescript@5.4.4): + /@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1869,11 +1861,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 7.0.2 '@typescript-eslint/types': 7.0.2 - '@typescript-eslint/typescript-estree': 7.0.2(typescript@5.4.4) + '@typescript-eslint/typescript-estree': 7.0.2(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.0.2 debug: 4.3.4 - eslint: 9.0.0 - typescript: 5.4.4 + eslint: 8.57.0 + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true @@ -1886,16 +1878,16 @@ packages: '@typescript-eslint/visitor-keys': 7.0.2 dev: true - /@typescript-eslint/scope-manager@7.5.0: - resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} + /@typescript-eslint/scope-manager@7.7.0: + resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/visitor-keys': 7.7.0 dev: true - /@typescript-eslint/type-utils@7.5.0(eslint@9.0.0)(typescript@5.4.4): - resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} + /@typescript-eslint/type-utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1904,12 +1896,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) - '@typescript-eslint/utils': 7.5.0(eslint@9.0.0)(typescript@5.4.4) + '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.4 - eslint: 9.0.0 - ts-api-utils: 1.0.3(typescript@5.4.4) - typescript: 5.4.4 + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true @@ -1919,12 +1911,12 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/types@7.5.0: - resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} + /@typescript-eslint/types@7.7.0: + resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.0.2(typescript@5.4.4): + /@typescript-eslint/typescript-estree@7.0.2(typescript@5.4.5): resolution: {integrity: sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1939,15 +1931,15 @@ packages: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.4.4) - typescript: 5.4.4 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.4): - resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} + /@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5): + resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1955,33 +1947,33 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/visitor-keys': 7.7.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.4.4) - typescript: 5.4.4 + minimatch: 9.0.4 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.5.0(eslint@9.0.0)(typescript@5.4.4): - resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} + /@typescript-eslint/utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 - '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) - eslint: 9.0.0 - semver: 7.5.4 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.7.0 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) + eslint: 8.57.0 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -1995,14 +1987,18 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@7.5.0: - resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} + /@typescript-eslint/visitor-keys@7.7.0: + resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/types': 7.7.0 eslint-visitor-keys: 3.4.3 dev: true + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + /@yarnpkg/lockfile@1.1.0: resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} dev: true @@ -2273,12 +2269,19 @@ packages: path-type: 4.0.0 dev: true - /dts-bundle-generator@9.3.1: - resolution: {integrity: sha512-1/nMT7LFOkXbrL1ZvLpzrjNbfX090LZ64nLIXVmet557mshFCGP/oTiQiZenafJZ6GsmRQLTYKSlQnkxK8tsTw==} + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /dts-bundle-generator@9.4.0: + resolution: {integrity: sha512-XncfIDd3QMZLAQcXqHUd1GrNHFzPSSwJBVmsY7cyrSIgY2K+vr46Nrjw5x9jmvxivR7YNFUWrPMLn8OD0OEwAg==} engines: {node: '>=14.0.0'} hasBin: true dependencies: - typescript: 5.4.4 + typescript: 5.4.5 yargs: 17.7.2 dev: true @@ -2360,13 +2363,13 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier@9.1.0(eslint@9.0.0): + /eslint-config-prettier@9.1.0(eslint@8.57.0): resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 9.0.0 + eslint: 8.57.0 dev: true /eslint-define-config@1.24.1: @@ -2374,9 +2377,9 @@ packages: engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'} dev: true - /eslint-scope@8.0.1: - resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -2387,42 +2390,41 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dev: true - - /eslint@9.0.0: - resolution: {integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 3.0.2 - '@eslint/js': 9.0.0 - '@humanwhocodes/config-array': 0.12.3 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.1 - eslint-visitor-keys: 4.0.0 - espree: 10.0.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 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 @@ -2435,13 +2437,13 @@ packages: - supports-color dev: true - /espree@10.0.1: - resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 dev: true /esquery@1.5.0: @@ -2497,11 +2499,11 @@ packages: reusify: 1.0.4 dev: true - /file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 dev: true /fill-range@7.0.1: @@ -2541,12 +2543,13 @@ packages: micromatch: 4.0.5 dev: true - /flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} dependencies: flatted: 3.2.9 keyv: 4.5.4 + rimraf: 3.0.2 dev: true /flatted@3.2.9: @@ -2616,9 +2619,11 @@ packages: engines: {node: '>=4'} dev: true - /globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 dev: true /globby@11.1.0: @@ -2628,7 +2633,7 @@ packages: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.0 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -2656,6 +2661,11 @@ packages: engines: {node: '>= 4'} dev: true + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3179,6 +3189,13 @@ packages: glob: 7.2.3 dev: true + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -3198,6 +3215,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3292,13 +3317,13 @@ packages: resolution: {integrity: sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==} dev: true - /ts-api-utils@1.0.3(typescript@5.4.4): - resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} - engines: {node: '>=16.13.0'} + /ts-api-utils@1.3.0(typescript@5.4.5): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.4 + typescript: 5.4.5 dev: true /tsconfig-paths@4.2.0: @@ -3317,8 +3342,13 @@ packages: prelude-ls: 1.2.1 dev: true - /typescript@5.4.4: - resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/scripts/build.ts b/scripts/build.ts index 221380f..94562f8 100755 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -316,23 +316,29 @@ async function useText(path: string) { return [state, setState] as const; } -async function main() { - console.log('Building local rules...'); - await buildLocalRules(); - - console.log('Building type definitions...'); +function bundleType(source: string, output: string) { execSync( [ 'npx', 'dts-bundle-generator', - '"./src/index.ts"', + JSON.stringify(source), '-o', - '"./dist/index.d.ts"', + JSON.stringify(output), '--project', '"./tsconfig.build.json"', '--no-check', ].join(' '), ); +} + +async function main() { + console.log('Building local rules...'); + await buildLocalRules(); + + console.log('Building type definitions...'); + bundleType('./src/index.ts', './dist/index.d.ts'); + bundleType('./src/prettier.ts', './dist/prettier.d.ts'); + bundleType('./src/types.ts', './dist/types.d.ts'); console.log('Building packages...'); await Promise.all([ @@ -345,6 +351,8 @@ async function main() { bundle('./src/rules/index.ts', './dist/eslint-plugin-rules/index.js'), bundle('./src/local/index.ts', './dist/eslint-plugin-local/index.js'), bundle('./src/index.ts', './dist/index.js'), + bundle('./src/types.ts', './dist/types.js'), + bundle('./src/prettier.ts', './dist/prettier.js'), editPackageJson(), ]); diff --git a/scripts/pull.sh b/scripts/pull.sh index 6403731..7798a5e 100755 --- a/scripts/pull.sh +++ b/scripts/pull.sh @@ -1,13 +1,22 @@ #!/bin/bash set -e +git-pull() { + name=$1 + git config pull.rebase true + git config rebase.autoStash true + git pull --quiet + ref=$(git log -1 --pretty='{"hash":"%H","date":"%aI","committer":"%cn","subject":"%s"}') + yq -iP ".$name=$ref" ../../src/commits.json -o json +} + pull() { echo "🚛 Pulling $2" if [ ! -d "packages/$2" ]; then echo "📦 Repository not found, cloning..." git clone "https://github.com/$1/$2.git" "packages/$2" fi - (cd "packages/$2" && git config pull.rebase true && git config rebase.autoStash true && git pull) + (cd "packages/$2" && git-pull "$2") echo } diff --git a/src/commits.json b/src/commits.json new file mode 100644 index 0000000..4ed007d --- /dev/null +++ b/src/commits.json @@ -0,0 +1,38 @@ +{ + "eslint-plugin-import": { + "hash": "f77ceb679d59ced5d9a633123385470a9eea10d9", + "date": "2024-04-07T12:55:28+12:00", + "committer": "Jordan Harband", + "subject": "[actions] cancel in-progress runs on PR updates" + }, + "eslint-import-resolver-typescript": { + "hash": "7a02ac08b5aaac8c217f0e87142f97eafcc38fbc", + "date": "2024-04-01T01:06:20+00:00", + "committer": "GitHub", + "subject": "chore(deps): update dependency npm-run-all2 to ^5.0.2 (#277)" + }, + "eslint-plugin-jsx-a11y": { + "hash": "0d5321a5457c5f0da0ca216053cc5b4f571b53ae", + "date": "2024-01-27T22:18:19-08:00", + "committer": "Jordan Harband", + "subject": "[Deps] update `@babel/runtime`, `safe-regex-test`" + }, + "eslint-plugin-n": { + "hash": "8d711f5446655c9874aeffb2ef28b3c4d8463fb6", + "date": "2024-04-16T16:08:04+08:00", + "committer": "GitHub", + "subject": "chore: update outdated funding (#246)" + }, + "eslint-plugin-react": { + "hash": "4467db503e38b9356517cf6926d11be544ccf4b1", + "date": "2024-03-16T12:54:58+09:00", + "committer": "Jordan Harband", + "subject": "[Fix] `boolean-prop-naming`: avoid a crash with a non-TSTypeReference type" + }, + "jsx-ast-utils": { + "hash": "5943318eaf23764eec3ff397ebb969613d728a95", + "date": "2023-07-28T18:34:04-07:00", + "committer": "Jordan Harband", + "subject": "v3.3.5" + } +} diff --git a/src/index.ts b/src/index.ts index e6ce77c..79803be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -/// +/// import './redirect'; import fs from 'node:fs'; import type { Rule } from 'eslint'; diff --git a/src/local/index.ts b/src/local/index.ts index 593f654..4feb198 100644 --- a/src/local/index.ts +++ b/src/local/index.ts @@ -30,9 +30,10 @@ const plugin: ESLint.Plugin = { }; for (const file of files) { - const name = basename(file, extname(file)); const module = require(resolve(folders, file)); - plugin.rules![name] = module.default ?? module; + const unwrap = module.default ?? module; + const name = unwrap.name ?? basename(file, extname(file)); + plugin.rules![name] = unwrap; } export = plugin; diff --git a/src/types.d.ts b/src/modules.d.ts similarity index 68% rename from src/types.d.ts rename to src/modules.d.ts index a0d9e88..b2f1126 100644 --- a/src/types.d.ts +++ b/src/modules.d.ts @@ -19,3 +19,18 @@ declare module '@typescript-eslint/scope-manager' { declare module '@typescript-eslint/types' { export * from '@typescript-eslint/types/dist/index'; } + +declare module 'module' { + export function _resolveFilename( + request: string, + parent: { + /** + * Can be null if the parent id is 'internal/preload' (e.g. via --require) + * which doesn't have a file path. + */ + filename: string | null; + }, + isMain: boolean, + options?: Record, + ): string; +} diff --git a/src/prettier.ts b/src/prettier.ts new file mode 100644 index 0000000..c37d348 --- /dev/null +++ b/src/prettier.ts @@ -0,0 +1,37 @@ +import type { Config } from 'prettier'; + +const prettier: Config = { + arrowParens: 'avoid', + tabWidth: 2, + printWidth: 90, + semi: true, + singleQuote: true, + trailingComma: 'all', + plugins: [], +}; + +export default function defineConfig({ + tailwind, + ...config +}: Partial & { + tailwind?: boolean; +}) { + const result: Config = { + ...prettier, + ...config, + }; + + if (tailwind) { + ensureHas(result.plugins!, 'prettier-plugin-tailwindcss'); + result.tailwindAttributes ??= ['css']; + result.tailwindFunctions ??= ['tw']; + } + + return result; +} + +function ensureHas(list: T[], item: T) { + if (!list.includes(item)) { + list.push(item); + } +} diff --git a/src/redirect.ts b/src/redirect.ts index d876730..8a4be09 100644 --- a/src/redirect.ts +++ b/src/redirect.ts @@ -1,7 +1,7 @@ import Module from 'module'; const { name } = [require][0]('./package.json'); -const _resolveFilename = (Module as any)._resolveFilename; +const _resolveFilename = Module._resolveFilename; const alias = new Set([ 'eslint-import-resolver-typescript', 'eslint-plugin-import', @@ -13,9 +13,14 @@ const alias = new Set([ 'eslint-plugin-rules', ]); -(Module as any)._resolveFilename = function (module: string, ...args: any[]) { - if (alias.has(module)) { - module = `${name}/${module}`; +type CDR = T extends [any, ...infer R] ? R : []; + +Module._resolveFilename = function ( + request: string, + ...args: CDR> +) { + if (alias.has(request)) { + request = `${name}/${request}`; } - return _resolveFilename(module, ...args); + return _resolveFilename(request, ...args); }; diff --git a/src/rules/no-empty-object-literal.ts b/src/rules/no-empty-object-literal.ts index f383983..1ec0c4c 100644 --- a/src/rules/no-empty-object-literal.ts +++ b/src/rules/no-empty-object-literal.ts @@ -1,16 +1,15 @@ -import type { Rule } from 'eslint'; +import { defineRule } from '../types'; -const rule: Rule.RuleModule = { - meta: { - type: 'problem', - docs: { - description: - 'Ban assignment of empty object literals `{}` and replace them with `Object.create(null)`', - category: 'Best Practices', - recommended: true, - }, - fixable: 'code', +export default defineRule({ + type: 'problem', + docs: { + description: + 'Ban assignment of empty object literals `{}` and replace them with `Object.create(null)`', + category: 'Best Practices', + recommended: true, }, + fixable: 'code', + create: context => ({ AssignmentExpression(node) { if ( @@ -27,6 +26,4 @@ const rule: Rule.RuleModule = { } }, }), -}; - -export default rule; +}); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..a318eb4 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,26 @@ +import type { Rule } from 'eslint'; +import type { ESLintUtils } from '@typescript-eslint/utils'; + +export function defineRules(rules: { + [ruleName: string]: Rule.RuleModule | ESLintUtils.RuleModule; +}) { + return rules; +} + +export function defineRule({ + name, + create, + ...meta +}: Rule.RuleMetaData & { + name?: string; + create: (context: Rule.RuleContext) => Rule.RuleListener; +}): Rule.RuleModule { + const module: Rule.RuleModule = { + meta, + create, + }; + if (name != null) { + Object.defineProperty(module, 'name', { value: name }); + } + return module; +}