Skip to content

don't fail check-param-names on destructuring in arguments - fixes #90#92

Closed
AlexanderZeilmann wants to merge 2 commits intojscs-dev:masterfrom
AlexanderZeilmann:master
Closed

don't fail check-param-names on destructuring in arguments - fixes #90#92
AlexanderZeilmann wants to merge 2 commits intojscs-dev:masterfrom
AlexanderZeilmann:master

Conversation

@AlexanderZeilmann
Copy link
Copy Markdown
Contributor

Here is a first stab at fixing #90.

I had to create a new describe block in the tests, since the code which should be tested requires the esnext flag for jscs.

Let me know what you think :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you drop one empty line?

@qfox
Copy link
Copy Markdown
Member

qfox commented Apr 16, 2015

👍 I like it ;-) Thanks for contribution!

I don't like this part of code at all. But this PR is pretty fine.

@AlexanderZeilmann
Copy link
Copy Markdown
Contributor Author

Sorry for the delay, I was really busy :-/

I inserted/removed the lines. Furthermore I added support for fake parameter names, i.e. this example is now checked properly:

/**
 * My cool function.
 *
 * @param {Object} fakeName - An object.
 * @param {string} fakeName.prop1 - Property 1.
 * @param {string} fakeName.prop2 - Property 2.
 */
var fn = function ({prop1, prop2}) {
  // Do something with prop1 and prop2
}

@qfox
Copy link
Copy Markdown
Member

qfox commented May 3, 2015

Oh, wow. Looks great ;-)

I'm gonna merge this soon after some works.

@qfox qfox added this to the v1.0.0 milestone May 3, 2015
@qfox qfox closed this in e754b46 May 3, 2015
jdlrobson pushed a commit to jdlrobson/jscs-jsdoc that referenced this pull request Aug 21, 2015
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.

2 participants