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

strict JSDoc type linting #6

Draft
wants to merge 16 commits into
base: dev
Choose a base branch
from
Draft

strict JSDoc type linting #6

wants to merge 16 commits into from

Conversation

brodybits
Copy link
Owner

@brodybits brodybits commented Nov 1, 2019

Updates to support strict JSDoc type linting

Note that there is a quick workaround hack in test/program-helper.spec.js. TODO item is to update lib/program-helper.js to export the helper object with proper typing. (Alternative would be to add a .d.ts file, which seems to be common practice but I think it is not 100% ideal.)

TODO items:

@brodybits brodybits self-assigned this Nov 1, 2019
@brodybits
Copy link
Owner Author

/cc @rbiggs

@@ -4,6 +4,8 @@ var expect = require('chai').expect,


describe('program-helper', function () {
// FUTURE TODO DEFINE EXPLICITLY in lib/program-helper.js:
/** @type {Record<string, Function>} */
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this workaround hack should be removed, if possible.

@@ -20,11 +20,13 @@ function error() {

/**
* Resolve file globs based in command line or tsconfig.json file.
* @returns {Array}
* May throw an error.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use JSDoc @throws comment here, and check for other places where this may be needed

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

Successfully merging this pull request may close these issues.

None yet

1 participant