linting: disallow t.identifier("undefined") in plugins (#6096)
* add new custom eslint rule, replace remaining t.identifier("undefined") with buildUndefinedNode(), update tests
* change no-undefined-identifier reporting descriptor
This commit is contained in:
committed by
Justin Ridgewell
parent
4577bd1b7c
commit
2db0c3ad1d
@@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var foo = () => undefined;
|
||||
var foo = () => void 0;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
undefined.foo();
|
||||
(void 0).foo();
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var self = undefined;
|
||||
var self = void 0;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
undefined;
|
||||
void 0;
|
||||
|
||||
Reference in New Issue
Block a user