Skip to content

Conversation

@timdeschryver
Copy link
Contributor Author

I'm getting timeouts on the tests for no-connectable.
I haven't taken a look at why this might happen.

@cartant
Copy link
Owner

cartant commented Aug 6, 2019

I'm getting timeouts on the tests

Tests for rules that use type information are slow. Really slow. Each test is a full-blown TS compile. Not sure where the timeout setting resides.

I assumed that it was my grossly-under-powered, don't-care-if-it-gets-nicked notebook (that I use for talks at meetups, etc.) that was the issue. I don't recall seeing timeouts on my MacBook.

{
code: stripIndent`
import { concat } from 'rxjs/internal/observable/concat';
import { map } from 'rxjs/internal/operators/map';`,
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't this test identical to the one above? Did you intend to split the the two imports into two tests, so that each test includes only a single import?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One for single quotes and the other one for double quotes.
In the tslint code the selector checked for quotes because it used the "raw" value of the import. We know check on the value (so without any quotes) so, this can indeed be removed 👍

Copy link
Owner

Choose a reason for hiding this comment

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

👍🙈

},
create: context => {
return {
["ImportDeclaration Literal[value=/^rxjs\\u002finternal/]"]: (
Copy link
Owner

Choose a reason for hiding this comment

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

Wow. I love this!!! I don't think it needs to be a computed property though. A quoted key should be fine, AFAICT.

Copy link
Owner

@cartant cartant left a comment

Choose a reason for hiding this comment

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

Thanks. This looks great. Just a couple of minor nits. The selector is freaking awesome!!!

@cartant
Copy link
Owner

cartant commented Aug 7, 2019

I'm getting timeouts on the tests for no-connectable.

I've bumped the timeout - specified in the test script - to five seconds.

@timdeschryver
Copy link
Contributor Author

timdeschryver commented Aug 7, 2019

I've bumped the timeout - specified in the test script - to five seconds.

I was on energy save mode, which apparently is a whole lot slower... Now, it runs with the initial timeout time.

@cartant cartant merged commit 89cbd20 into cartant:master Aug 7, 2019
@timdeschryver timdeschryver deleted the pr/no-internal branch August 7, 2019 11:16
Danevandy99 pushed a commit to Danevandy99/eslint-plugin-rxjs that referenced this pull request Nov 28, 2024
- Fix types in package.json causing package to masquerade as ESM
- Change the default export to be a more helpful name to avoid
import-x/no-rename-default.
- Fix incorrect default export in CJS due to a known issue with unbuild.
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