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

Rule: no-space-before-property #1086

Closed
puzrin opened this Issue Jul 13, 2014 · 16 comments

Comments

Projects
None yet
6 participants
@puzrin
Copy link
Contributor

puzrin commented Jul 13, 2014

If expression is inline, whitespace should not be allowed after dot or before square brackets.

valid:

foo[bar]

foo
  .bar()
  .baz()

foo.
  bar().
  baz()

invalid:

foo [bar]

foo. bar. baz
@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Jul 13, 2014

It would have to be a new rule.

@puzrin

This comment has been minimized.

Copy link
Contributor Author

puzrin commented Jul 13, 2014

Any suggestions about rule name and default state? I'll update title and description to reflect.

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Jul 13, 2014

Maybe no-space-before-property? We probably also want to check for bracket notation:

foo [bar]

@puzrin puzrin changed the title Rule: Warn on whitespace before inline props: `x. y` Rule: no-space-before-property Jul 13, 2014

@puzrin

This comment has been minimized.

Copy link
Contributor Author

puzrin commented Jul 13, 2014

Thanks. Updated.

@gyandeeps

This comment has been minimized.

Copy link
Member

gyandeeps commented May 22, 2015

@nzakas Based on the comments I think we are missing the enhancement label here. right?

@nzakas nzakas added the accepted label May 29, 2015

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented May 29, 2015

Possible overlaps #746

@scinos

This comment has been minimized.

Copy link

scinos commented Nov 25, 2015

Any plans to include this in a ESLint rule?

@nzakas nzakas added the help wanted label Nov 25, 2015

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Nov 25, 2015

@scinos we are looking for someone to volunteer. Interested?

@kaicataldo

This comment has been minimized.

Copy link
Member

kaicataldo commented Dec 5, 2015

I'd like to take a crack at this this week (have another issue in the pipeline as well)

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 5, 2015

Awesome, thank you

@kaicataldo

This comment has been minimized.

Copy link
Member

kaicataldo commented Dec 15, 2015

Ended up being busier than I anticipated, but I'm still interested in doing this. I'm not entirely sure what my schedule is going to look like with the upcoming holidays, so if someone else wants to try their hand please feel free and leave a note here. Don't want to hold anything up :)

Edit: I'll leave a note when I start too

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 15, 2015

Thanks @kaicataldo

@mysticatea

This comment has been minimized.

Copy link
Member

mysticatea commented Dec 16, 2015

BTW, is there a rule for spaces followed by a dot?

foo .bar;

If no, I prefer a rule like dot-spacing instead.
The rule is for spaces before and after a dot of MemberExpression.

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 16, 2015

@mysticatea I believe that is what is being proposed here.

@mysticatea

This comment has been minimized.

Copy link
Member

mysticatea commented Dec 18, 2015

Oh sorry. nevermind.

@kaicataldo

This comment has been minimized.

Copy link
Member

kaicataldo commented Dec 23, 2015

Starting on this tonight

kaicataldo added a commit to kaicataldo/eslint that referenced this issue Dec 27, 2015

kaicataldo added a commit to kaicataldo/eslint that referenced this issue Dec 28, 2015

kaicataldo added a commit to kaicataldo/eslint that referenced this issue Dec 28, 2015

kaicataldo added a commit to kaicataldo/eslint that referenced this issue Dec 28, 2015

kaicataldo added a commit to kaicataldo/eslint that referenced this issue Dec 28, 2015

@gyandeeps gyandeeps closed this in 4665256 Dec 28, 2015

gyandeeps added a commit that referenced this issue Dec 28, 2015

Merge pull request #4813 from kaicataldo/fixes1086
New: Add no-whitespace-before-property rule (fixes #1086)

@eslint eslint bot locked and limited conversation to collaborators Feb 7, 2018

@eslint eslint bot added the archived due to age label Feb 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.