sindresorhus/eslint-plugin-unicorn

`expiring-todo-comments` Broken in ESlint `9.15.0`

Closed this issue · 7 comments

unicorn/expiring-todo-comments Broken in ESlint 9.15.0. Works fine in 9.14.0.

TypeError: Error while loading rule 'unicorn/expiring-todo-comments': Cannot read properties of undefined (reading 'decoration')

The above error occurs when reading a file that has the following comment:

// Note: If none of the slotted options are selected, select all

Relevant portion of ESLint config is:

{
  files: ['**/*'],
  extends: [eslint.configs.recommended, unicorn.configs['flat/recommended']],
  linterOptions: {
    reportUnusedDisableDirectives: true,
  },
},

Relevant dependencies in package.json:

{
  "devDependencies": {
    "@eslint/js": "^9.15.0",
    "eslint": "^9.15.0",
    "eslint-plugin-unicorn": "^56.0.0",
  }
}

Might be related to eslint/eslint#19134

I can confirm, same error after updating to eslint 9.15

typescript-eslint was affected and does fix it, now we have to wait for this

They've fixed it in 8.15.0

Might be related to eslint/eslint#19134

ESLint team chalked this one up to an issue with typescript-eslint which just pushed an update to fix it on their end.

They've fixed it in 8.15.0

I updated all my deps and still have the same issue. Disabling unicorn avoids the error. So the issue persists in unicorn.

Might be related to eslint/eslint#19134

ESLint team chalked this one up to an issue with typescript-eslint which just pushed an update to fix it on their end.

They've fixed it in 8.15.0

I updated all my deps and still have the same issue. Disabling unicorn avoids the error. So the issue persists in unicorn.

Yeah I confirm, same error here
I have typescript-eslint 8.15.0 and still getting this error on "unicorn/expiring-todo-comments"

and "TypeError: Error while loading rule 'sonarjs/no-empty-function': Cannot read properties of undefined (reading 'allow')" (but it's not relevant for this thread)