From f1fb5df09eb1687e8e777ab19b84cdce79f98a14 Mon Sep 17 00:00:00 2001 From: Ricardo Costa <48949546+ripecosta@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:36:21 +0100 Subject: [PATCH] fix: eslint import/no-unresolved error (#1791) * fix: eslint import/no-unresolved error * fix: remove unused eslint ignore directive --- .eslintrc.json | 1 + src/TransWithoutContext.js | 2 +- test/icu.macro.spec.js | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9291598cb..e82bdb64b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,6 +13,7 @@ "browser": true, "node": true }, + "reportUnusedDisableDirectives": true, "rules": { "no-debugger": 0, "no-alert": 0, diff --git a/src/TransWithoutContext.js b/src/TransWithoutContext.js index c10b57443..877a2d1e3 100644 --- a/src/TransWithoutContext.js +++ b/src/TransWithoutContext.js @@ -369,7 +369,7 @@ export function Trans({ ) return; - // eslint-disable-next-line react/no-unstable-nested-components, no-inner-declarations + // eslint-disable-next-line react/no-unstable-nested-components function Componentized() { // <>{comp} return createElement(Fragment, null, comp); diff --git a/test/icu.macro.spec.js b/test/icu.macro.spec.js index 4d1afb79a..5e47ee024 100644 --- a/test/icu.macro.spec.js +++ b/test/icu.macro.spec.js @@ -1,5 +1,7 @@ import { describe, it, expect } from 'vitest'; -import pluginTester from 'babel-plugin-tester'; +// Unsure why ESLint can't resolve it but tests run correctly +// eslint-disable-next-line import/no-unresolved +import { pluginTester } from 'babel-plugin-tester'; import plugin from 'babel-plugin-macros'; /**