Openbravo Issue Tracking System - POS2
View Issue Details
0045326POS2Corepublic2020-10-28 17:152021-01-18 13:21
jarmendariz 
jarmendariz 
urgentmajoralways
closedduplicate 
5
 
 
jarmendariz
No
0045326: Linting in BL files is not working
ESLint fails at linting javascript business logic files (those in module's app/ folder) with the following error message:

Failed to load config "airbnb-base" to extend from. Referenced from: /Users/.../openbravo/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/app/.eslintrc.json

Run the linter from the console.
In a module with BL files (posterminal for example):
- Run ../org.openbravo.client.kernel/jslint/jslint

The error message mentioned above should appear.
Also, IntelliJ IDE shows an ESLint related error message when opening a javascript file in the app/ folder.
Replace the following line in the .eslintrc.json template for app/ files:

{
  "extends": ["airbnb", ...]
}

and fix all configurations tracked by the VCS.
No tags attached.
depends on feature request 0045516 closed jarmendariz Openbravo ERP Upgrade ESLint and Jest to its latest version 
related to defect 0045315 closed jarmendariz POS2 Linter pre-commit hook is not watching for jsx files 
Issue History
2020-10-28 17:15jarmendarizNew Issue
2020-10-28 17:15jarmendarizAssigned To => Retail
2020-10-28 17:15jarmendarizTriggers an Emergency Pack => No
2020-10-29 08:31jarmendarizStatusnew => scheduled
2020-10-29 08:31jarmendarizAssigned ToRetail => jarmendariz
2020-11-25 12:12guilleaerRelationship addedrelated to 0045315
2020-11-25 12:13guilleaerNote Added: 0124614
2021-01-15 09:53jarmendarizRelationship addeddepends on 0045516
2021-01-18 13:21jarmendarizReview Assigned To => jarmendariz
2021-01-18 13:21jarmendarizNote Added: 0125529
2021-01-18 13:21jarmendarizStatusscheduled => closed
2021-01-18 13:21jarmendarizResolutionopen => duplicate

Notes
(0124614)
guilleaer   
2020-11-25 12:13   
This issue will be resolved as part of the task
nwp2_JslintMergeReact
(0125529)
jarmendariz   
2021-01-18 13:21   
This is fixed by 45516.
BL files will still use the airbnb-base config and core2 will include the airbnb package to be used for code with React.