File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -352,9 +352,9 @@ module.exports = {
352
352
'error' ,
353
353
{
354
354
selector :
355
- 'MemberExpression[object.name="globalThis"][property.name="process"]' ,
355
+ 'MemberExpression[property.name="env"] > .object[ object.name="globalThis"][property.name="process"]' ,
356
356
message :
357
- "Never use `process` with `globalThis` because bundlers incorrectly replace it and doesn't tree shake unused code" ,
357
+ "Never use `process.env ` with `globalThis` because bundlers incorrectly replace it and doesn't tree shake unused code" ,
358
358
} ,
359
359
] ,
360
360
'no-return-assign' : 'error' ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { inspect } from './inspect.js';
8
8
*/
9
9
export const instanceOf : ( value : unknown , constructor : Constructor ) => boolean =
10
10
/* c8 ignore next 6 */
11
- typeof process !== ' undefined' && process . env . NODE_ENV === 'production'
11
+ globalThis . process !== undefined && process . env . NODE_ENV === 'production'
12
12
? function instanceOf ( value : unknown , constructor : Constructor ) : boolean {
13
13
return value instanceof constructor ;
14
14
}
You can’t perform that action at this time.
0 commit comments