Skip to content

Commit

Permalink
use tsc for types because that works ig
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Dec 26, 2024
1 parent 71c1dbd commit 605c6e7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ module.exports = {
project: './tsconfig.json',
},
},
{
files: ['example/**/*.ts', 'example/**/*.tsx'],
extends: ['airbnb-typescript'],
parserOptions: {
project: './example/tsconfig.json',
},
},
],
};
10 changes: 10 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "es2020"],
"jsx": "react-jsx",
"noEmit": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["*.tsx", "*.ts"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"url": "git+https://github.com/u-wave/react-youtube.git"
},
"scripts": {
"build": "tsup src/index.tsx --format esm,cjs --experimental-dts",
"build": "tsup src/index.tsx --format esm,cjs && tsc --declaration --emitDeclarationOnly -p .",
"docs": "prop-types-table src/index.js | md-insert README.md --header Props -i",
"example": "npm run --prefix example start",
"browserslist": "npx browserslist --mobile-to-desktop '> 0.5%, last 2 versions, Firefox ESR, not dead, not IE 11' > .browserslistrc",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "es2020"],
"noEmit": true,
"jsx": "react-jsx",
"outDir": "dist",
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["src/*.tsx", "src/*.ts", "example/*.tsx"]
"include": ["src/*.tsx", "src/*.ts"]
}

0 comments on commit 605c6e7

Please sign in to comment.