[Pkg-javascript-devel] Bug#1010471: Bug#1010471: eslint: please move Recommends to Depends
Jérémy Lal
kapouer at melix.org
Mon May 2 10:45:36 BST 2022
Le lun. 2 mai 2022 à 11:24, Jonas Smedegaard <jonas at jones.dk> a écrit :
> tags -1 wontfix
>
> Quoting Jérémy Lal (2022-05-02 09:50:54)
> > I was trying to fix "enigmail" FTBFS, and discovered that it was
> > simply missing all the packages that "eslint" recommends.
> >
> > enigmail
> > Build-Depends:
> > eslint <!nocheck>,
> > node-chalk <!nocheck>,
> > node-strip-ansi <!nocheck>,
> > node-text-table <!nocheck>
> >
> > Those three packages are not explicitely called by enigmail's eslintrc
> > config: they should just be in eslint Depends, because they are
> > required to make eslint work.
>
> Those are not _always_ needed for eslint, only _often_ which is the
> exact purpose of "Recommends.
It also breaks separation of concerns and will lead to an unmaintainable
mess,
if applied globally.
Please include those recommended packages as build-dependencies, or
> patch/override configuration to not use them: They are related to how
> eslint outputs information, and since ideally packaging should be
> verbose/terse depending on build flags you would want to manage such
> configuration anyway.
> I commonly add something like this near the top of the rules file:
>
> ESLINT = NO_COLOR=1 eslint
> JEST = jest --color=false
> MOCHA = NO_COLOR=1 mocha --no-timeout --no-color
> # normalize output with TAP where possible unless terse requested
> ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
> ESLINT += --format tap
> MOCHA += --reporter tap
> else
> ESLINT += --format unix
> MOCHA += --reporter dot
> endif
>
>
> ...and then call $(ESLINT)/$(JEST)/$(MOCHA) in target rules.
>
Right, though implementing "terse" is another matter.
Instead of making other packages know about eslint internals,
wouldn't it be simpler to make eslint default to a reporter that "just
works" ?
Currently enigmail just naively calls "eslint --quiet", and its .eslintrc
are innocent,
they don't select a particular output.
I stand by saying as it is, putting those packages:
node-chalk
node-strip-ansi
node-text-table
in Recommends just breaks the default functionality of eslint.
Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20220502/e10a8b91/attachment.htm>
More information about the Pkg-javascript-devel
mailing list