I'm getting No default export found in imported module "react-checkbox-tree" after upgrading to ESLint 9 and eslint-plugin-import-x.
Relevant eslint.config.mjs config matches the main readme example here:
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
import { createNodeResolver, importX } from 'eslint-plugin-import-x';
...
[
importX.flatConfigs.recommended,
importX.flatConfigs.typescript,
{
settings: {
'import-x/resolver-next': [
createTypeScriptImportResolver({
alwaysTryTypes: true,
project: 'packages/*/tsconfig.json',
noWarnOnMultipleProjects: true,
}),
createNodeResolver(),
],
},
...etc
}
The import looks like this:
import CheckboxTree from 'react-checkbox-tree';
The react-checkbox-tree's index.d.ts looks like this:
import * as React from 'react';
declare module "react-checkbox-tree" {
...etc
interface CheckboxProps {
...etc
}
export default class CheckboxTree extends React.Component<CheckboxProps> {}
}
TypeScript's LSP is able to navigate to the default export from the package no problem.
Not sure if the problem is somewhere in my configuration, import-x, or the types for react-checkbox-tree. Perhaps it is because of the minified lib/index.js of react-checkbox-tree? Appears to be a UMD module at first glance.
Thanks!
I'm getting
No default export found in imported module "react-checkbox-tree"after upgrading to ESLint 9 and eslint-plugin-import-x.Relevant
eslint.config.mjsconfig matches the main readme example here:The import looks like this:
The
react-checkbox-tree'sindex.d.tslooks like this:TypeScript's LSP is able to navigate to the default export from the package no problem.
Not sure if the problem is somewhere in my configuration, import-x, or the types for
react-checkbox-tree. Perhaps it is because of the minifiedlib/index.jsofreact-checkbox-tree? Appears to be a UMD module at first glance.Thanks!