问题描述
我正在用React js编码网站。当我推送到github时,我一直遇到这个错误。
Run npm run lint npm run lint shell: /bin/bash -e {0} bs-todo@0.1.0 lint /home/runner/work/A1-Flickit/A1-Flickit eslint src/**/*.{js,jsx} /home/runner/work/A1-Flickit/A1-Flickit/src/components/Form.js ##[error] 130:57 error Replace `Send` with `⏎················Send⏎··············` prettier/prettier ✖ 1 problem (1 error,0 warnings) 1 error and 0 warnings potentially fixable with the `--fix` option. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bs-todo@0.1.0 lint: `eslint src/**/*.{js,jsx}` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bs-todo@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/runner/.npm/_logs/2020-08-17T02_58_10_523Z-debug.log ##[error]Process completed with exit code 1.
解决方法
您正在运行LINT(可能您的应用已配置了eslint),并且当代码超出规则时会抛出错误。
尝试在 130:57 上解决表单组件上的问题: 错误替换发送⏎·················发送⏎··············
或者,您也可以打开package.json,并添加-fix选项来更改Lint脚本。