-
Notifications
You must be signed in to change notification settings - Fork 510
Conversation
f7eabe3
to
b3544b2
Compare
"preset": "jquery", | ||
"requireSpacesInsideParentheses": { | ||
"all": true, | ||
"except": [ "{", "}" ] |
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.
Correct one is:
"except": [ "{", "}", "[", "]", "function" ]
And as a said feature, requireSpacesInsideParentheses
should understand quotes, so case like this:
foo("bar")
would be acceptable.
@rwaldron you might like this :-) |
d4a7f0b
to
b018dee
Compare
b018dee
to
437f9b6
Compare
Oh failing because of |
5c41f20
to
061ce97
Compare
We can't land this, until #1069 (comment) is all done, specifically until foo("bar") case is handled, would like to take a hit on this one? #836 |
Yeah I was just updating the PRs since I forgot to update 2 files |
Yeah I'l take a look |
What's the status on this PR? Still held up? |
Yeah on #836. Need an exception for ", ', ` |
Ok I can add
That would be #651 - |
Getting an error with // Good
function foo() {
let foo;
if ( condition ) {
let bar = "";
}
} |
I was thinking we should include jsdoc rules
|
Ok updating with "requireSpacesInsideParentheses": {
"all": true,
"ignoreParenthesizedExpression": true,
"except": [ "\"" ]
}, |
ce6a71a
to
5892786
Compare
What about |
Getting Illegal space after opening grouping parenthesis at 1.js :
208 |
209 | Ctor.prototype.setFoo = function( val ) {
210 | return ( this.foo = val );
--------------------^
211 | };
212 |
Illegal space before closing grouping parenthesis at 1.js :
208 |
209 | Ctor.prototype.setFoo = function( val ) {
210 | return ( this.foo = val );
-----------------------------------^
211 | };
212 | for disallowSpacesInsideParenthesizedExpression - adding validatecomment |
5892786
to
7238289
Compare
:-( |
It seems we all good here? |
Yeah only |
It was kind of annoying to depend on a preset (jquery) though - since if you update the jquery preset, then the tests will fail (validateIdentation errors in that case) so I just removed that? |
Do what you think is right :-). |
How we doing here? |
Can merge - there's only some rules we haven't implemented yet. |
I guess we did catch the spirit of this preset, we can take care the details afterwards |
So 👍 for this? |
LGTM |
Ok finally merged - my longest lasting PR! 🎉 |
#1065. WIP
indentation
quotes?
"validateQuoteMarks": { "mark": "\"", "escape": true }
,foo("bar")
requireSpacesInsideParentheses
: Single argument string literal, no spaceif ( !("foo" in obj) ) {
requireSpacesInsideParentheses
: Inner grouping parens, no spacefoo([ "alpha", "beta" ]);
"requireSpacesInsideParentheses": { "except": [ "[", "]" ] }
(function( global ) {})()
"requireSpacesInsideParentheses": { "except": ["function"] }
foo({ a: "alpha" });
"requireSpacesInsideParentheses": { "except": [ "{", "}" ] }
square( 10 );
"disallowSpacesInCallExpression": true
// statements
"requireSpaceAfterLineComment": { "allExcept": ["#", "="] }
"disallowMultipleLineBreaks": null
var, const, let statements should always be in the beginning of their respective scope
requireVarDeclFirst
name of regex: rDesc
End of line comments are prohibited!
validateCommentPosition
var factorial = function factorial( number ) {
avoid switch if possible
disallowNodeTypes: ["SwitchStatement"]
early returns
requireEarlyReturn