linagora / esn-frontend-common-libs

Common ground for OpenPaaS frontend (https://open-paas.org)
Other
4 stars 12 forks source link

fix and update `eslint-plugin-import` error #194

Closed fabienmoyon closed 2 years ago

fabienmoyon commented 3 years ago

First step

we need to fix the eslint-plugin-import version to 2.22.0 because in higher version, eslint-plugin-import change the way import are done and break linters.

Need to done on each SPA :

Second step

Updgade the eslint-plugin-import version to 2.23.0 or higher and fix import errors :

...

/var/jenkins_home/workspace/esn-frontend-inbox_PR-450/src/require-angular-injections.js
  1:28  error  Unexpected use of file extension "js" for "esn-frontend-common-libs/src/require-angular-injections.js"  import/extensions

/var/jenkins_home/workspace/esn-frontend-inbox_PR-450/webpack.dev.js
  2:25  error  Unexpected use of file extension "js" for "./webpack.commons.js"  import/extensions

/var/jenkins_home/workspace/esn-frontend-inbox_PR-450/webpack.prod.js
  6:25  error  Unexpected use of file extension "js" for "./webpack.commons.js"  import/extensions

/var/jenkins_home/workspace/esn-frontend-inbox_PR-450/webpack.test.js
  4:25  error  Unexpected use of file extension "js" for "./webpack.commons.js"  import/extensions

✖ 387 problems (387 errors, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! esn-frontend-inbox@0.1.0 lint: `eslint src test webpack.*.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the esn-frontend-inbox@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2021-05-18T13_49_59_581Z-debug.log
script returned exit code 1