Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Suspend when listed in linter.disabledProviders #44

Open
savetheclocktower opened this issue Jul 22, 2023 · 3 comments
Open

Suspend when listed in linter.disabledProviders #44

savetheclocktower opened this issue Jul 22, 2023 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@savetheclocktower
Copy link
Member

The package is in flux right now, and I’m working on six other things anyway, but I’m writing this down so I don’t forget about it.

Issue Type

Enhancement

Issue Description

I’ve been trying to make my own version of ide-typescript and finding that ESLint’s suggestions often overlap those of the TypeScript language server. It’s annoying to have the same issue annotated twice, especially since the two sources often disagree on severity. But I don't want to turn off linter-eslint-node entirely — just on certain projects.

The linter package allows you to specify a list of disabled providers in your settings, and I figured that’d work great with atomic-management — I’d just need to put something like this in .atom/config.cson:

"*":
  "linter":
    "disabledProviders": [
      "ESLint (Node)"
    ]

This does what it’s supposed to on linter’s side, but it’s not enough. Because we also go outside of the linter system to setup automatic fixes via fixJob.

We should be observing linter.disabledProviders so that we can do more thorough cleanup whenever that setting is changed to add or remove our linter. If the setting is changed to include our linter after we’ve loaded, we can suspend; and if it’s changed to remove our linter, we can wake up.

It would probably also be a good idea to include a shorthand setting within our package that accomplishes the same thing. This would allow per-project overrides for people who use our .linter-eslint config file instead of atomic-managment or project-config:

{
  "disabled": true
}

If either this setting or linter’s setting suggested we should be disabled, we’d disable ourselves.

@scagood
Copy link
Contributor

scagood commented Jul 23, 2023

Can you label this a bug please? 👀

@savetheclocktower savetheclocktower added bug Something isn't working enhancement New feature or request labels Jul 23, 2023
@savetheclocktower
Copy link
Member Author

Labelled it as both bug and enhancement. I'd split it into two different tickets, but I plan to tackle this soon anyway and will make sure to address it all in one PR.

@savetheclocktower
Copy link
Member Author

savetheclocktower commented Jul 23, 2023

(BTW, this issue's discovery led directly to the PR I wrote for Pulsar that took up most of my day yesterday.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants