Rewrite in TypeScript
See original GitHub issueNow that https://github.com/typescript-eslint/typescript-eslint/pull/425 has been released, it should be relatively straightforward to migrate.
I think porting one and one rule makes the most sense. Feel free to pick one 🙂
-
consistent-test-it
- #327 -
expect-expect
- #325 -
lowercase-name
- #258 -
no-alias-methods
-
no-commented-out-tests
- #305 -
no-disabled-tests
- #315 -
no-duplicate-hooks
- #318 -
no-empty-title
-
no-export
- #323 -
no-focused-tests
- #314 -
no-hooks
- #322 -
no-identical-title
-
no-if
- #324 -
no-jasmine-globals
- #315 -
no-jest-import
- #259 -
no-large-snapshots
-
no-mocks-import
- #309 -
no-test-callback
- #321 -
no-test-prefixes
- #328 -
no-test-return-statement
- #320 -
no-truthy-falsy
-
prefer-called-with
-
prefer-expect-assertions
-
prefer-inline-snapshots
- #319 -
prefer-spy-on
- #326 -
prefer-strict-equal
- #329 -
prefer-to-be-null
-
prefer-to-be-undefined
-
prefer-to-contain
-
prefer-to-have-length
-
prefer-todo
- #335 -
require-tothrow-message
-
valid-describe
- #308 -
valid-expect-in-promise
-
valid-expect
- #333
Issue Analytics
- State:
- Created 4 years ago
- Comments:28 (16 by maintainers)
Top Results From Across the Web
How I rewrote our codebase to TypeScript in a week - Medium
How a developer rewrote an application from JavaScript to TypeScript and how you can do the same.
Read more >Rewrite in TypeScript useful? : r/javascript - Reddit
I was thinking if a rewrite in TypeScript would help me on managing the growing app a little better and if it's worth...
Read more >Documentation - Migrating from JavaScript - TypeScript
Converting a JavaScript codebase over to TypeScript is, while somewhat tedious, usually not challenging. In this tutorial, we're going to look at how...
Read more >Rewriting TypeScript in Rust? You'd have to be...
Rewriting tsc in a native language, like Rust, could speed it up immensely ... Rewriting a library like TypeScript is extremely challenging.
Read more >Any plan/interest to rewrite in TypeScript? · Issue #321 - GitHub
Seeing that got is now 100% typescript, is there any plan or ongoing effort on porting ... The Got rewrite to TS ended...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SimenB Just wanted to let you know I’ve not forgotten about this 😉
I’ve got 2 rules left to convert, and the new guards + expect parser is working a treat.
Life got a bit busy once I got back, but I hope to have a PR for review by midweek.
As an example of how nice the new expect stuff is:
prefer-to-be-null
&prefer-to-be-undefined
took literally 5 minutes to convert, despite being the two rules that used those massive expect guards, as they were having to account fornot
.Now they’re just:
We don’t want to use the parser in our own rules - we want to use the utils which provide way better types than the ones from DefinitelyTyped as well as some nice utils for options etc. It’s also stricter (also called opinionated 😛), forcing us to follow some good conventions (fixing both #201 and #202 at once).
We do however want to use the parser for linting our own code, but that should not be visible to consumers.
The dependency on
typescript
was not on purpose, see https://github.com/typescript-eslint/typescript-eslint/pull/425#issuecomment-498302492When a release is out, we can probably retry this (I’ll revert my earlier revert). Will need to dig into #268 as well at that point.