firefox-devtools / devtools-core

:rocket: Packages for Firefox DevTools
142 stars 97 forks source link

Eslint-ing in Sublime text stops working after yarn install in netmonitor #509

Open ruturajv opened 6 years ago

ruturajv commented 6 years ago

@jasonLaster

I'm not really sure where to file this bug, but while developing netmonitor using the yarn based approach. The eslinting capability of sublime text is lost.

STR:

  1. cd gecko-dev/devtools/client/netmonitor
  2. yarn install
  3. Open Sublime text pre-configured with http://docs.firefox-dev.tools/contributing/eslint.html
  4. Try adding a JS error

sublime text's linter fails to lint it.

If I remove node_modules from gecko-dev/devtools/client/netmonitor directory, the linting is back if I restart sublime text

juliandescottes commented 6 years ago

For the record, we have the same issue with the inspector.

When I investigated this, I believe I found issues on https://github.com/roadhump/SublimeLinter-eslint that explained that by design it was meant to give a higher priority to local eslint installs. But I can't find it now, sorry. Didn't seem like it was easy to fix with configuration though.

ruturajv commented 6 years ago

So how do most of the devs work around it? Code ..., Then Just ./mach eslint filename ? That's what I do.

juliandescottes commented 6 years ago

sorry missed the question. For the inspector, the launchpad workflow was broken a while ago so we're not really using it anymore.

For me, not having eslint work in my editor was a bit of a dealbreaker, so I was just deleting node_modules as soon as I was not working on Launchpad.

ruturajv commented 6 years ago

Hey Julian, But typically when I'm working on a launchpad based project (ie. netmonitor) I want the node_modules to be there, else I won't be able to do a yarn start. Yes, its a big dealbraker that linter doesn't work :(