Closed vripoche closed 1 year ago
2.x.x
No response
Create a MDX file with imported Component that have sub-components as:
doc.mdx:
doc.mdx
import { DefinitionList } from `./DefinitionList` <DefinitionList> <DefinitionList.Title>Hello World !</DefinitionList.Title> <DefinitionList>
And DefinitionList component: DefinitionList.js:
DefinitionList
DefinitionList.js
import React from 'react' export const DefinitionList = ({ children }) => <dl>{children}</dl> DefinitionList.Title = ({ children }) => <dt>{children}</dt>
Should not be any eslint errors
On MDX linting (eslint ./doc.mdx), we have this error: error 'DefinitionList.Title' is not defined react/jsx-no-undef.
eslint ./doc.mdx
error 'DefinitionList.Title' is not defined react/jsx-no-undef
Note: no errors were triggered on last 1.17.1 version.
1.17.1
Node v17
npm v6
macOS
webpack
im getting this error as well!
Initial checklist
Affected packages and versions
2.x.x
Link to runnable example
No response
Steps to reproduce
Create a MDX file with imported Component that have sub-components as:
doc.mdx
:And
DefinitionList
component:DefinitionList.js
:Expected behavior
Should not be any eslint errors
Actual behavior
On MDX linting (
eslint ./doc.mdx
), we have this error:error 'DefinitionList.Title' is not defined react/jsx-no-undef
.Note: no errors were triggered on last
1.17.1
version.Runtime
Node v17
Package manager
npm v6
OS
macOS
Build and bundle tools
webpack