Skip to content

Integrate eslint language server #49

Closed

Description

@angelozerr

ESLint is very used in JavaScript word. It seems that VSCode provides an eslint language server https://github.com/Microsoft/vscode-eslint/blob/master/server/src/server.ts

I think it should be interesting to integrate it but activate with some condition like:

  • search if it exists an eslint.json in the project root
  • force the activation of the eslint language server with a preferences.

In other words:

  • BlueSky could be attractive for JavaScript developers.
  • It's a new use case to activate language server with some conditions.

Activity

  1. mickaelistria commented on Sep 15, 2017

    @mickaelistria
    Contributor

    Sounds like a good idea! Do you know which kind of features is provided by the eslint server? Is there more than diagnostics?
    If it's only about diagnostic, I think it could be a separate bundle, that we could suggest as addition to JSDT later (and consume in BlueSky).

  2. angelozerr commented on Sep 15, 2017

    @angelozerr
    ContributorAuthor
  3. angelozerr commented on Sep 15, 2017

    @angelozerr
    ContributorAuthor

    For the moment vscode-eslint doesn't support --stdio

    We must wait for microsoft/vscode-eslint#290

  4. mniewrzal commented on Sep 15, 2017

    @mniewrzal
    Contributor

    For the moment vscode-eslint doesn't support --stdio

    But does it have LSP support? Maybe it supports TCP/IP communication?

  5. angelozerr commented on Sep 15, 2017

    @angelozerr
    ContributorAuthor

    According https://github.com/Microsoft/vscode-eslint/blob/master/server/src/server.ts#L289 it supports IPC

    let connection = createConnection(ProposedFeatures.all, new IPCMessageReader(process), new IPCMessageWriter(process));

    I have tried to replace this code with

    let connection = createConnection()

    like JSON, CSS Language server does (it search for instance if stdio is in the args), but it failed at https://github.com/Microsoft/vscode-eslint/blob/master/server/src/server.ts#L303

    resultPromise = connection.workspace.getConfiguration({ scopeUri: uri, section: '' }).then((settings: TextDocumentSettings) => {
    because connection.workspace is null (it's not a standars LSP connection).

  6. mickaelistria commented on Sep 15, 2017

    @mickaelistria
    Contributor
  7. mickaelistria commented on Oct 3, 2018

    @mickaelistria
    Contributor

    We're now using typescript-language-server from Typefox/Theia. Is ESLint still useful with this language server?

  8. angelozerr commented on Oct 3, 2018

    @angelozerr
    ContributorAuthor

    Is ESLint still useful with this language server?

    Typefox/Theia can support tslint by using the plugin https://github.com/angelozerr/tslint-language-service

    So you can define lint rules with tslint. Some user could prefer ESLint which works only with JS if I remember.

  9. mickaelistria commented on May 15, 2019

    @mickaelistria
    Contributor

    I'm closing it in favor of #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions