Commit fedaf6f
[[FIX]] Allow initializing const bindings to undef
Warning W080 is inappropriate for constant bindings because, unlike
`var` and `let` declarations, `const` requires an initializer.
Relax the emission of W080 to allow initializing constant bindings with
`undefined`. Add unit tests to verify that the warning continues to be
emitted for constant bindings declared in ES2015 destructuring patterns.1 parent e7071e0 commit fedaf6f
2 files changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4499 | 4499 | | |
4500 | 4500 | | |
4501 | 4501 | | |
4502 | | - | |
| 4502 | + | |
4503 | 4503 | | |
4504 | 4504 | | |
4505 | 4505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
850 | | - | |
851 | 850 | | |
852 | 851 | | |
853 | | - | |
854 | 852 | | |
855 | 853 | | |
856 | | - | |
857 | 854 | | |
858 | 855 | | |
859 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
860 | 865 | | |
861 | 866 | | |
862 | 867 | | |
| |||
0 commit comments