From 2c441dd17ffaafe93ec1ebc8c01fef69167122dc Mon Sep 17 00:00:00 2001 From: barak igal Date: Wed, 13 Dec 2023 12:54:44 +0200 Subject: [PATCH] chore!: convert eslint plugin to esm (#2930) --- .eslintrc | 3 +- package-lock.json | 390 +++++++++--------- package.json | 5 +- packages/core/src/parser.ts | 2 +- .../e2e-test-kit/src/browser-functions.ts | 2 +- packages/eslint-plugin-stylable/package.json | 8 +- packages/eslint-plugin-stylable/src/index.ts | 6 +- .../src/stylable-es-lint.ts | 15 +- .../eslint-plugin-stylable/src/tsconfig.json | 4 +- .../test/stylable-es-lint.spec.ts | 6 +- .../eslint-plugin-stylable/test/tsconfig.json | 2 + pleb.config.mjs | 12 - 12 files changed, 228 insertions(+), 227 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0304e2ca1d..74aed1fcc9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -40,7 +40,8 @@ "@typescript-eslint/restrict-plus-operands": "off", "@typescript-eslint/restrict-template-expressions": "off", "@typescript-eslint/unbound-method": "off", - "@typescript-eslint/no-misused-promises": "off" // ToDo: remove once eslint fix issue. + "@typescript-eslint/no-misused-promises": "off", // ToDo: remove once eslint fix issue. + "@typescript-eslint/no-base-to-string": "off" // this rule is not working properly } }, { diff --git a/package-lock.json b/package-lock.json index 217e806604..16a7bfc1d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,8 +35,9 @@ "@types/react-dom": "^18.2.17", "@types/validate-npm-package-name": "^4.0.2", "@types/yargs": "^17.0.32", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.13.1", + "@typescript-eslint/rule-tester": "^6.13.1", "autoprefixer": "^10.4.16", "c8": "^8.0.1", "chai": "^4.3.10", @@ -854,9 +855,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.8.0.tgz", - "integrity": "sha512-zdTObFRoNENrdPpnTNnhOljYIcOX7aI7+7wyrSpPFFIOf/nRdedE6IYsjaBE7tjukphh1tMTojgJ7p3lKY8x6Q==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.0.tgz", + "integrity": "sha512-+1ge/xmaJpm1KVBuIH38Z94zj9fBD+hp+/5WLaHgyY8XLq1ibxk/zj6dTXaqM2cAbYKq8jYlhHd6k05If1W5xA==", "cpu": [ "arm" ], @@ -866,9 +867,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.8.0.tgz", - "integrity": "sha512-aiItwP48BiGpMFS9Znjo/xCNQVwTQVcRKkFKsO81m8exrGjHkCBDvm9PHay2kpa8RPnZzzKcD1iQ9KaLY4fPQQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.0.tgz", + "integrity": "sha512-im6hUEyQ7ZfoZdNvtwgEJvBWZYauC9KVKq1w58LG2Zfz6zMd8gRrbN+xCVoqA2hv/v6fm9lp5LFGJ3za8EQH3A==", "cpu": [ "arm64" ], @@ -878,9 +879,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.8.0.tgz", - "integrity": "sha512-zhNIS+L4ZYkYQUjIQUR6Zl0RXhbbA0huvNIWjmPc2SL0cB1h5Djkcy+RZ3/Bwszfb6vgwUvcVJYD6e6Zkpsi8g==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.0.tgz", + "integrity": "sha512-u7aTMskN6Dmg1lCT0QJ+tINRt+ntUrvVkhbPfFz4bCwRZvjItx2nJtwJnJRlKMMaQCHRjrNqHRDYvE4mBm3DlQ==", "cpu": [ "arm64" ], @@ -890,9 +891,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.8.0.tgz", - "integrity": "sha512-A/FAHFRNQYrELrb/JHncRWzTTXB2ticiRFztP4ggIUAfa9Up1qfW8aG2w/mN9jNiZ+HB0t0u0jpJgFXG6BfRTA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.0.tgz", + "integrity": "sha512-8FvEl3w2ExmpcOmX5RJD0yqXcVSOqAJJUJ29Lca29Ik+3zPS1yFimr2fr5JSZ4Z5gt8/d7WqycpgkX9nocijSw==", "cpu": [ "x64" ], @@ -902,9 +903,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.8.0.tgz", - "integrity": "sha512-JsidBnh3p2IJJA4/2xOF2puAYqbaczB3elZDT0qHxn362EIoIkq7hrR43Xa8RisgI6/WPfvb2umbGsuvf7E37A==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.0.tgz", + "integrity": "sha512-lHoKYaRwd4gge+IpqJHCY+8Vc3hhdJfU6ukFnnrJasEBUvVlydP8PuwndbWfGkdgSvZhHfSEw6urrlBj0TSSfg==", "cpu": [ "arm" ], @@ -914,9 +915,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.8.0.tgz", - "integrity": "sha512-hBNCnqw3EVCkaPB0Oqd24bv8SklETptQWcJz06kb9OtiShn9jK1VuTgi7o4zPSt6rNGWQOTDEAccbk0OqJmS+g==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.0.tgz", + "integrity": "sha512-JbEPfhndYeWHfOSeh4DOFvNXrj7ls9S/2omijVsao+LBPTPayT1uKcK3dHW3MwDJ7KO11t9m2cVTqXnTKpeaiw==", "cpu": [ "arm64" ], @@ -926,9 +927,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.8.0.tgz", - "integrity": "sha512-Fw9ChYfJPdltvi9ALJ9wzdCdxGw4wtq4t1qY028b2O7GwB5qLNSGtqMsAel1lfWTZvf4b6/+4HKp0GlSYg0ahA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.0.tgz", + "integrity": "sha512-ahqcSXLlcV2XUBM3/f/C6cRoh7NxYA/W7Yzuv4bDU1YscTFw7ay4LmD7l6OS8EMhTNvcrWGkEettL1Bhjf+B+w==", "cpu": [ "arm64" ], @@ -938,9 +939,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.8.0.tgz", - "integrity": "sha512-BH5xIh7tOzS9yBi8dFrCTG8Z6iNIGWGltd3IpTSKp6+pNWWO6qy8eKoRxOtwFbMrid5NZaidLYN6rHh9aB8bEw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.0.tgz", + "integrity": "sha512-uwvOYNtLw8gVtrExKhdFsYHA/kotURUmZYlinH2VcQxNCQJeJXnkmWgw2hI9Xgzhgu7J9QvWiq9TtTVwWMDa+w==", "cpu": [ "riscv64" ], @@ -950,9 +951,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.8.0.tgz", - "integrity": "sha512-PmvAj8k6EuWiyLbkNpd6BLv5XeYFpqWuRvRNRl80xVfpGXK/z6KYXmAgbI4ogz7uFiJxCnYcqyvZVD0dgFog7Q==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.0.tgz", + "integrity": "sha512-m6pkSwcZZD2LCFHZX/zW2aLIISyzWLU3hrLLzQKMI12+OLEzgruTovAxY5sCZJkipklaZqPy/2bEEBNjp+Y7xg==", "cpu": [ "x64" ], @@ -962,9 +963,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.8.0.tgz", - "integrity": "sha512-mdxnlW2QUzXwY+95TuxZ+CurrhgrPAMveDWI97EQlA9bfhR8tw3Pt7SUlc/eSlCNxlWktpmT//EAA8UfCHOyXg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.0.tgz", + "integrity": "sha512-VFAC1RDRSbU3iOF98X42KaVicAfKf0m0OvIu8dbnqhTe26Kh6Ym9JrDulz7Hbk7/9zGc41JkV02g+p3BivOdAg==", "cpu": [ "x64" ], @@ -974,9 +975,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.8.0.tgz", - "integrity": "sha512-ge7saUz38aesM4MA7Cad8CHo0Fyd1+qTaqoIo+Jtk+ipBi4ATSrHWov9/S4u5pbEQmLjgUjB7BJt+MiKG2kzmA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.0.tgz", + "integrity": "sha512-9jPgMvTKXARz4inw6jezMLA2ihDBvgIU9Ml01hjdVpOcMKyxFBJrn83KVQINnbeqDv0+HdO1c09hgZ8N0s820Q==", "cpu": [ "arm64" ], @@ -986,9 +987,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.8.0.tgz", - "integrity": "sha512-p9E3PZlzurhlsN5h9g7zIP1DnqKXJe8ZUkFwAazqSvHuWfihlIISPxG9hCHCoA+dOOspL/c7ty1eeEVFTE0UTw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.0.tgz", + "integrity": "sha512-WE4pT2kTXQN2bAv40Uog0AsV7/s9nT9HBWXAou8+++MBCnY51QS02KYtm6dQxxosKi1VIz/wZIrTQO5UP2EW+Q==", "cpu": [ "ia32" ], @@ -998,9 +999,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.8.0.tgz", - "integrity": "sha512-kb4/auKXkYKqlUYTE8s40FcJIj5soOyRLHKd4ugR0dCq0G2EfcF54eYcfQiGkHzjidZ40daB4ulsFdtqNKZtBg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.0.tgz", + "integrity": "sha512-aPP5Q5AqNGuT0tnuEkK/g4mnt3ZhheiXrDIiSVIHN9mcN21OyXDVbEMqmXPE7e2OplNLDkcvV+ZoGJa2ZImFgw==", "cpu": [ "x64" ], @@ -1358,32 +1359,33 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", + "integrity": "sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/type-utils": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1392,25 +1394,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.14.0.tgz", + "integrity": "sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1418,16 +1421,40 @@ } } }, + "node_modules/@typescript-eslint/rule-tester": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-6.14.0.tgz", + "integrity": "sha512-SCxrm68pudpNTUGCqaGxgqNujca+sEjJXA52gH3b0q1DrVBq1VSlxgO9kSmodhbXKVyS7UGlbz3dPDqa65gR2g==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "ajv": "^6.10.0", + "lodash.merge": "4.6.2", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@eslint/eslintrc": ">=2", + "eslint": ">=8" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.14.0.tgz", + "integrity": "sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1435,25 +1462,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.14.0.tgz", + "integrity": "sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/utils": "6.14.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1462,11 +1489,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1474,20 +1501,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1500,40 +1527,39 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.14.0.tgz", + "integrity": "sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.14.0.tgz", + "integrity": "sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.14.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -3049,29 +3075,6 @@ "link": true }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "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==", @@ -3086,12 +3089,15 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { - "node": ">=4.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { @@ -3121,14 +3127,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -3140,7 +3138,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -3148,14 +3146,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -4865,12 +4855,6 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -5913,9 +5897,9 @@ } }, "node_modules/rollup": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.8.0.tgz", - "integrity": "sha512-NpsklK2fach5CdI+PScmlE5R4Ao/FSWtF7LkoIrHDxPACY/xshNasPsbpG0VVHxUTbf74tJbVT4PrP8JsJ6ZDA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.0.tgz", + "integrity": "sha512-bUHW/9N21z64gw8s6tP4c88P382Bq/L5uZDowHlHx6s/QWpjJXivIAbEw6LZthgSvlEizZBfLC4OAvWe7aoF7A==", "bin": { "rollup": "dist/bin/rollup" }, @@ -5924,19 +5908,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.8.0", - "@rollup/rollup-android-arm64": "4.8.0", - "@rollup/rollup-darwin-arm64": "4.8.0", - "@rollup/rollup-darwin-x64": "4.8.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.8.0", - "@rollup/rollup-linux-arm64-gnu": "4.8.0", - "@rollup/rollup-linux-arm64-musl": "4.8.0", - "@rollup/rollup-linux-riscv64-gnu": "4.8.0", - "@rollup/rollup-linux-x64-gnu": "4.8.0", - "@rollup/rollup-linux-x64-musl": "4.8.0", - "@rollup/rollup-win32-arm64-msvc": "4.8.0", - "@rollup/rollup-win32-ia32-msvc": "4.8.0", - "@rollup/rollup-win32-x64-msvc": "4.8.0", + "@rollup/rollup-android-arm-eabi": "4.9.0", + "@rollup/rollup-android-arm64": "4.9.0", + "@rollup/rollup-darwin-arm64": "4.9.0", + "@rollup/rollup-darwin-x64": "4.9.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.0", + "@rollup/rollup-linux-arm64-gnu": "4.9.0", + "@rollup/rollup-linux-arm64-musl": "4.9.0", + "@rollup/rollup-linux-riscv64-gnu": "4.9.0", + "@rollup/rollup-linux-x64-gnu": "4.9.0", + "@rollup/rollup-linux-x64-musl": "4.9.0", + "@rollup/rollup-win32-arm64-msvc": "4.9.0", + "@rollup/rollup-win32-ia32-msvc": "4.9.0", + "@rollup/rollup-win32-x64-msvc": "4.9.0", "fsevents": "~2.3.2" } }, @@ -6512,6 +6496,17 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-expect": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-expect/-/ts-expect-1.3.0.tgz", @@ -6552,25 +6547,6 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6949,6 +6925,26 @@ "node": ">=10.13.0" } }, + "node_modules/webpack/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webpack/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7282,7 +7278,8 @@ "dependencies": { "@file-services/node": "^8.3.3", "@stylable/core": "^5.16.0", - "@typescript-eslint/utils": "^5.61.0" + "@typescript-eslint/utils": "^6.13.1", + "postcss-safe-parser": "^7.0.0" } }, "packages/experimental-loader": { @@ -7300,7 +7297,8 @@ }, "packages/experimental-loader/node_modules/loader-utils": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", "engines": { "node": ">= 12.13.0" } diff --git a/package.json b/package.json index 6fe04ed27d..e62cb76f70 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,9 @@ "@types/react-dom": "^18.2.17", "@types/validate-npm-package-name": "^4.0.2", "@types/yargs": "^17.0.32", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.13.1", + "@typescript-eslint/rule-tester": "^6.13.1", "autoprefixer": "^10.4.16", "c8": "^8.0.1", "chai": "^4.3.10", diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index ca0ddf763e..3916453cfc 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -3,7 +3,7 @@ import postcssNested from 'postcss-nested'; import postcssJS from 'postcss-js'; import safeParser from 'postcss-safe-parser'; -export type CSSObject = any & object; +export type CSSObject = object; const processor = postcss([postcssNested()]); diff --git a/packages/e2e-test-kit/src/browser-functions.ts b/packages/e2e-test-kit/src/browser-functions.ts index 3c439ca632..4019c6db81 100644 --- a/packages/e2e-test-kit/src/browser-functions.ts +++ b/packages/e2e-test-kit/src/browser-functions.ts @@ -9,7 +9,7 @@ export function filterAssetResponses(responses: Response[], assetNames: string[] function getStyleElementsMetadata({ includeRuntimeId, includeCSSContent, -}: any | { includeCSSContent?: boolean; includeRuntimeId?: boolean } = {}) { +}: void | { includeCSSContent?: boolean; includeRuntimeId?: boolean } = {}) { const styleElements = Array.from(document.head.getElementsByTagName('style')); return styleElements.map((styleEl) => { const data: { id?: string; depth?: string; css?: string; runtime?: string } = { diff --git a/packages/eslint-plugin-stylable/package.json b/packages/eslint-plugin-stylable/package.json index 596dd5af36..bcc2156ef3 100644 --- a/packages/eslint-plugin-stylable/package.json +++ b/packages/eslint-plugin-stylable/package.json @@ -3,13 +3,19 @@ "version": "5.16.0", "description": "eslint plugin for Stylable usages", "main": "dist/index.js", + "type": "module", + "exports": { + ".": "./dist/index.js", + "./rule": "./dist/stylable-es-lint.js" + }, "scripts": { "test": "mocha \"dist/test/**/*.spec.js\" --timeout 5000" }, "dependencies": { "@file-services/node": "^8.3.3", "@stylable/core": "^5.16.0", - "@typescript-eslint/utils": "^5.61.0" + "@typescript-eslint/utils": "^6.13.1", + "postcss-safe-parser": "^7.0.0" }, "keywords": [ "eslint", diff --git a/packages/eslint-plugin-stylable/src/index.ts b/packages/eslint-plugin-stylable/src/index.ts index 2d631393a3..54e0af2a9b 100644 --- a/packages/eslint-plugin-stylable/src/index.ts +++ b/packages/eslint-plugin-stylable/src/index.ts @@ -1,8 +1,8 @@ -import unknownLocals from './stylable-es-lint'; +import unknownLocals from './stylable-es-lint.js'; -export = { +export default { rules: { - 'unknown-locals': unknownLocals, + 'unknown-locals': unknownLocals as unknown, }, configs: { recommended: { diff --git a/packages/eslint-plugin-stylable/src/stylable-es-lint.ts b/packages/eslint-plugin-stylable/src/stylable-es-lint.ts index 2b26635e49..93a7cefd94 100644 --- a/packages/eslint-plugin-stylable/src/stylable-es-lint.ts +++ b/packages/eslint-plugin-stylable/src/stylable-es-lint.ts @@ -1,13 +1,15 @@ -import fs from '@file-services/node'; +import { nodeFs as fs } from '@file-services/node'; import path from 'path'; import { Stylable, StylableMeta, createDefaultResolver } from '@stylable/core'; -import { safeParse, StylableExports } from '@stylable/core/dist/index-internal'; +import safeParser from 'postcss-safe-parser'; import { ESLintUtils, AST_NODE_TYPES, ASTUtils, TSESTree as esTree, } from '@typescript-eslint/utils'; +import { createRequire } from 'node:module'; +import { pathToFileURL } from 'node:url'; const { isIdentifier } = ASTUtils; @@ -28,8 +30,8 @@ export default createRule({ fileSystem: fs, projectRoot: process.cwd(), resolveModule: moduleResolver, - requireModule: require, - cssParser: safeParse, + requireModule: createRequire(pathToFileURL(process.cwd())), + cssParser: safeParser, }); function reportDiagnostics(meta: StylableMeta, node: esTree.ImportDeclaration) { @@ -68,7 +70,7 @@ export default createRule({ ) as esTree.ImportSpecifier[]; namedImports.forEach(({ imported, local }) => { - const exportName = imported.name as keyof StylableExports; + const exportName = imported.name as keyof typeof exports; if (exportName in exports) { const variable = context.getScope().variables.find((varDefs) => { @@ -127,7 +129,7 @@ export default createRule({ ], docs: { description: '', - recommended: 'error', + recommended: 'recommended', }, }, }); @@ -141,6 +143,7 @@ function getStylableRequest(importStatement: esTree.ImportDeclaration) { } function getMemberAccessor( + // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents property: esTree.PrivateIdentifier | esTree.Expression, isComputed: boolean ) { diff --git a/packages/eslint-plugin-stylable/src/tsconfig.json b/packages/eslint-plugin-stylable/src/tsconfig.json index 523ba2e029..695d08826c 100644 --- a/packages/eslint-plugin-stylable/src/tsconfig.json +++ b/packages/eslint-plugin-stylable/src/tsconfig.json @@ -1,7 +1,9 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "../dist" + "outDir": "../dist", + "module": "Node16" /* Specify what module code is generated. */, + "moduleResolution": "Node16" }, "references": [{ "path": "../../core/src" }] } diff --git a/packages/eslint-plugin-stylable/test/stylable-es-lint.spec.ts b/packages/eslint-plugin-stylable/test/stylable-es-lint.spec.ts index ba48df3212..c629e50e21 100644 --- a/packages/eslint-plugin-stylable/test/stylable-es-lint.spec.ts +++ b/packages/eslint-plugin-stylable/test/stylable-es-lint.spec.ts @@ -1,13 +1,13 @@ import path from 'path'; import fs from 'fs'; -import { ESLintUtils } from '@typescript-eslint/utils'; -import StylableLint from 'eslint-plugin-stylable/dist/stylable-es-lint'; +import { RuleTester } from '@typescript-eslint/rule-tester'; +import StylableLint from 'eslint-plugin-stylable/rule'; import { createTempDirectorySync } from '@stylable/e2e-test-kit'; // mock afterAll for RuleTester (should be fixed in next version) (globalThis as any).afterAll = (globalThis as any).after; -const tester = new ESLintUtils.RuleTester({ +const tester = new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { sourceType: 'module', diff --git a/packages/eslint-plugin-stylable/test/tsconfig.json b/packages/eslint-plugin-stylable/test/tsconfig.json index c34400be61..883a5ae670 100644 --- a/packages/eslint-plugin-stylable/test/tsconfig.json +++ b/packages/eslint-plugin-stylable/test/tsconfig.json @@ -2,6 +2,8 @@ "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "../dist/test", + "module": "Node16" /* Specify what module code is generated. */, + "moduleResolution": "Node16", "types": ["node", "externals", "mocha"] }, "references": [{ "path": "../src" }, { "path": "../../e2e-test-kit/src" }] diff --git a/pleb.config.mjs b/pleb.config.mjs index 2d9ddbe76d..05678e5ea4 100644 --- a/pleb.config.mjs +++ b/pleb.config.mjs @@ -1,17 +1,5 @@ export default { pinnedPackages: [ - { - name: '@typescript-eslint/eslint-plugin', - reason: 'drop node 14 and type issues with ESLintUtils.RuleCreator', - }, - { - name: '@typescript-eslint/parser', - reason: 'drop node 14 and type issues with ESLintUtils.RuleCreator', - }, - { - name: '@typescript-eslint/utils', - reason: 'drop node 14 and type issues with ESLintUtils.RuleCreator', - }, { name: 'flat', reason: 'esm only',