Skip to content

Fixes case where endPosition === startPosition#73

Open
Kronuz wants to merge 1 commit into
angelozerr:masterfrom
Kronuz:patch-1
Open

Fixes case where endPosition === startPosition#73
Kronuz wants to merge 1 commit into
angelozerr:masterfrom
Kronuz:patch-1

Conversation

@Kronuz

@Kronuz Kronuz commented Jun 13, 2018

Copy link
Copy Markdown

Some times, when endPosition is equal to startPosition, length ends up being zero.

This makes language server (I'm using javascript-typescript-langserver) give wrong diagnostics
flagging the problem at position (0, 0).

space-in-parens error is an example:

    import('./test3' /* webpackChunkName: "test3" */).then(({ test3 }) => {
      test3('first');
    });

Some times, when endPosition is equal to startPosition, length ends up being zero.

This makes language server (I'm using javascript-typescript-langserver) give wrong diagnostics
flagging the problem at position (0, 0).

`space-in-parens` error is an example:

```es6
    import('./test3' /* webpackChunkName: "test3" */).then(({ test3 }) => {
      test3('first');
    });
```
Kronuz added a commit to Kronuz/tslint-language-service that referenced this pull request Jun 20, 2018
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