-
Notifications
You must be signed in to change notification settings - Fork 22
Typescript conversion #32
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b22179e
Added Typescript, removed Flow. Updated config files.
rossknudsen 1ed56ad
Converted main files to Typescript
rossknudsen 9f218cc
Converted tests to Typescript
rossknudsen 82c34c2
Fixed type errors
rossknudsen 9d2cbf3
Updated build configuration.
rossknudsen 07facbc
Fixed linting.
rossknudsen dcdea4c
Try bumping node version to build package.
rossknudsen 2ac03d3
Upgraded babel parser and fixed babylon_parser.
rossknudsen 61f8732
Modified linting rules for array types and max classes per file.
rossknudsen d24e583
Consistent single quotes.
rossknudsen 7d36e0d
Fixes as per PR suggestions.
rossknudsen 964db16
Small tweaks for types.
rossknudsen e29a1f4
Update .eslintrc.js
rossknudsen 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 contains hidden or 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 hidden or 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,4 @@ | ||
* text=auto | ||
|
||
*.example text eol=lf | ||
*.js text eol=lf |
This file contains hidden or 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 hidden or 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,5 +1,5 @@ | ||
{ | ||
"typescript.validate.enable": false, | ||
"javascript.validate.enable": false, | ||
"typescript.validate.enable": true, | ||
"javascript.validate.enable": true, | ||
"eslint.autoFixOnSave": true | ||
} |
This file contains hidden or 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,9 +1,4 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ useBuiltIns: 'usage', corejs: '3' } | ||
], | ||
'@babel/flow', | ||
], | ||
presets: [['@babel/preset-env', {useBuiltIns: 'usage', corejs: '3'}], '@babel/typescript'], | ||
plugins: ['@babel/plugin-proposal-optional-chaining', '@babel/proposal-class-properties', '@babel/transform-runtime'], | ||
}; |
This file contains hidden or 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 hidden or 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,4 +1,4 @@ | ||
// @flow | ||
|
||
it('works with old functions', function() { | ||
|
||
}); | ||
|
This file contains hidden or 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
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.
Why do some files start with an empty line?
Uh oh!
There was an error while loading. Please reload this page.
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.
Thats a good question. It took me ages to figure out why some unit tests were failing. Turns out the line numbers are hard-coded in them and I was trying to change the minimal amount of code, so that this PR was readable.
So I didn't update the tests with new line numbers.