Closed Bug 1211483 Opened 9 years ago Closed 8 years ago

`./mach eslint` should warn if `./mach eslint --setup` is not yet run, or just run it

Categories

(Firefox :: General, defect)

42 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mcomella, Assigned: miker)

Details

The error I received when I hadn't run `--setup` was a stack trace with:
 "Error: Cannot find module 'eslint-plugin-mozilla'"

Which is not intuitive.

Patrick, quick fix or mentorable?
Flags: needinfo?(pbrosset)
It might be cleaner just to run it – this would also cover the case where we need to upgrade the dependencies.
(In reply to Michael Comella (:mcomella) from comment #1)
> It might be cleaner just to run it – this would also cover the case where we
> need to upgrade the dependencies.
That's a good point.

(In reply to Michael Comella (:mcomella) from comment #0)
> The error I received when I hadn't run `--setup` was a stack trace with:
>  "Error: Cannot find module 'eslint-plugin-mozilla'"
> 
> Which is not intuitive.
> 
> Patrick, quick fix or mentorable?
Forwarding this to Mike who worked on bug 1203520
Flags: needinfo?(pbrosset) → needinfo?(mratcliffe)
Interesting... we are better to check if the plugin exists so we can do that.
Assignee: nobody → mratcliffe
Flags: needinfo?(mratcliffe)
Can you try again with the latest version and report any errors?
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #4)
> Can you try again with the latest version and report any errors?

Me? How can I unset the `mach eslint --setup` state to try this?
Flags: needinfo?(mratcliffe)
(In reply to Michael Comella (:mcomella) from comment #5)
> (In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #4)
> > Can you try again with the latest version and report any errors?
> 
> Me? How can I unset the `mach eslint --setup` state to try this?

You don't need to as it will uninstall and then reinstall everything it needs to. You just need to run mach eslint --setup again.
Flags: needinfo?(mratcliffe)
No errors after running:
 mach eslint --setup
 mach eslint mobile/android

Just to double-check we're on the same page, this bug was initially filed to solve the issue where I ran `mach eslint` without running `--setup` first and I received an unintuitive error.
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #4)
> Can you try again with the latest version and report any errors?

Per Mossop's firefox-dev post on 11/28, it sounds like nothing has changed here -- this is still an issue (for anyone who hasn't ever run ./mach eslint --setup)
Assignee: mratcliffe → nobody
Fairly sure this is now implemented - Running ./mach eslint without --setup complains if things aren't present and runs the setup version for me after confirmation.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Yup, implemented in bug 1270851.
Assignee: nobody → mratcliffe
You need to log in before you can comment on or make changes to this bug.