Skip to content

Commit 1516cd4

Browse files
committed
Add type generation
1 parent 9668ee0 commit 1516cd4

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ package-lock.json
2828
yarn.lock
2929

3030
.npmignore
31+
32+
/lib/**/*.d.ts
33+
/lib/**/*.d.ts.map
34+
!/lib/types.d.ts
35+
/index.d.ts
36+
/index.d.ts.map

build.tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
{
3+
"extends": "./tsconfig",
4+
"files": [
5+
"index.js"
6+
],
7+
"compilerOptions": {
8+
"declaration": true,
9+
"declarationMap": true,
10+
"noEmit": false,
11+
"emitDeclarationOnly": true
12+
}
13+
}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"description": "React specific linting rules for ESLint",
66
"main": "index.js",
77
"scripts": {
8+
"clean-built-types": "rm -f $(find . -maxdepth 1 -type f -name '*.d.ts*') $(find lib -type f -name '*.d.ts*' ! -name 'types.d.ts')",
9+
"prebuild-types": "npm run clean-built-types",
10+
"build-types": "tsc -p build.tsconfig.json",
11+
"prepublishOnly": "npm run build-types",
812
"prepack": "npmignore --auto --commentLines=autogenerated",
913
"prelint": "npm run lint:docs",
1014
"lint:docs": "markdownlint \"**/*.md\"",

0 commit comments

Comments
 (0)