Skip to content

chore: migrate to expecttype eslint rules - #7416

Closed
43081j wants to merge 2 commits into
ReactiveX:masterfrom
43081j:dtslint
Closed

chore: migrate to expecttype eslint rules#7416
43081j wants to merge 2 commits into
ReactiveX:masterfrom
43081j:dtslint

Conversation

@43081j

@43081j 43081j commented Dec 27, 2023

Copy link
Copy Markdown
Contributor

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

43081j commented Jan 23, 2024

Copy link
Copy Markdown
Contributor Author

@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';

@43081j 43081j Jan 23, 2024

Copy link
Copy Markdown
Contributor Author

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

43081j commented Feb 26, 2024

Copy link
Copy Markdown
Contributor Author

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

low priority ofc, assuming you do want the change!

@benlesh

benlesh commented Jul 22, 2026

Copy link
Copy Markdown
Member

Hi @43081j — thank you for the time, care, and thoughtfulness you put into this pull request. I’m sorry we weren’t able to respond in a reasonable timeframe. Since the codebase and surrounding context have moved on and this hasn’t seen recent activity, I’m going to close it for now. That’s a reflection of our delayed triage, not a lack of appreciation for your contribution. If the change is still relevant, please feel welcome to open a fresh pull request against the current codebase. Thank you again for contributing to RxJS and for your patience.

— Ben

@benlesh benlesh closed this Jul 22, 2026
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.

2 participants