-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 node type changes [$10] #3763
Comments
Thanks for the issue! If you're reporting a bug, please be sure to include:
Requesting a new rule? Please see Proposing a New Rule for instructions. |
Sounds good. Are you interested in working on this? |
@nzakas already mostly complete 😃 will commit soon. |
@jonathanKingston Are you still working on this (Just checking)? |
Hey @jonathanKingston I saw you did it. Do you plan to create PR for this feature? |
Any progress on this one? |
I started in on this one - something I'm not sure of is what to do with the current exception options. From the rule docs:
If we're specifying different values of I think the JSON Schema would like something like this (apologies if it's not quite right - still learning this stuff): module.exports.schema = [
{
oneOf: [
{
{
enum: ["always", "never"]
},
{
type: "object",
properties: {
arraysInObjects: {
type: "boolean"
},
objectsInObjects: {
type: "boolean"
}
},
additionalProperties: false
}
},
{
type: "object",
properties: {
ObjectPattern: {
enum: ["always", "never"],
{
type: "object",
properties: {
arraysInObjects: {
type: "boolean"
},
objectsInObjects: {
type: "boolean"
}
}
additionalProperties: false
},
ObjectExpression: {
enum: ["always", "never"],
{
type: "object",
properties: {
arraysInObjects: {
type: "boolean"
},
objectsInObjects: {
type: "boolean"
}
},
additionalProperties: false
}
},
ImportDeclaration: {
enum: ["always", "never"]
},
ExportNamedDeclaration: {
enum: ["always", "never"],
{
type: "object",
properties: {
arraysInObjects: {
type: "boolean"
},
objectsInObjects: {
type: "boolean"
}
},
additionalProperties: false
}
}
},
additionalProperties: false
}
]
}
]; |
Is this issue resolved with #6223 ? |
No, I just referenced this issue from #6223. |
In that case, thoughts on my last comment? Not sure where to go from here |
Closing this issue as it has been open for more than 90 days and doesn't have anyone from the team or the community working on it. |
It appears common place to have object definitions as without spaces but import statements with spaces:
and
So I suggest adding in the following properties to this rule to allow granular control:
This would change the first option to be a default to those specific options. If they are not set, it will default to the first option.
There is a $10 open bounty on this issue. Add to the bounty at Bountysource.
The text was updated successfully, but these errors were encountered: