Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

TSLint causes TS features to become unresponsive on incorrect react component syntax. #97

Closed
@BuckAMayzing

Description

@BuckAMayzing

I think I've got this broken down to the bare minimum number of steps to reproduce, and it's been happening for a while. I'm wondering if it's related to #55, but I can't guarantee that it is. It might be that this breaks on any sufficient number of TypeScript server errors, but here's the set of steps:

Environment: W10 (multiple editions)
VSCode version: All so far, including the latest insiders
TSLint version: 1.1.0

  1. create tslint.json and ./src/test.tsx files (source below)
  2. open src/test.tsx
  3. wait for language features to initialize
  4. go to the appropriately commented line
  5. enter a letter, delete, and repeat.

After a few times (reliably 5 times for me), the error underlines, outline, autocomplete, and other related features stop responding.

This behavior doesn't occur if the TSLint extension is disabled or not installed.

tslint.json:

{
    "extends": ["tslint:recommended"]
}

test.tsx (NOTE: The outer div seems to be important here. Removing it prevents the crash):

const val: number = 1;

const Component = () => {
    return (
        <div>
            {val === 0 ? (
                "test"
            ) : (
                // enter something here.
                <div className={"something"}>
                </div>
            )}
        </div>
    );
};

export default Component;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions