Rule Change: prevent new-cap from flagging the caller because of third-party modules
See original GitHub issueWhat rule do you want to change?
new-cap
What change to do you want to make?
Generate fewer warnings
How do you think the change should be implemented?
A new default behavior
Example code
import { Deserialize } from 'cerialize';
// ...
const someObj = Deserialize(someJson, SomeType);
What does the rule currently do for this code?
Currently new-cap flags the code because Deserialize()
is not camelCased, despite it being a third party module.
What will the rule do after it’s changed?
One of the followings:
- Check the naming rule at the point of definition (callee), rather than at the point of invocation (caller).
- Ignore ESM imported function calls from being checked.
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
See #15722 for the previous Q&A.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Combating Spoofed Robocalls with Caller ID Authentication
This technology is critical to protecting Americans from scams using spoofed robocalls because it erodes the ability of callers to illegally spoof a...
Read more >Triage - GitHub
Rule Change : prevent new-cap from flagging the caller because of third-party modules. 1 task. eslint#15724 opened by nedsociety archived due to age...
Read more >Complying with the Telemarketing Sales Rule
Any call from a consumer that is not placed in response to a solicitation by the seller, charitable organization, or telemarketer is exempt...
Read more >Announcements | U.S. Department of Labor
This presentation will provide a detailed overview of how the 2022 H-2A rule will affect filing and processing including preparations to the FLAG...
Read more >Why Are My Business Calls Being Blocked or Flagged as ...
The carrier's analytics software can't tell the difference between legitimate calls and robocalling. In an effort to protect its customers, the ...
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
I think this rule is intended to enforce naming conventions, not to catch errors (though, it can catch errors).
Fair enough. Given that we don’t agree that this is a bug, we can close this.
@nedsociety it looks like you have some options to work around this limitation already.