New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eslint-plugin-template): [no-call-expression] add allowList option #1217
feat(eslint-plugin-template): [no-call-expression] add allowList option #1217
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit f50b11a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 7 targets
Sent with 💌 from NxCloud. |
Codecov Report
@@ Coverage Diff @@
## main #1217 +/- ##
==========================================
+ Coverage 88.06% 88.07% +0.01%
==========================================
Files 162 162
Lines 3141 3144 +3
Branches 506 507 +1
==========================================
+ Hits 2766 2769 +3
Misses 261 261
Partials 114 114
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -35,6 +51,15 @@ export default createESLintRule<Options, MessageIds>({ | |||
|
|||
if (isChildOfBoundEvent) return; | |||
|
|||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to create a helper function for this logic, like seen in other rules? Something like functionNameIsAllowed
could make this easier to understand. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good call, would keep this concise. I will update.
…sCallNameInAllowList()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Sandi! 🙏
Resolves #1055
Adds
allowList
option to the no-call-expression template rule to configure a list of function names allowed to be called.