I am currently utilizing React with Typescript. I have configured eslint
locally to treat unused variables as a warning.
Oddly enough, when I execute npm run build
on my local machine, it works perfectly fine. However, in Gitlab CI, I am encountering the following error:
npm run build
> [email protected] build
> react-scripts build
Creating an optimized production build...
Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.
Failed to compile.
[eslint]
src/common/components/MAppBar/MAppBar.tsx
Line 4:8: 'Divider' is defined but never used no-unused-vars
Line 4:8: 'Divider' is defined but never used @typescript-eslint/no-unused-vars
If you wish to take a look at the Gitlab repository in question, you can find it here. The configurations for .eslintrc.js
and .gitlab-ci.yml
seem correct to me.
How can I instruct Gitlab CI to overlook this warning?
Note: My intention is to build the application to host it on Gitlab pages