Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while loading rule unicorn/expiring-todo-comments #479

Closed
momakes3 opened this issue Dec 17, 2019 · 6 comments · Fixed by #494
Closed

Error while loading rule unicorn/expiring-todo-comments #479

momakes3 opened this issue Dec 17, 2019 · 6 comments · Fixed by #494
Labels

Comments

@momakes3
Copy link

momakes3 commented Dec 17, 2019

ESLint: Error while loading rule 'unicorn/expiring-todo-comments': Invalid Version: null Occurred while linting

I keep getting it on every ESLint run in VS Code on any file that has a TODO comment with version. Wasn't like this before. Tried updating, no luck.

What else can I provide?

@sindresorhus
Copy link
Owner

// @lubien

@momakes3
Copy link
Author

momakes3 commented Dec 17, 2019

Update: Here's a GIF to demonstrate 😊 (notice the right bottom notifications, it's annoying!)
CleanShot 2019-12-17 at 14 44 51

@SimenB
Copy link

SimenB commented Dec 18, 2019

FWIW 12.1.0 works, >=13 has the error, #435 seems like the obvious candidate

@fisker
Copy link
Collaborator

fisker commented Jan 3, 2020

@momakes Can you test if #494 fixes your problem?

You can add it by

yarn add fisker/eslint-plugin-unicorn#fix-expiring-todo-comments

OR

npm i fisker/eslint-plugin-unicorn#fix-expiring-todo-comments

(not sure if npm version command is correct)

@SimenB
Copy link

SimenB commented Jan 5, 2020

@fisker works in my project 👍


Note that the underlying error is that monorepos aren't really supported for the module version checks. It doesn't detect a version for the packages which are not specified in the root package.json (seemingly). So in v12 it silently ignored it, v13 exploded with a TypeError and your PR puts it back to silently ignoring it. Which is better than what it is currently, but it's treating the symptom rather than the error.

EDIT: That's tracked in #403

@fisker
Copy link
Collaborator

fisker commented Jan 6, 2020

@SimenB Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants