From bac15154278524503e729f18e1edd70806fc2be1 Mon Sep 17 00:00:00 2001 From: Kevin Barabash Date: Mon, 9 Dec 2024 11:32:22 -0500 Subject: [PATCH 1/3] Fix eslint-plugin-khan tests so that they can be run using jest --- config/jest/test-setup.js | 9 +- config/jest/test.config.js | 1 - packages/eslint-plugin-khan/package.json | 4 +- .../test/rules/array-type-style.test.ts | 26 ++- .../rules/jest-async-use-real-timers.test.ts | 19 +- .../rules/jest-await-async-matchers.test.ts | 27 ++- .../test/rules/jest-enzyme-matchers.test.js | 20 +- .../test/rules/no-one-tuple.test.ts | 26 ++- .../react-no-method-jsx-attribute.test.ts | 21 +- ...eact-no-subscriptions-before-mount.test.ts | 19 +- .../rules/react-svg-path-precision.test.ts | 21 +- .../test/rules/sync-tag.test.ts | 26 +-- .../rules/ts-no-error-suppressions.test.ts | 21 +- yarn.lock | 208 ++++-------------- 14 files changed, 195 insertions(+), 253 deletions(-) diff --git a/config/jest/test-setup.js b/config/jest/test-setup.js index 421d4db5..5033bd79 100644 --- a/config/jest/test-setup.js +++ b/config/jest/test-setup.js @@ -1 +1,8 @@ -// No setup to perform +// Adapted from https://typescript-eslint.io/packages/rule-tester/#vitest +import {afterAll, it, describe} from "@jest/globals"; +import {RuleTester} from "@typescript-eslint/rule-tester"; + +RuleTester.afterAll = afterAll; +RuleTester.describe = describe; +RuleTester.it = it; +RuleTester.itOnly = it.only; diff --git a/config/jest/test.config.js b/config/jest/test.config.js index 533bf8e6..8be452f4 100644 --- a/config/jest/test.config.js +++ b/config/jest/test.config.js @@ -14,7 +14,6 @@ module.exports = { resetMocks: true, testEnvironment: "jest-environment-node", testMatch: ["/**/*.test.ts"], - testPathIgnorePatterns: ["/eslint-plugin-khan/"], setupFilesAfterEnv: [ "jest-extended/all", "/config/jest/test-setup.js", diff --git a/packages/eslint-plugin-khan/package.json b/packages/eslint-plugin-khan/package.json index 516fe444..f950423f 100644 --- a/packages/eslint-plugin-khan/package.json +++ b/packages/eslint-plugin-khan/package.json @@ -21,13 +21,11 @@ "@swc-node/register": "^1.6.8", "@swc/core": "^1.3.93", "eslint": "^8.52.0", - "mocha": "^10.2.0", "prettier": "^2.8.8", "pretty-quick": "^3.1.3" }, "scripts": { - "prettier": "prettier --write '{lib,test}/**/*.{js,ts}'", - "test": "mocha" + "prettier": "prettier --write '{lib,test}/**/*.{js,ts}'" }, "dependencies": { "@babel/types": "^7.23.0", diff --git a/packages/eslint-plugin-khan/test/rules/array-type-style.test.ts b/packages/eslint-plugin-khan/test/rules/array-type-style.test.ts index ba4c710a..c6b9babc 100644 --- a/packages/eslint-plugin-khan/test/rules/array-type-style.test.ts +++ b/packages/eslint-plugin-khan/test/rules/array-type-style.test.ts @@ -1,12 +1,19 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: {}, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, }, }); @@ -30,9 +37,10 @@ ruleTester.run(ruleName, rule, { // Two errors are reported because there are two array types, // they just happen to be nested. errors: [{messageId: "errorString"}, {messageId: "errorString"}], - // This is a partial fix. Multiple runs of eslint --fix are needed - // to fix nested (in the AST) array types completely. - output: "type foo = { bar: Array[] }", + output: [ + "type foo = { bar: Array[] }", + "type foo = { bar: Array> }", + ], }, ], }); diff --git a/packages/eslint-plugin-khan/test/rules/jest-async-use-real-timers.test.ts b/packages/eslint-plugin-khan/test/rules/jest-async-use-real-timers.test.ts index 10827de5..f347243c 100644 --- a/packages/eslint-plugin-khan/test/rules/jest-async-use-real-timers.test.ts +++ b/packages/eslint-plugin-khan/test/rules/jest-async-use-real-timers.test.ts @@ -1,12 +1,19 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: {}, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, }, }); diff --git a/packages/eslint-plugin-khan/test/rules/jest-await-async-matchers.test.ts b/packages/eslint-plugin-khan/test/rules/jest-await-async-matchers.test.ts index c7a3bc3e..ef62ee8a 100644 --- a/packages/eslint-plugin-khan/test/rules/jest-await-async-matchers.test.ts +++ b/packages/eslint-plugin-khan/test/rules/jest-await-async-matchers.test.ts @@ -1,12 +1,19 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: {}, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, }, }); @@ -85,14 +92,6 @@ ruleTester.run("jest-await-async-matchers", rule, { ], output: 'await expect(promise).rejects.not.toThrow(new Error("foo"));', }, - { - code: `expect(promise).resolves.not.toBe(true);`, - - errors: [ - {messageId: "asyncMatchers", data: {matchers: ["resolves"]}}, - ], - output: "await expect(promise).resolves.not.toBe(true);", - }, { code: `expect(promise).toResolve();`, diff --git a/packages/eslint-plugin-khan/test/rules/jest-enzyme-matchers.test.js b/packages/eslint-plugin-khan/test/rules/jest-enzyme-matchers.test.js index a750c7c2..e082404b 100644 --- a/packages/eslint-plugin-khan/test/rules/jest-enzyme-matchers.test.js +++ b/packages/eslint-plugin-khan/test/rules/jest-enzyme-matchers.test.js @@ -1,12 +1,22 @@ -import {RuleTester} from "eslint"; +import {RuleTester} from "@typescript-eslint/rule-tester"; import {rules} from "../../src/index"; -const parserOptions = { - parser: require.resolve("@babel/eslint-parser"), -}; +const ruleTester = new RuleTester({ + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, + }, +}); -const ruleTester = new RuleTester(parserOptions); const rule = rules["jest-enzyme-matchers"]; ruleTester.run("jest-real-timers", rule, { diff --git a/packages/eslint-plugin-khan/test/rules/no-one-tuple.test.ts b/packages/eslint-plugin-khan/test/rules/no-one-tuple.test.ts index f945980b..39c4b86e 100644 --- a/packages/eslint-plugin-khan/test/rules/no-one-tuple.test.ts +++ b/packages/eslint-plugin-khan/test/rules/no-one-tuple.test.ts @@ -1,12 +1,19 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: {}, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, }, }); @@ -33,9 +40,10 @@ ruleTester.run(ruleName, rule, { // Two errors are reported because there are two one-tuples, // they just happen to be nested. errors: [{messageId: "errorString"}, {messageId: "errorString"}], - // This is a partial fix. Multiple runs of eslint --fix are needed - // to fix nested 1-tuples completely. - output: "type foo = { bar: Array<[number]> }", + output: [ + "type foo = { bar: Array<[number]> }", + "type foo = { bar: Array> }", + ], }, ], }); diff --git a/packages/eslint-plugin-khan/test/rules/react-no-method-jsx-attribute.test.ts b/packages/eslint-plugin-khan/test/rules/react-no-method-jsx-attribute.test.ts index a9baaa05..df86ab84 100644 --- a/packages/eslint-plugin-khan/test/rules/react-no-method-jsx-attribute.test.ts +++ b/packages/eslint-plugin-khan/test/rules/react-no-method-jsx-attribute.test.ts @@ -1,15 +1,22 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: { - jsx: true, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, }, }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, + }, }); const ruleName = "react-no-method-jsx-attribute"; diff --git a/packages/eslint-plugin-khan/test/rules/react-no-subscriptions-before-mount.test.ts b/packages/eslint-plugin-khan/test/rules/react-no-subscriptions-before-mount.test.ts index 38fe9a37..f941dde1 100644 --- a/packages/eslint-plugin-khan/test/rules/react-no-subscriptions-before-mount.test.ts +++ b/packages/eslint-plugin-khan/test/rules/react-no-subscriptions-before-mount.test.ts @@ -1,12 +1,19 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: {}, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, + }, + }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, }, }); diff --git a/packages/eslint-plugin-khan/test/rules/react-svg-path-precision.test.ts b/packages/eslint-plugin-khan/test/rules/react-svg-path-precision.test.ts index 0a2516bc..37b60ae1 100644 --- a/packages/eslint-plugin-khan/test/rules/react-svg-path-precision.test.ts +++ b/packages/eslint-plugin-khan/test/rules/react-svg-path-precision.test.ts @@ -1,15 +1,22 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: { - jsx: true, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, }, }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, + }, }); const ruleName = "react-svg-path-precision"; diff --git a/packages/eslint-plugin-khan/test/rules/sync-tag.test.ts b/packages/eslint-plugin-khan/test/rules/sync-tag.test.ts index 4795bc3a..5751a8e8 100644 --- a/packages/eslint-plugin-khan/test/rules/sync-tag.test.ts +++ b/packages/eslint-plugin-khan/test/rules/sync-tag.test.ts @@ -1,17 +1,21 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; import * as util from "../../src/util"; -import {RuleTester} from "../RuleTester"; - const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: { - jsx: true, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: {}, }, }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, + }, }); beforeEach(() => { @@ -188,12 +192,6 @@ ruleTester.run("sync-tag", rule, { }, }, ], - // Prettier is removing whitespace within backticks, so I had to add - // the newlines manually. - output: ` - // sync-start:foo-bar 1424803960 filey - const FooBar = 'foobar'; - // sync-end:foo-bar`, options: [ { ignoreFiles: ["lint_blacklist.txt"], diff --git a/packages/eslint-plugin-khan/test/rules/ts-no-error-suppressions.test.ts b/packages/eslint-plugin-khan/test/rules/ts-no-error-suppressions.test.ts index 1bda91e4..1b963905 100644 --- a/packages/eslint-plugin-khan/test/rules/ts-no-error-suppressions.test.ts +++ b/packages/eslint-plugin-khan/test/rules/ts-no-error-suppressions.test.ts @@ -1,15 +1,22 @@ +import {RuleTester} from "@typescript-eslint/rule-tester"; + import {rules} from "../../src/index"; -import {RuleTester} from "../RuleTester"; const ruleTester = new RuleTester({ - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - ecmaFeatures: { - jsx: true, + languageOptions: { + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, }, }, + linterOptions: { + // NOTE(kevinb): Avoids 'TypeError: Expected a Boolean' error + // when running the tests. + reportUnusedDisableDirectives: true, + }, }); const ruleName = "ts-no-error-suppressions"; diff --git a/yarn.lock b/yarn.lock index 739c8a90..c2946f4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3132,11 +3132,6 @@ ansi-align@^3.0.0: dependencies: string-width "^4.1.0" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-colors@^4.1.1, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -3597,11 +3592,6 @@ brotli-size@4.0.0: dependencies: duplexer "0.1.1" -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - browserslist@^4.23.1, browserslist@^4.23.3: version "4.23.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" @@ -3710,7 +3700,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.2.0: +camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -3767,7 +3757,7 @@ checksync@^5.0.5: resolved "https://registry.yarnpkg.com/checksync/-/checksync-5.0.5.tgz#d1ad19cb0cb09e1ccf2d3a82bb55a3db7d2c9c64" integrity sha512-mbAQuqFmeJphuoGMnrggki7zY0/mw9NOGKTOMisZwO5Hn7R0UrRmJvFfwvtPorYsUHllyt/kyc+UlpdIMBiQcw== -chokidar@3.5.3, chokidar@^3.4.3: +chokidar@^3.4.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -4112,13 +4102,6 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, d dependencies: ms "2.1.2" -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -4139,11 +4122,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - decimal.js@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" @@ -4252,11 +4230,6 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - dir-glob@^2.0.0: version "2.2.2" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" @@ -4554,11 +4527,6 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -4569,6 +4537,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.13.0: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -5130,14 +5103,6 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" -find-up@5.0.0, find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -5146,6 +5111,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-yarn-workspace-root2@1.2.16: version "1.2.16" resolved "https://registry.yarnpkg.com/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz#60287009dd2f324f59646bdb4b7610a6b301c2a9" @@ -5167,11 +5140,6 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - flatted@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" @@ -5416,18 +5384,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^10.2.2, glob@^10.3.10: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" @@ -5703,11 +5659,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - hex2dec@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/hex2dec/-/hex2dec-1.1.2.tgz#8e1ce4bef36a74f7d5723c3fb3090c2860077338" @@ -6094,11 +6045,6 @@ is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-plain-obj@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" @@ -6676,13 +6622,6 @@ jest@^29.7.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -6691,6 +6630,13 @@ js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + js2xmlparser@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" @@ -7008,7 +6954,7 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@4.1.0, log-symbols@^4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -7285,13 +7231,6 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -7435,33 +7374,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mocha@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - module-details-from-path@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b" @@ -7503,11 +7415,6 @@ nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -8817,13 +8724,6 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - serialize-javascript@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" @@ -9272,7 +9172,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -9299,13 +9199,6 @@ superagent@^5.3.1: readable-stream "^3.6.0" semver "^7.3.2" -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -9320,6 +9213,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -10007,11 +9907,6 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -10106,11 +10001,6 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -10129,29 +10019,6 @@ yargs-parser@^21.1.1: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0, yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - yargs@^15.1.0: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -10169,6 +10036,19 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^17.1.1, yargs@^17.3.1: version "17.7.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" From 3cab87ef78a73841d3f3edcfc7d084382603f639 Mon Sep 17 00:00:00 2001 From: Kevin Barabash Date: Mon, 9 Dec 2024 11:37:05 -0500 Subject: [PATCH 2/3] add an empty changeset file --- .changeset/rotten-spiders-hear.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/rotten-spiders-hear.md diff --git a/.changeset/rotten-spiders-hear.md b/.changeset/rotten-spiders-hear.md new file mode 100644 index 00000000..a845151c --- /dev/null +++ b/.changeset/rotten-spiders-hear.md @@ -0,0 +1,2 @@ +--- +--- From dc73c80910c170e06b4198b46a72af381cef4e44 Mon Sep 17 00:00:00 2001 From: Kevin Barabash Date: Mon, 9 Dec 2024 11:42:54 -0500 Subject: [PATCH 3/3] remove 'mocha' from CI workflow --- .github/workflows/node-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index b5f9c360..42326e3d 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -183,7 +183,3 @@ jobs: full: yarn test limited-trigger: ${{ steps.js-ts-files.outputs.filtered }} limited: yarn test --findRelatedTests --passWithNoTests {} - - - name: Mocha (eslint-plugin-khan) - working-directory: ./packages/eslint-plugin-khan - run: yarn test