Onto-Med / top-frontend

JavaScript based frontend of the TOP Framework
MIT License
0 stars 1 forks source link

Enable eslint cache to speed up `yarn lint` #341

Closed ChristophB closed 9 months ago

ChristophB commented 9 months ago

yarn lint will automatically use ESLint cache and store it to node_modules/.cache/eslint-webpack-plugin/.eslintcache.

KonradHoeffner commented 9 months ago

Couldn't test it in this repository due to #340 but I rebased a new branch in my fork on this PR and it is indeed much faster now. However I get the following error, do you get this too?

top-frontend$ yarn lint                                                                                                                                  test
yarn run v1.22.21
$ eslint --cache --cache-location node_modules/.cache/eslint-webpack-plugin/.eslintcache --ext .js,.ts,.vue ./

/home/konrad/projekte/top/modules/top-frontend/quasar.conf.js
  12:7  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
ChristophB commented 9 months ago

However I get the following error, do you get this too?

Yes, that somehow slipped through.

ChristophB commented 9 months ago

Somehow I cannot reproduce it anymore after rebuilding my dev environment.

KonradHoeffner commented 9 months ago

Maybe it only occurs with specific Node versions? My node --version is 21.6.2.

ChristophB commented 9 months ago

Maybe it only occurs with specific Node versions? My node --version is 21.6.2.

I am also on 21.6.2

KonradHoeffner commented 9 months ago

I'm trying it inside a Docker container now with the main repository and it works without an error, so it looks like this is an error only with my installation.

KonradHoeffner commented 9 months ago

In the Dockerfile, yarn global add @quasar/cli is before the arg statement and on my local machine outside of Docker, that statement generates the error, so maybe the environment variable isn't allowed to be set before this step?

ChristophB commented 9 months ago

In the Dockerfile, yarn global add @quasar/cli is before the arg statement and on my local machine outside of Docker, that statement generates the error, so maybe the environment variable isn't allowed to be set before this step?

Are you referring to https://github.com/Onto-Med/top-frontend/issues/340?

KonradHoeffner commented 9 months ago

Yes, the problem is that #340 prevents me from verifying this PR as I'm not sure if the two are connected.

KonradHoeffner commented 9 months ago

I'm trying it at another machine so that I get a separated view of the two issues.

ChristophB commented 9 months ago

I don't think the order of these lines is important, because at this stage no .npmrc has been copied into the image.