<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 2 mai 2022 à 11:24, Jonas Smedegaard <<a href="mailto:jonas@jones.dk">jonas@jones.dk</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">tags -1 wontfix<br>
<br>
Quoting Jérémy Lal (2022-05-02 09:50:54)<br>
> I was trying to fix "enigmail" FTBFS, and discovered that it was <br>
> simply missing all the packages that "eslint" recommends.<br>
> <br>
> enigmail<br>
> Build-Depends:<br>
>  eslint <!nocheck>,<br>
>  node-chalk <!nocheck>,<br>
>  node-strip-ansi <!nocheck>,<br>
>  node-text-table <!nocheck><br>
> <br>
> Those three packages are not explicitely called by enigmail's eslintrc <br>
> config: they should just be in eslint Depends, because they are <br>
> required to make eslint work.<br>
<br>
Those are not _always_ needed for eslint, only _often_ which is the <br>
exact purpose of "Recommends.</blockquote><div><br></div><div>It also breaks separation of concerns and will lead to an unmaintainable mess,</div><div>if applied globally.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Please include those recommended packages as build-dependencies, or <br>
patch/override configuration to not use them: They are related to how <br>
eslint outputs information, and since ideally packaging should be <br>
verbose/terse depending on build flags you would want to manage such <br>
configuration anyway. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I commonly add something like this near the top of the rules file:<br>
<br>
ESLINT = NO_COLOR=1 eslint<br>
JEST = jest --color=false<br>
MOCHA = NO_COLOR=1 mocha --no-timeout --no-color<br>
# normalize output with TAP where possible unless terse requested<br>
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))<br>
ESLINT += --format tap<br>
MOCHA += --reporter tap<br>
else<br>
ESLINT += --format unix<br>
MOCHA += --reporter dot<br>
endif<br>
<br>
<br>
...and then call $(ESLINT)/$(JEST)/$(MOCHA) in target rules.<br></blockquote><div><br></div><div>Right, though implementing "terse" is another matter.</div><div><br></div><div>Instead of making other packages know about eslint internals,</div><div>wouldn't it be simpler to make eslint default to a reporter that "just works" ?</div><div><br></div><div>Currently enigmail just naively calls "eslint --quiet", and its .eslintrc are innocent,</div><div>they don't select a particular output.</div><div><br></div><div>I stand by saying as it is, putting those packages:</div><div>node-chalk</div><div>node-strip-ansi</div><div>node-text-table</div><div>in Recommends just breaks the default functionality of eslint.</div><div><br></div><div>Jérémy</div><div><br></div><div><br></div></div></div>