javascript-style-guide icon indicating copy to clipboard operation
javascript-style-guide copied to clipboard

Allow variable '_id'

Open moog opened this issue 7 years ago • 2 comments
trafficstars

Context

We are using mongodb's _id identifier, but our linter rules do not support this.

Rule to allow underscore dangle on specific variables.

moog avatar Jul 23 '18 13:07 moog

@moog

We are using mongodb's _id identifier, but our linter rules do not support this.

Could you please give us more context regarding why this rule is not covered yet? :slightly_smiling_face:

devdrops avatar Jul 23 '18 15:07 devdrops

We can use the id identifier for mongodb documents. https://stackoverflow.com/questions/15724272/what-is-the-difference-between-id-and-id-in-mongoose I've used id in the code, and it worked like a charm :smile:

matheusvellone avatar Oct 28 '18 23:10 matheusvellone