Skip to content
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: migrate to expecttype eslint rules #7416

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Dec 27, 2023

This migrates to using an eslint plugin for $ExpectType and friends so we can do it as part of the lint script.

For now, typescript had to be added to the root project since the rxjs site is still on an older typescript which confuses eslint (since it ends up being hoisted by yarn).

In future, we should probably keep the two projects in sync, using the same typescript version. However, this will mean bumping the angular version in the rx site (which is its own chunky job).

Questions

  • do we still need tsconfig.types.json? and tsconfig.types.spec.json. im not sure what use these have anymore, as we use a separate mocha tsconfig during testing anyway

@43081j
Copy link
Contributor Author

43081j commented Jan 23, 2024

@benlesh fyi this seems to have also caught some leftover dtslint assertions for things that have since been removed

e.g. every supporting a thisArg

the jsdoc was also mentioning those params still, so i removed that in this PR.

pinging you because you made those changes iirc, so want to be sure this is right

it('should support union types', () => {
const o = of(1).pipe(expand(x => typeof x === 'string' ? of(123) : of('test'))); // $ExpectType Observable<string | number>
});
import { of, asyncScheduler } from 'rxjs';
Copy link
Contributor Author

@43081j 43081j Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whitespace change seems to be that the original file had CRLF. my editor read the editorconfig and changed it to LF

This migrates to using an eslint plugin for `$ExpectType` and friends so
we can do it as part of the lint script.

For now, `typescript` had to be added to the root project since the rxjs
site is still on an older typescript which confuses eslint (since it
ends up being hoisted by yarn).
@43081j
Copy link
Contributor Author

43081j commented Feb 26, 2024

any chance you can take a look at this @benlesh ? 👀

low priority ofc, assuming you do want the change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant