Skip to content

Commit

Permalink
Fix TypeScript references (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons committed Apr 26, 2022
1 parent d5a55d4 commit 66606f2
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .changeset/rare-dragons-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"click-to-react-component": patch
---

- Fix file references
- Fix types references
- Add `lint` script to `click-to-react-component`
9 changes: 6 additions & 3 deletions packages/click-to-react-component/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"checkJs": true,
"module": "NodeNext",
// https://github.com/microsoft/TypeScript/issues/23219#issuecomment-773555768
"maxNodeModuleJsDepth": 0,
"module": "ESNext",
"moduleResolution": "node",
"noEmit": true,
"noImplicitThis": true
},
"exclude": ["node_modules", "**/node_modules/*"]
}
}
2 changes: 2 additions & 0 deletions packages/click-to-react-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"build": "echo \"Fuck build tools\"",
"dev": "pnpm run build",
"lint": "tsc -p ./jsconfig.json",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down Expand Up @@ -40,6 +41,7 @@
},
"devDependencies": {
"@types/react": "^18.0.6",
"@types/react-reconciler": "^0.26.6",
"eslint": "^8.0.0",
"eslint-config-react-app": "^7.0.1"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/click-to-react-component/src/ClickToComponent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {import('../types').ClickToComponentProps} Props
* @typedef {import('../types').Coords} Coords
* @typedef {import('./types').ClickToComponentProps} Props
* @typedef {import('./types').Coords} Coords
*/

import { FloatingPortal } from '@floating-ui/react-dom-interactions'
Expand Down
2 changes: 1 addition & 1 deletion packages/click-to-react-component/src/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @typedef {import('react').DialogHTMLAttributes} DialogHTMLAttributes
* @typedef {import('react').HTMLAttributes} HTMLAttributes
* @typedef {import('react').MouseEvent<HTMLElement, MouseEvent>} ReactMouseEvent}
* @typedef {import('../types').ContextMenuProps} Props
* @typedef {import('./types').ContextMenuProps} Props
*/

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/click-to-react-component/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClickToComponent as Component } from './src/ClickToComponent.js'
import { ClickToComponent as Component } from './ClickToComponent.js'

export const ClickToComponent =
process.env.NODE_ENV === 'development' ? Component : () => null
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66606f2

Please sign in to comment.