[Pkg-javascript-devel] Bug#1010471: Bug#1010471: eslint: please move Recommends to Depends

Jonas Smedegaard jonas at jones.dk
Mon May 2 10:22:36 BST 2022


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.

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.


Hope that helps,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20220502/f5aa5e52/attachment.sig>


More information about the Pkg-javascript-devel mailing list