sindresorhus / eslint-plugin-unicorn

More than 100 powerful ESLint rules
MIT License
4.29k stars 368 forks source link

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

Open Lalem001 opened 2 hours ago

Lalem001 commented 2 hours ago

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,
  },
},
Lalem001 commented 2 hours ago

Relevant dependencies in package.json:


{
  "devDependencies": {
    "@eslint/js": "^9.15.0",
    "eslint": "^9.15.0",
    "eslint-plugin-unicorn": "^56.0.0",
  }
}
marcalexiei commented 2 hours ago

Might be related to https://github.com/eslint/eslint/issues/19134