Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Jun 27, 2023
1 parent ef2405f commit 06e2d8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ module.exports = {
'error',
{
selector:
'MemberExpression[object.name="globalThis"][property.name="process"]',
'MemberExpression[property.name="env"] > .object[object.name="globalThis"][property.name="process"]',
message:
"Never use `process` with `globalThis` because bundlers incorrectly replace it and doesn't tree shake unused code",
"Never use `process.env` with `globalThis` because bundlers incorrectly replace it and doesn't tree shake unused code",
},
],
'no-return-assign': 'error',
Expand Down
2 changes: 1 addition & 1 deletion src/jsutils/instanceOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { inspect } from './inspect.js';
*/
export const instanceOf: (value: unknown, constructor: Constructor) => boolean =
/* c8 ignore next 6 */
typeof process !== 'undefined' && process.env.NODE_ENV === 'production'
globalThis.process !== undefined && process.env.NODE_ENV === 'production'
? function instanceOf(value: unknown, constructor: Constructor): boolean {
return value instanceof constructor;
}
Expand Down

0 comments on commit 06e2d8a

Please sign in to comment.