SIGN IN SIGN UP

Add AvoidReservedWordsAsFunctionNames Rule (#2128)

* fix: Update helper GetScriptExtentForFunctionName to return correct extent when function name is 'function'

* Add AvoidReservedWordsAsFunctionNames rule

* fix: Handle functions with scopes

* Copyright header

* Extend Substring tests to starts with reserved word, ends with reserved word, and reserved word with a letter missing

* Check if the function name is 'Function' case insensitively. Add a test for good measure

* Fix casing of common name

Co-authored-by: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>

* AvoidReservedWordsAsFunctionNames: factor our function name for readability

Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>

* Remove reserved words which do not pose an issue:

assembly, base, command, hidden, in, inlinescript, interface,
module, namespace, private, public, static

---------

Co-authored-by: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
L
Liam Peters committed
a9898a6e2d0a17e8beba652df7a45963e3c39a22
Parent: dc55078
Committed by GitHub <noreply@github.com> on 10/22/2025, 8:35:13 PM