Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0047890Openbravo ERPA. Platformpublic2021-10-20 09:372022-02-01 08:07
jarmendariz 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
Core
No
0047890: Upgrade ESLint to version 8.x.x
Recently a new major version of ESLint have been published. Amont many improvements, bugfixes, there are a number of breaking changes listed here https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0 [^]

Upgrade ESLint and related plugins to their latest version and notice the new errors that appear when running the jslint script.

At the moment of writing, running this script in a POS2 environment the following errors appears:

- Most modules has errors related to tests (jest/prefer-to-be, jest/expect-expect, jest/valid-title)

- POS2 module shows this error message in several files:

Parsing error: Must use import to load ES Module: /home/openbravo/Projects/pos2/openbravo/node_modules/eslint/node_modules/eslint-scope/lib/definition.js
require() of ES modules is not supported.
require() of /home/openbravo/Projects/pos2/openbravo/node_modules/eslint/node_modules/eslint-scope/lib/definition.js from /home/openbravo/Projects/pos2/openbravo/node_modules/babel-eslint/lib/require-from-eslint.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename definition.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/openbravo/Projects/pos2/openbravo/node_modules/eslint/node_modules/eslint-scope/package.json

- The following error appears in core2:

Error: Rules with suggestions must set the `meta.hasSuggestions` property to `true`.
Occurred while linting /home/openbravo/Projects/pos2/openbravo/modules/org.openbravo.core2/web-jspack/org.openbravo.core2/src/components/BaseKeymap/stories/BaseKeymap.stories.jsx:142
Rule: "react-hooks/exhaustive-deps"
No tags attached.
Issue History
2021-10-20 09:37jarmendarizNew Issue
2021-10-20 09:37jarmendarizAssigned To => platform
2021-10-20 09:37jarmendarizModules => Core
2021-10-20 09:37jarmendarizTriggers an Emergency Pack => No
2022-02-01 08:07alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.