Closed sidetrackedmind closed 1 year ago
The npm linter throws an error when it runs in the github action under: https://github.com/codeforpdx/opentransit-metrics/blob/master/.github/workflows/test.yml I disabled the workflow for now but it would be good to figure out the issue and fix it.
See this action as an example of the error: https://github.com/codeforpdx/opentransit-metrics/runs/7928966223?check_suite_focus=true
It can be recreated locally:
docker run opentransit/react-dev:latest npm run lint:check > opentransit-metrics@0.5.0 lint:check /app/frontend > eslint src --ext .jsx,.js /app/frontend/src/actions/index.js 347:1 error Delete `··` prettier/prettier 348:1 error Delete `··` prettier/prettier 349:3 error Delete `··` prettier/prettier 351:1 error Delete `··` prettier/prettier 352:35 error Insert `{` prettier/prettier 353:7 error Delete `{` prettier/prettier 355:30 error Insert `,` prettier/prettier 356:1 error Replace `······}·` with `····})` prettier/prettier 357:5 error Delete `)` prettier/prettier 360:7 error Unexpected var, use let or const instead no-var 360:58 error Insert `;` prettier/prettier 361:7 error Unexpected var, use let or const instead no-var 361:42 error Insert `;` prettier/prettier 362:19 error Insert `;` prettier/prettier 363:36 error Insert `;` prettier/prettier 364:16 error Insert `;` prettier/prettier 365:17 error Insert `;` prettier/prettier 366:61 error Insert `;` prettier/prettier 368:1 error Replace `····⏎··};` with `}` prettier/prettier 375:5 warning Unexpected console statement no-console 601:5 warning Unexpected console statement no-console /app/frontend/src/components/RouteSummary.jsx 8:1 error `@material-ui/core/Button` import should occur before import of `./SummaryRow` import/order 50:1 error Delete `⏎` prettier/prettier 55:5 warning Unexpected console statement no-console 217:7 error Insert `··` prettier/prettier 218:7 error Insert `··` prettier/prettier 219:1 error Replace `······` with `········` prettier/prettier 220:1 error Insert `··` prettier/prettier 222:1 error Insert `··` prettier/prettier ✖ 29 problems (26 errors, 3 warnings) 26 errors and 0 warnings potentially fixable with the `--fix` option. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opentransit-metrics@0.5.0 lint:check: `eslint src --ext .jsx,.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the opentransit-metrics@0.5.0 lint:check 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! /root/.npm/_logs/2022-08-26T03_50_00_624Z-debug.log
The npm linter throws an error when it runs in the github action under: https://github.com/codeforpdx/opentransit-metrics/blob/master/.github/workflows/test.yml I disabled the workflow for now but it would be good to figure out the issue and fix it.
See this action as an example of the error: https://github.com/codeforpdx/opentransit-metrics/runs/7928966223?check_suite_focus=true
It can be recreated locally: