-
Notifications
You must be signed in to change notification settings - Fork 98
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
Convert to TypeScript #54
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1f031e0
Add "typescript" dependency
Turbo87 785c650
Use require() for CommonJS imports
Turbo87 94dad58
package.json: Use "tsc" for "build" script
Turbo87 6bf9167
Add "ts-jest" dependency
Turbo87 319e032
ConfigurationError: Add "instanceof" unit test
Turbo87 7730fc4
ConfigurationError: Convert to class
Turbo87 18634dc
ConfigurationError: Convert to TypeScript
Turbo87 0916cfa
Add "@types/node" dependency
Turbo87 036ca94
execSync: Convert to TypeScript
Turbo87 86620f8
Configuration: Convert to TypeScript
Turbo87 46bb815
ApiDataCache: Convert to TypeScript
Turbo87 1f6cb04
GithubAPI: Convert to TypeScript
Turbo87 91be927
progressBar: Convert to TypeScript
Turbo87 61bff12
RemoteRepo: Convert to TypeScript
Turbo87 f02b725
Changelog: Convert to TypeScript
Turbo87 48197f6
index: Convert to TypeScript
Turbo87 f509ae6
tests: Convert to TypeScript
Turbo87 3b3a10c
Use tslint for linting
Turbo87 1263283
Remove babel and eslint dependencies
Turbo87 95d5ce6
Move tests into "src" folder
Turbo87 d646f47
Adjust ".npmignore" file
Turbo87 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
src | ||
**/__mocks__/** | ||
**/__snapshots__/** | ||
*.spec.js | ||
.editorconfig | ||
.travis.yml | ||
tsconfig.json | ||
tslint.json | ||
yarn.lock |
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
import ConfigurationError from "../src/ConfigurationError"; | ||
|
||
describe("ConfigurationError", function() { | ||
it("can be identified using `instanceof`", function() { | ||
const configError = new ConfigurationError('foobar'); | ||
expect(configError instanceof ConfigurationError).toEqual(true); | ||
|
||
const error = new Error('foobar'); | ||
expect(error instanceof ConfigurationError).toEqual(false); | ||
}); | ||
}); |
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,7 @@ | ||
export default class ConfigurationError { | ||
name = "ConfigurationError"; | ||
|
||
constructor(message: string) { | ||
Error.apply(this, arguments); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I was going to say you can try eslint + typescript parser + prettier now instead but can do that later
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.
yeah, I'd like to postpone that for now and focus on the other commits I still have in the pipeline. I'll keep it in mind for later though.