Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c496fa2

Browse files
authored
Remove obsolete and overly restrictive rule
The purpose of this rule is not clear. Private methods should be considered an implementation detail. Hoisting of nested functions was not defined prior to ES2015 and generally discouraged, which makes this rule problematic. @DrewML assumed it was to help produce cleaner stack traces without `(anonymous)` function names, but since ES2015 function names are derived for function expressions automatically, so if that was the original purpose of the rule, that no longer is a problem.
1 parent e465628 commit c496fa2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

guides/v2.2/coding-standards/technical-guidelines.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,7 @@ We are reviewing this section and will publish it soon.
634634

635635
10.5.5. Modules MUST NOT have external side effects.
636636

637-
10.5.6. Function declarations MUST be used for private functions instead of function expressions.
638-
639-
10.5.7. Re-declaration of function names MUST NOT be used.
637+
10.5.6. Re-declaration of function names MUST NOT be used.
640638

641639
## 11. Testing
642640

0 commit comments

Comments
 (0)