Open gurpreetatwal opened 4 years ago
Sure, PR welcome. Although, for common cases, we could also like to add it to the built-in ignore list.
Working on the PR for the configurable option now.
Do you think P
should be added to the built-in ignore list as well? I'm mostly for that idea, however have two main hesitations:
P
isn't really standardized the same way that _
is for Lodash. The README for blend-promise-utils
actually requires the library as promiseUtils
, but my company decided to go with P
since we wanted that library to be our "lodash" equivalent for promises.
Counter Argument to this point: every "standard" has to start somewhere :stuck_out_tongue_closed_eyes: P
is quite short and I have a slight fear about it having false "matches" to variable names that people might have already.
Counter Argument: Using the name P
outside of standardized name is bad naming practice anyway.
I noticed that the rule currently has a hard-coded blacklist of callees to ignore.
I ran into a bit of an issue with this as we're currently moving our code base off of
bluebird
(callee:Promise
) to async / await +blend-promise-utils
(callee:P
). That switch fromPromise.map
toP.map
started throwing false-positives all over our codebase.What are people's thoughts on making this a configurable option? I'd be willing to take a stab at a PR for it if so.