Skip to content

v10.3.0-11.2.0 are broken due to missing dependency escape-regex-string #314

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

Closed
pgoldrbx opened this issue Jul 6, 2019 · 3 comments
Closed
Labels

Comments

@pgoldrbx
Copy link

pgoldrbx commented Jul 6, 2019

#302 introduced dependency escape-regex-string for parsing @example tags. However this package was added to devDependencies instead of to the package dependencies. As a result, all project development and tests are passing but the package fails for downstream consumers.

This was first released in version 10.3.0 and persists still in the current release v11.2.0

Error: Failed to load plugin 'jsdoc' declared in '--config': Cannot find module 'escape-regex-string'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/pgold/dev/autopilot-server/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js:10:49)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
pgoldrbx referenced this issue Jul 6, 2019
…r messages when suggesting tags to reject or replace (#302)

* feat(check-tag-names): allow rejecting normally valid tag names and/or providing custom error messages when suggesting tags to reject or replace (fixes #108)

Reporting normally valid tags may be of interest for tags like `@todo`. This is implemented by allowing the user to set targeted `tagNamePreference` tags to `false` or to an object with only a `message` and no `replacement`

Custom messages for `check-tag-names` are implemented by allowing the user to set  targeted `tagNamePreference` tags to an object with `message` and `replacement` (mirroring `preferredTypes` behavior). Note that for other rules leveraging `tagNamePreference` (via `utils.getPreferredTagName`) to find the user's preferred tag name, the `replacement` will be used in the likes of error messages but not the `message`.

Also, for various (param, return, and description-related) rules which have used `tagNamePreference` (via the `utils.getPreferredTagName` utility), report to user if they have blocked (probably inadvertently) and not indicated a replacement for the relevant tag needed by the rule in the `tagNamePreference` setting.

Also, ensure `require-param-name` and `check-examples` report preferred tag name (not necessarily `param` or `example`, respectively) and err if `example` is a rejected tag
@brettz9
Copy link
Collaborator

brettz9 commented Jul 6, 2019

Ugh, sorry about that... Too used to Rollup routines pulling it all together (and linting rules to complain about it). Plan to push out a fix shortly.

@gajus
Copy link
Owner

gajus commented Jul 6, 2019

🎉 This issue has been resolved in version 11.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Jul 6, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jul 7, 2019
* master:
  docs: correct docs
  refactor: change option extraction codes
  refactor: leverage `settings` property from `iterateJsdoc.js` for consistent settings access
  docs: update docs
  feat(`require-example`): move settings to options
  feat(`require-jsdoc`): move settings to options
  feat(`valid-types`): move settings to options
  feat(`require-returns`): move settings to options
  fix(`check-examples`): make `escape-regex-string` a dependency, as it should have been (fixes gajus#314)

# Conflicts:
#	README.md
#	src/rules/validTypes.js
#	test/rules/assertions/validTypes.js
@gajus
Copy link
Owner

gajus commented Sep 1, 2019

🎉 This issue has been resolved in version 15.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants