sindresorhus / del

Delete files and directories
MIT License
1.33k stars 66 forks source link

Build is failing in CI #156

Closed marchuffnagle closed 1 year ago

marchuffnagle commented 1 year ago

The main branch is failing with this error:

$ npm test

> del@7.0.0 test /home/x/src/del
> xo && ava && tsd

TypeError: Cannot read property 'getAllComments' of undefined
Occurred while linting /home/x/src/del/index.d.ts:1
Rule: "unicorn/expiring-todo-comments"
    at Object.Program (/home/x/src/del/node_modules/eslint/lib/rules/no-warning-comments.js:193:45)
    at Program (/home/x/src/del/node_modules/eslint-plugin-unicorn/rules/expiring-todo-comments.js:511:10)
    at /home/x/src/del/node_modules/eslint-plugin-unicorn/rules/utils/rule.js:39:18
    at ruleErrorHandler (/home/x/src/del/node_modules/eslint/lib/linter/linter.js:1050:28)
    at /home/x/src/del/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/x/src/del/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/x/src/del/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/x/src/del/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/x/src/del/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
npm ERR! Test failed.  See above for more details.
marchuffnagle commented 1 year ago

Seems to be related to https://github.com/xojs/xo/issues/718

marchuffnagle commented 1 year ago

https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2076 seems to indicate that upgrading to eslint-plugin-unicorn v46.0.1 should fix the problem. Annoyingly, it's still failing after I update to that newer version.

I also tried updating the version of xo to 0.55.0, which is supposed to fix the issue. That raises the minimum required node version to 16, though. This library currently requires v14. Upgrading xo causes failures for new reasons:

$ npm test

> del@7.0.0 test /home/x/src/del
> xo && ava && tsd

file:///home/x/src/del/node_modules/xo/node_modules/meow/build/index.js:29
        description &&= help ? `\n  ${description}\n` : `\n${description}`;
                    ^^^

SyntaxError: Unexpected token '&&='
    at Loader.moduleStrategy (internal/modules/esm/translators.js:149:18)
npm ERR! Test failed.  See above for more details.