From 490e8083a0bd72d8a68f84d886ac2b460f17d6d9 Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Tue, 29 Oct 2024 10:32:10 -0400 Subject: [PATCH] lint --- packages/mui-system/src/style/style.ts | 10 +++++----- .../mui-system/src/styleFunctionSx/styleFunctionSx.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mui-system/src/style/style.ts b/packages/mui-system/src/style/style.ts index ceb3cb2dcf2ede..477edb244ec086 100644 --- a/packages/mui-system/src/style/style.ts +++ b/packages/mui-system/src/style/style.ts @@ -1,7 +1,7 @@ import capitalize from '@mui/utils/capitalize'; +import type { CSSObject } from '@mui/styled-engine'; import responsivePropType from '../responsivePropType'; import { handleBreakpoints } from '../breakpoints'; -import type { CSSObject } from '@mui/styled-engine'; import type { StyleFunction } from '../Box'; export type TransformFunction = ( @@ -44,15 +44,15 @@ export function getPath | undefined | null>( function getPathImpl(object: any, path: string[]) { let result = object; - let counter = 0; + let index = 0; - while (counter < path.length) { + while (index < path.length) { if (result === null || result === undefined) { return result; } - result = result[path[counter]]; - counter++; + result = result[path[index]]; + index += 1; } return result; diff --git a/packages/mui-system/src/styleFunctionSx/styleFunctionSx.js b/packages/mui-system/src/styleFunctionSx/styleFunctionSx.js index 7998af1801467b..c2f541000ed0be 100644 --- a/packages/mui-system/src/styleFunctionSx/styleFunctionSx.js +++ b/packages/mui-system/src/styleFunctionSx/styleFunctionSx.js @@ -120,7 +120,7 @@ export function unstable_createStyleFunctionSx() { const css = emptyBreakpoints; - for (let styleKey in sxObject) { + for (const styleKey in sxObject) { const value = callIfFn(sxObject[styleKey], theme); if (value === null || value === undefined) { continue; @@ -161,7 +161,7 @@ styleFunctionSx.filterProps = ['sx']; export default styleFunctionSx; function assign(target, item) { - for (let key in item) { + for (const key in item) { target[key] = item[key]; } return target;