stable

Clone or download

Read-only

Make sure that all imported JS/TS dependencies are declared in package.json

This solves "request #13724: document does not import sprintf-js properly" where it was found that sprintf-js was not present in the package.json of the document plugin. The build was working due to the way Webpack do its modules resolution [0]. In this case the missing dependency was found in the root node_modules because one the Tuleap dev dependency also needs it (in fact it's needed by a package at depth 3 in the dependency tree). This unexpected resolution makes dependencies hard to track and can lead to subtle breakage that can also be hard to debug. In order to not find ourselves again in the same situation, a new ESLint plugin is added. Only the rule dedicated to find this issue is enabled but it comes with other nice rules that we may wish to use at some point. [0] https://webpack.js.org/configuration/resolve/#resolvemodules Change-Id: I8393ffd411504ee94e211345e430eaad32cc216d

Modified Files

Name
M .eslintrc.js +13 −3 Go to diff View file
M package-lock.json +101 −13 Go to diff View file
M package.json +2 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/karma.conf.js +1 −1 Go to diff View file
M plugins/agiledashboard/www/js/package-lock.json +15 −0 Go to diff View file
M plugins/agiledashboard/www/js/package.json +3 −0 Go to diff View file
M plugins/agiledashboard/www/js/planning-v2/karma.conf.js +1 −1 Go to diff View file
M plugins/document/scripts/package-lock.json +5 −0 Go to diff View file
M plugins/document/scripts/package.json +1 −0 Go to diff View file
M plugins/frs/www/js/angular/gulpfile.js +2 −2 Go to diff View file
M plugins/tracker/www/scripts/angular-artifact-modal/karma.conf.js +1 −1 Go to diff View file
M src/www/scripts/package-lock.json +878 −6 Go to diff View file
M src/www/scripts/package.json +5 −1 Go to diff View file
M src/www/themes/common/tlp/package-lock.json +10 −0 Go to diff View file
M src/www/themes/common/tlp/package.json +2 −0 Go to diff View file