-
-
Notifications
You must be signed in to change notification settings - Fork 407
Support pre-release versions in expiring-todo-comments
rule
#435
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
Support pre-release versions in expiring-todo-comments
rule
#435
Conversation
Don't coerce valid semver tags on expiring-todo-comments
Can you update the docs to explicitly show that prerelease versions are supported? |
I would use a fixture instead. Integration tests are usually better. Like the one in the issue:
|
Sure I can do it later today. Just be clear I'd have to create a fixture repo and put on test/integration/test.js like the others right? |
I was thinking: Publish an empty package with a prerelease version, add it as a dev dependency here, and just add another test here: eslint-plugin-unicorn/test/expiring-todo-comments.js Lines 222 to 225 in 1bc47a0
|
Support pre-releases and build properly as of https://semver.org/
* Added a fixture package * Added some test cases to verify pre-relase spec comparison
@@ -50,6 +50,7 @@ | |||
"semver": "^6.3.0" | |||
}, | |||
"devDependencies": { | |||
"@lubien/fixture-beta-package": "^1.0.0-beta.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to mock one during test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I haven't heard anything of sort. Tho for me this is pretty much all I need since I could handle all known cases so far.
expiring-todo-comments
rule
Fixes #432
Refactor tryToCoerceVersion
Don't coerce valid semver tags on expiring-todo-comments.
I'm not sure where to test this. Should I export (
exports.tryToCoerceVersion
) the function and test along with the rule itself (test/expiring-todo-comments.js)? @sindresorhus any idea?