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

key-spacing won't allow line break after colon #1407

Closed
jrencz opened this issue Oct 28, 2014 · 2 comments
Closed

key-spacing won't allow line break after colon #1407

jrencz opened this issue Oct 28, 2014 · 2 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@jrencz
Copy link
Contributor

jrencz commented Oct 28, 2014

Consider the following object literal

var myObjLiteral = {
    myVeryLongFunctionName: function myVeryLongFunctionName(firstLongArgument, secondLongArgument) {},
};

It may be that due to the indentation the only proper most reasonable way to preserve line length is to wrap like this:

var myObjLiteral = {
    myVeryLongFunctionName: 
        function myVeryLongFunctionName(firstLongArgument, secondLongArgument) {},
};

In this case error Extra space before value for key "myVeryLongFunctionName" key-spacing is thrown

@nzakas nzakas added bug ESLint is working incorrectly accepted There is consensus among the team that this change meets the criteria for inclusion rule Relates to ESLint's core rules labels Oct 28, 2014
@nzakas
Copy link
Member

nzakas commented Oct 28, 2014

Yeah, that's a bug.

@btmills
Copy link
Member

btmills commented Oct 28, 2014

Working on this.

btmills added a commit to btmills/eslint that referenced this issue Oct 28, 2014
@nzakas nzakas closed this as completed in 37033c4 Oct 29, 2014
nzakas added a commit that referenced this issue Oct 29, 2014
Fix: Allow line breaks in key-spacing rule (fixes #1407)
Holixus pushed a commit to Holixus/eslint that referenced this issue Feb 12, 2015
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

3 participants