0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/es-module/test-esm-forbidden-globals.mjs
Gus Caplan 6934792eb3 lint: move eslint to new plugin system
PR-URL: https://github.com/nodejs/node/pull/18566
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-02-20 13:13:22 -06:00

25 lines
596 B
JavaScript

// Flags: --experimental-modules
/* eslint-disable node-core/required-modules */
if (typeof arguments !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof this !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof exports !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof require !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof module !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof __filename !== 'undefined') {
throw new Error('not an ESM');
}
if (typeof __dirname !== 'undefined') {
throw new Error('not an ESM');
}