CamelCase option to allow snake_case in object literals
See original GitHub issueThere are situations where third-party code or services are configured by calling a function with an object literal. Those objects are flagged the camelCase rule:
var snakes = require('somesnakelib'); // not my code
snakes({snake_prop: true}); // ESLint: "Identifier 'snake_prop' is not in camel case."
JSCS dealt with this by adding an ignoreProperties
option to their CamelCase rule. I like enforcing names and would rather not disable the CamelCase rule to use code that I don’t control without errors.
This was touched on in #656, #672, #674 and #1550, but object literals are still being flagged.
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
What is the standard naming convention of properties in a ...
What is the standard convention naming for property inside object? camelCase. or. snake_case?
Read more >Transform Mapped Types from Snake_ to CamelCase in ...
Let's look a little deeper at the solution. We have created a new helper type called SnakeToCamelCase to re-map keys of a property...
Read more >Converting Snake Case to Camel Case Object Keys with ...
Our first stop is simply converting a string to camel case. This actually will accept either snake or kebab case strings and convert...
Read more >naming-convention | typescript-eslint
This option allows you to have a bit more finer-grained control over identifiers, letting you ban (or force) certain patterns and substrings. Accepts...
Read more >Functions to Convert objects with snake_case keys to ... - Reddit
Functions to Convert objects with snake_case keys to camelCase ones. With the new string literal types has anyone done this yet as I ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nzakas any reason a commit was merged but without the “nonmethods” option?
@nzakas any updates on this?
I have the code below yet I’m still getting an error.
I’m using @sindresorhus’s xo linter.