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

"object-curly-spacing" options don't appear to do anything #2902

Closed
benoneal opened this issue Jul 2, 2015 · 3 comments
Closed

"object-curly-spacing" options don't appear to do anything #2902

benoneal opened this issue Jul 2, 2015 · 3 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon

Comments

@benoneal
Copy link

benoneal commented Jul 2, 2015

Using v0.24 with this rule in my .eslintrc file

"object-curly-spacing": [1, "always", {
      "objectsInObjects": false,
      "arraysInObjects": false
}]

And getting this error:
warning A space is required before '}' object-curly-spacing
Regardless of whether or not the options are set to true or false

@ilyavolodin
Copy link
Member

This is working as intended (at least without seeing your code). You set the first option to "always" that means always require space around curly braces. The other options just add exceptions to when you have nested object or an array inside an object.

@ilyavolodin ilyavolodin added the triage An ESLint team member will look at this issue soon label Jul 2, 2015
@benoneal
Copy link
Author

benoneal commented Jul 2, 2015

Sorry, it's not working as I expect. Here's the code it complains about:

        { series: [
          { date: 1, calculatedValue: 4 },
          { date: 2, calculatedValue: 6 },
          { date: 3, calculatedValue: 11 },
          { date: 4, calculatedValue: 2 },
          { date: 5, calculatedValue: 4 },
          { date: 6, calculatedValue: 23 }
        ]} // this is the line it complains about, regardless if options are set to 'true' or 'false'

@benoneal
Copy link
Author

benoneal commented Jul 3, 2015

The problem was that I was using gulp-eslint, which used v23 of eslint. Updating to the latest version of gulp-eslint fixed this issue.

@benoneal benoneal closed this as completed Jul 3, 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
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

2 participants