Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Continuous integration 在circleci中构建react应用程序时,如何使eslint工作?_Continuous Integration_Create React App_Eslint_Circleci - Fatal编程技术网

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

Continuous integration 在circleci中构建react应用程序时,如何使eslint工作?,continuous-integration,create-react-app,eslint,circleci,Continuous Integration,Create React App,Eslint,Circleci,我在我的个人项目上配置了eslint,以允许console.log作为警告而不是错误,因此在本地我的应用程序上编译成功 当我在本地运行npm运行build时 Creating an optimized production build... Compiled with warnings. src/components/ReduxName/ReduxName.tsx Line 12:3: Unexpected console statement no-console Search fo

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

当我在本地运行
npm运行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中不是警告来修复它,并解决了问题