forked from juliencrn/usehooks-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move usehooks files to packages/usehooks-ts
- Loading branch information
Showing
139 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": ["custom"], | ||
"overrides": [ | ||
// Track tree-shaking potential error in the lib | ||
{ | ||
"files": ["./src/**/!(*.test|*.spec).ts"], | ||
"plugins": ["tree-shaking"], | ||
"rules": { | ||
"tree-shaking/no-side-effects-in-initialization": 2 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const ignoreDirs = ['dist/', 'node_modules/', 'scripts/'] | ||
|
||
/** @type {Config.InitialOptions} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'jsdom', | ||
verbose: false, | ||
silent: true, | ||
transform: { | ||
'^.+\\.[t]sx?$': `ts-jest`, | ||
}, | ||
transformIgnorePatterns: ['<rootDir>/node_modules/'], | ||
testPathIgnorePatterns: ignoreDirs, | ||
coveragePathIgnorePatterns: ignoreDirs, | ||
coverageDirectory: '<rootDir>/coverage/', | ||
testMatch: ['<rootDir>/src/**/*.test.ts'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"name": "usehooks-ts", | ||
"private": false, | ||
"version": "2.9.1", | ||
"description": "React hook library, ready to use, written in Typescript.", | ||
"author": "Julien CARON <[email protected]>", | ||
"homepage": "https://usehooks-ts.com", | ||
"keywords": [ | ||
"typescript", | ||
"react", | ||
"hooks" | ||
], | ||
"license": "MIT", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"types": "./dist/esm/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/cjs/index.js", | ||
"import": "./dist/esm/index.js" | ||
} | ||
}, | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"dev": "pnpm test:watch", | ||
"build": "pnpm build:cjs && pnpm build:esm", | ||
"build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs --target es5", | ||
"build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm --target es6", | ||
"test": "jest", | ||
"test:watch": "pnpm test -- --watch --silent", | ||
"clean": "rimraf -rf ./dist .turbo", | ||
"lint": "eslint '**/*.{js,jsx,ts,tsx}'", | ||
"types-check": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/react": "^12.1.2", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@types/jest": "^29.0.3", | ||
"@types/node": "^18.7.18", | ||
"@types/react": "17.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.37.0", | ||
"@typescript-eslint/parser": "^5.37.0", | ||
"date-fns": "^2.29.3", | ||
"eslint": "^8.9.0", | ||
"eslint-config-custom": "*", | ||
"eslint-plugin-tree-shaking": "^1.10.0", | ||
"jest": "^29.0.3", | ||
"jest-environment-jsdom": "^29.0.3", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^29.0.1", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.8.3" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=16.15.0" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/juliencrn/usehooks-ts" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/juliencrn/usehooks-ts/issues" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
|
||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"moduleResolution": "node", | ||
"isolatedModules": true, | ||
// Needed for CommonJS modules | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
|
||
"include": ["./src/**/*"], | ||
"exclude": ["./src/**/*.test.ts", "./src/**/*.mdx", "./src/**/*.demo.tsx"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"pretty": true, | ||
"skipLibCheck": true, | ||
"removeComments": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"strict": true, | ||
"lib": [ | ||
"ESNEXT", | ||
"DOM" | ||
] | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
] | ||
} |