eslint: Rule camelcase cannot detect between upper-camelcase and lower-camelcase when lint `property`.

What rule do you want to change?

camelcase

Does this change cause the rule to produce more or fewer warnings?

More warnings.

How will the change be implemented? (New option, new default behavior, etc.)?

New options.

{
    propertiesStyle: "upper" | "lower" | "all",
}

Please provide some example code that this change will affect:

This is bad code example.

const camel = {};
camel.UpperCamelcase = true;

This is good code example.

const camel = {};
camel.lowerCamelcase = true;

What does the rule currently do for this code?

All will be ok. The rule currently do not detect what type of camelcase is using for property.

What will the rule do after it’s changed?

There will be an option to configure upper-camelcase or lower-camelcase for property.

What’s more

I’m willing to fork and make a PR if my idea is acceptable. 😃

https://github.com/tinymins/eslint/tree/properties-style

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

Sorry that I got busy on my work and had a cold last week. I’m working on it now. @mcclowes