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

Update to use node16 module resolution in tsconfig.json #723

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions lib/ast-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @typedef {import('hast').DocType} Doctype
* @typedef {import('property-information').Info} Info
* @typedef {import('property-information').Schema} Schema
* @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
* @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps
*
* @typedef Raw
* @property {'raw'} type
Expand Down Expand Up @@ -87,7 +87,7 @@
* @property {TableRowComponent|ReactMarkdownNames} tr
* @property {UnorderedListComponent|ReactMarkdownNames} ul
*
* @typedef {Partial<Omit<import('./complex-types').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
* @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
*
* @typedef Options
* @property {boolean} [sourcePos=false]
Expand Down
2 changes: 1 addition & 1 deletion test/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ test('should pass index of a node under its parent to components if `includeElem
test('should be able to render components with forwardRef in HOC', () => {
/**
* @typedef {import('react').Ref<HTMLAnchorElement>} Ref
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react').ReactMarkdownProps} Props
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react.js').ReactMarkdownProps} Props
*/

/**
Expand Down
10 changes: 3 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
"include": ["lib/**/*.js", "test/**/*.jsx", "test/**/*.js", "index.js"],
"exclude": ["**/*.min.js"],
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020", "DOM"],
"module": "ES2020",
"moduleResolution": "node",
"target": "es2021",
"lib": ["es2020", "dom"],
"module": "node16",
"jsx": "react",
"allowJs": true,
ChristianMurphy marked this conversation as resolved.
Show resolved Hide resolved
"checkJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"noImplicitAny": false,
"noImplicitThis": true,
"strict": true
}
}