-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore(package): Add ts-lint for typings #1156
Conversation
Current coverage is 95.88% (diff: 100%)@@ master #1156 diff @@
==========================================
Files 879 879
Lines 4882 4882
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 4681 4681
Misses 201 201
Partials 0 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, I was really wanting to get this done! Thanks much 👍 One change request.
"tsd": "cpx './src/**/*.d.ts' dist/commonjs" | ||
"tsd": "cpx './src/**/*.d.ts' dist/commonjs", | ||
"tsd:lint": "tslint './src/**/*.d.ts'", | ||
"tsd:lint:fix": "npm run tsd:lint -- --fix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's silence
the extra NPM error blocks this would produce on a failure:
-npm run tsd:lint -- --fix
+npm run -s tsd:lint -- --fix
…antic-Org/Semantic-UI-React into chore/ts-lint # Conflicts: # src/collections/Menu/index.d.ts # src/elements/Input/index.d.ts
@@ -47,7 +47,7 @@ export interface InputProps { | |||
label?: any; | |||
|
|||
/** A Label can appear outside an Input on the left or right. */ | |||
labelPosition?: 'left', 'right', 'left corner', 'right corner'; | |||
labelPosition?: 'left' | 'right' | 'left corner' | 'right corner'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed type definition.
@@ -58,7 +58,7 @@ export interface InputProps { | |||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | |||
* @param {object} data - All props and proposed value. | |||
*/ | |||
onChange?: (e: React.SyntheticEvent<HTMLInputElement>, {...InputProps, value: string}) => void; | |||
onChange?: (event: React.SyntheticEvent<HTMLInputElement>, data: onChangeData) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed type definition.
Rebased to |
I just fixed the new conflicts after merging the other ts PRs. Will merge this on pass. |
I'll fix lint issues immediately. |
…React into chore/ts-lint # Conflicts: # src/elements/Container/index.d.ts # src/elements/Divider/index.d.ts # src/elements/Header/index.d.ts # src/elements/Icon/index.d.ts
I'll solve merge conflicts, too 😄 |
…React into chore/ts-lint # Conflicts: # src/elements/Flag/index.d.ts # src/elements/Image/index.d.ts # src/modules/Checkbox/index.d.ts
Okay, we can try to merge after tests pass 👍 |
Thanks much, will do. I'll make a release following as well. |
Released in |
When I was working on #1155, I realized that the need to add linter for typings.
This PR adds
tslint
for its.