Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

requireCapitalizedConstructorsNew: New rule based on jshint newcap. #2047

Closed
wants to merge 1 commit into from

Conversation

AlexanderOMara
Copy link
Contributor

Added a new rule that behaves closer to the behavior of "newcap" in jshint.

Fixes #2046

Added a new rule that behaves closer to the behavior of "newcap" in jshint.

Fixes jscs-dev#2046
describe('rules/require-capitalized-constructors-new', function() {
var checker;

function baseCases() {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we need that, if tests covering used code-paths we good either way

Copy link
Member

Choose a reason for hiding this comment

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

Meaning that we could move those tests from the helper function and to the 'with true value' describe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So it's not necessary to run these tests on both the true and allExcept configurations? I based it on test/specs/rules/require-capitalized-constructors.js

Copy link
Member

Choose a reason for hiding this comment

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

I'd say no, for my taste, if we covered it, it should be good

@markelog markelog closed this in ef9ed5e Jan 25, 2016
hzoo pushed a commit to hzoo/node-jscs that referenced this pull request Jan 27, 2016
Valid
var a = new B();

Invalid
var d = E();

Added a new rule that behaves closer to the behavior of "newcap" in jshint

Fixes jscs-dev#2046
Closes jscs-devgh-2047
hzoo pushed a commit to hzoo/node-jscs that referenced this pull request Jan 27, 2016
Valid
var a = new B();

Invalid
var d = E();

Added a new rule that behaves closer to the behavior of "newcap" in jshint

Fixes jscs-dev#2046
Closes jscs-devgh-2047
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jscs "requireCapitalizedConstructors" and jshint "newcap" are different
2 participants