Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: eslint import/no-unresolved error #1791

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"browser": true,
"node": true
},
"reportUnusedDisableDirectives": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will help spot if the import/no-unresolved gets fixed.

"rules": {
"no-debugger": 0,
"no-alert": 0,
Expand Down
2 changes: 1 addition & 1 deletion src/TransWithoutContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found after enabling reportUnusedDisableDirectives.
image

function Componentized() {
// <>{comp}</>
return createElement(Fragment, null, comp);
Expand Down
4 changes: 3 additions & 1 deletion test/icu.macro.spec.js
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
Loading