在 circleci 中构建反应应用程序时,如何使 eslint 工作?

How do i make eslint to work when building a react application in circleci?

我在我的个人项目上配置 eslint 以允许 console.log 成为警告而不是错误,因此在本地我的应用程序编译成功。

当我在本地运行npm run build

Creating an optimized production build...
Compiled with warnings.

src/components/ReduxName/ReduxName.tsx
  Line 12:3:  Unexpected console statement  no-console

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

很好,一切正常。 但是当我 运行 在 circleci

Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

src/components/ReduxName/ReduxName.tsx
  Line 12:3:  Unexpected console statement  no-console

circleci 似乎无法识别我的 eslint 设置??? 知道如何度过难关吗?

原来问题就在眼前

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

警告被视为 CI 上的错误,当然我的应用程序无法编译。 我通过专门使 console.log 不是 eslint 中的警告来修复它,问题已解决。