Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0046154Openbravo ERPA. Platformpublic2021-03-25 17:512021-03-26 13:41
AugustoMauch 
platform 
normalmajorhave not tried
closedfixed 
5
 
PR21Q2 
Core
No
0046154: Eslint should ignore web-jspack folder if org.openbravo.core2 is not installed.
Now that we support dual modules it is possible that a module contains code for both the legacy and the new version of applications. When installed in environments where the new version of the application is not available, code in web-jspack should not be taking into account.

This is already true in most cases (i.e. jest tests), but eslint is still linting files in that folder. They must be ignored because those files might reference code from the new version of app, and that would result in eslint errors.
In a retail environment where org.openbravo.core2 is available, install this module [1] and then run eslint:

./modules/org.openbravo.client.kernel/jslint/jslint

There should be no error, but instead it will fail with the following message:

Oops! Something went wrong! :(


ESLint: 7.17.0

ESLint couldn't find the config "airbnb" to extend from. Please check that the name of the config is correct.

The config "airbnb" was referenced from the config file in "/home/openbravo/openbravoERP/pos1modules/openbravo

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.trainingmode/ [^]
No tags attached.
Issue History
2021-03-25 17:51AugustoMauchNew Issue
2021-03-25 17:51AugustoMauchAssigned To => platform
2021-03-25 17:51AugustoMauchModules => Core
2021-03-25 17:51AugustoMauchTriggers an Emergency Pack => No
2021-03-25 21:30hgbotNote Added: 0126934
2021-03-26 13:41hgbotResolutionopen => fixed
2021-03-26 13:41hgbotStatusnew => closed
2021-03-26 13:41hgbotFixed in Version => PR21Q2
2021-03-26 13:41hgbotNote Added: 0126949
2021-03-26 13:41hgbotNote Added: 0126950

Notes
(0126934)
hgbot   
2021-03-25 21:30   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/338 [^]
(0126949)
hgbot   
2021-03-26 13:41   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: f29b39b6dbf0a2b135cc94dc7aedea499c2aff48
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-03-26T13:40:29+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f29b39b6dbf0a2b135cc94dc7aedea499c2aff48 [^]

Fixes ISSUE-46154: eslint ignores web-jspack if org.openbravo.core2 is not installed

This is needed because files under web-jspack may potentially reference components from core2 and pos, and
those dependencies are not mandatory. Now all files under web-jspack are ignored if org.openbravo.core2
is not installed.

Also adds -no-error-on-unmatched-pattern to prevent errors if there are no files to lint after excluding
those under the web-jspack folder.

---
M modules/org.openbravo.client.kernel/jslint/jslint
---
(0126950)
hgbot   
2021-03-26 13:41   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/338 [^]