From 3956f4d48648c887473673e93b87710233ae35db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 13 Apr 2023 23:32:51 +0200 Subject: [PATCH] feat(remix-eslint-config)!: remove `@remix-run/eslint-config/jest` ESLint config (#5696) --- .changeset/heavy-crabs-kick.md | 5 +++ packages/remix-eslint-config/jest.js | 47 ---------------------------- 2 files changed, 5 insertions(+), 47 deletions(-) create mode 100644 .changeset/heavy-crabs-kick.md delete mode 100644 packages/remix-eslint-config/jest.js diff --git a/.changeset/heavy-crabs-kick.md b/.changeset/heavy-crabs-kick.md new file mode 100644 index 00000000000..9b7839b2a7e --- /dev/null +++ b/.changeset/heavy-crabs-kick.md @@ -0,0 +1,5 @@ +--- +"@remix-run/eslint-config": major +--- + +Remove `@remix-run/eslint-config/jest` ESLint config diff --git a/packages/remix-eslint-config/jest.js b/packages/remix-eslint-config/jest.js deleted file mode 100644 index dac2ee8da83..00000000000 --- a/packages/remix-eslint-config/jest.js +++ /dev/null @@ -1,47 +0,0 @@ -const jestRules = require("./rules/jest"); - -/** - * @see https://github.com/eslint/eslint/issues/3458 - * @see https://www.npmjs.com/package/@rushstack/eslint-patch - */ -require("@rushstack/eslint-patch/modern-module-resolution"); - -const alreadyWarned = {}; -const warnOnce = (condition, message) => { - if (!condition && !alreadyWarned[message]) { - alreadyWarned[message] = true; - console.warn(message); - } -}; - -warnOnce( - false, - "⚠️ DEPRECATED: The `@remix-run/eslint-config/jest` ESLint config " + - "has been deprecated in favor of " + - "`@remix-run/eslint-config/jest-testing-library` and will be removed in " + - "Remix v2. Please update your code to use " + - "`@remix-run/eslint-config/jest-testing-library` instead." -); - -/** - * @deprecated Use `@remix-run/eslint-config/jest-testing-library` instead. - */ -const jestConfig = { - plugins: ["jest"], - env: { - node: true, - }, - overrides: [ - { - files: ["**/__tests__/**/*", "**/*.{spec,test}.*"], - env: { - "jest/globals": true, - }, - rules: { - ...jestRules, - }, - }, - ], -}; - -module.exports = jestConfig;