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

[typescript-migration] calendar.jsx and index.jsx #4766

Merged
merged 5 commits into from
May 16, 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
27 changes: 5 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@
"module": "dist/es/index.js",
"unpkg": "dist/react-datepicker.min.js",
"style": "dist/react-datepicker.min.css",
"files": [
"*.md",
"dist",
"lib",
"es",
"src/stylesheets"
],
"sideEffects": [
"**/*.css"
],
"keywords": [
"react",
"datepicker",
"calendar",
"date",
"react-component"
],
"files": ["*.md", "dist", "lib", "es", "src/stylesheets"],
"sideEffects": ["**/*.css"],
"keywords": ["react", "datepicker", "calendar", "date", "react-component"],
"repository": {
"type": "git",
"url": "git://github.com/Hacker0x01/react-datepicker.git"
Expand Down Expand Up @@ -93,7 +79,7 @@
"react-onclickoutside": "^6.13.0"
},
"scripts": {
"eslint": "eslint --ext .js,.jsx src test",
"eslint": "eslint --ext .js,.jsx,.ts,.tsx src test",
"precommit": "lint-staged --allow-empty",
"sass-lint": "stylelint 'src/stylesheets/*.scss'",
"lint": "yarn run eslint && yarn run sass-lint",
Expand All @@ -117,10 +103,7 @@
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx,json,css,scss,md}": [
"prettier --write",
"git add"
]
"*.{js,jsx,ts,tsx,json,css,scss,md}": ["prettier --write", "git add"]
},
"packageManager": "yarn@1.22.17"
}
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const migrateRollup2to3OutputOptions = {

/** @type {import('rollup').RollupOptions} */
const config = {
input: "src/index.jsx",
input: "src/index.tsx",
output: [
{
file: pkg.browser,
Expand Down
7 changes: 7 additions & 0 deletions src/@types/react-onclickoutside/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { findDOMNode } from "react-dom";

declare module "react-onclickoutside" {
interface WrapperInstance<P, C> {
componentNode: ReturnType<typeof findDOMNode>;
}
}
Loading
Loading