Skip to content

Commit fc7e43f

Browse files
committed
fix eslint errors
1 parent 594ebc6 commit fc7e43f

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

docs/src/components/Search/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const SearchItem = React.memo(function SearchItem({ result }: { result: SearchRe
7272
)}
7373
</React.Fragment>
7474
))}
75-
{process.env.NODE_ENV === 'development' && result.score && (
75+
{process.env.NODE_ENV !== 'production' && result.score && (
7676
<span className="text-xs opacity-70 whitespace-nowrap ml-1.5">
7777
{result.score.toFixed(2)}
7878
</span>

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export default defineConfig(
9898
extends: createTestConfig({ useMocha: false }),
9999
rules: {
100100
'material-ui/add-undef-to-optional': 'off',
101+
'material-ui/consistent-production-guard': 'off',
101102
},
102103
},
103104
baseSpecRules,
@@ -160,6 +161,7 @@ export default defineConfig(
160161
'testing-library/prefer-screen-queries': 'off', // Enable usage of playwright queries
161162
'testing-library/no-await-sync-queries': 'off',
162163
'testing-library/render-result-naming-convention': 'off', // inconsequential in regression tests
164+
'material-ui/consistent-production-guard': 'off',
163165
},
164166
},
165167
);

packages/react/src/utils/getPseudoElementBounds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function getPseudoElementBounds(element: HTMLElement): ElementBounds {
99
const elementRect = element.getBoundingClientRect();
1010

1111
// Avoid "Not implemented: window.getComputedStyle(elt, pseudoElt)"
12-
if (process.env.NODE_ENV === 'test') {
12+
if (process.env.NODE_ENV !== 'production') {
1313
return elementRect;
1414
}
1515

packages/utils/src/useAnimationFrame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Scheduler {
5959
* but there's no guarantee that the animation frame will actually run before the fake
6060
* timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */
6161
const didRAFChange =
62-
process.env.NODE_ENV === 'test' &&
62+
process.env.NODE_ENV !== 'production' &&
6363
LAST_RAF !== requestAnimationFrame &&
6464
((LAST_RAF = requestAnimationFrame), true);
6565

0 commit comments

Comments
 (0)