From 6facf5ed0fb7a0915645a3a419d46c22c8445d32 Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Tue, 19 Oct 2021 09:39:15 -0700 Subject: [PATCH] Fix eslint warning for communist-spelling/communist-spelling rule Summary: Fixes eslint warnings Reviewed By: passy Differential Revision: D31760180 fbshipit-source-id: 635e842d626c58a2a8d2ea2543bf171237e93dc4 --- desktop/app/src/chrome/DoctorSheet.tsx | 2 +- desktop/app/src/ui/components/Line.tsx | 2 +- desktop/app/src/ui/components/ToggleSwitch.tsx | 2 +- desktop/app/src/ui/components/colors.tsx | 10 +++++----- desktop/app/src/ui/components/table/TableHead.tsx | 4 ++-- desktop/app/src/ui/components/table/TableRow.tsx | 4 ++-- desktop/app/src/ui/components/table/utils.tsx | 2 +- desktop/plugins/public/rn-tic-tac-toe/index.tsx | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/desktop/app/src/chrome/DoctorSheet.tsx b/desktop/app/src/chrome/DoctorSheet.tsx index 1e9af333d..cad0a4c36 100644 --- a/desktop/app/src/chrome/DoctorSheet.tsx +++ b/desktop/app/src/chrome/DoctorSheet.tsx @@ -133,7 +133,7 @@ function HealthcheckIcon(props: {checkResult: HealthcheckResult}) { ); diff --git a/desktop/app/src/ui/components/Line.tsx b/desktop/app/src/ui/components/Line.tsx index 35600387f..5e6638cb8 100644 --- a/desktop/app/src/ui/components/Line.tsx +++ b/desktop/app/src/ui/components/Line.tsx @@ -12,7 +12,7 @@ import View from './View'; import {colors} from './colors'; const Line = styled(View)<{color?: string}>(({color}) => ({ - backgroundColor: color ? color : colors.greyTint2, + backgroundColor: color ? color : colors.grayTint2, height: 1, width: 'auto', flexShrink: 0, diff --git a/desktop/app/src/ui/components/ToggleSwitch.tsx b/desktop/app/src/ui/components/ToggleSwitch.tsx index 478e5e471..f031edcce 100644 --- a/desktop/app/src/ui/components/ToggleSwitch.tsx +++ b/desktop/app/src/ui/components/ToggleSwitch.tsx @@ -17,7 +17,7 @@ export const StyledButton = styled.div<{toggled: boolean; large: boolean}>( ({large, toggled}) => ({ width: large ? 60 : 30, height: large ? 32 : 16, - background: toggled ? colors.green : colors.grey, + background: toggled ? colors.green : colors.gray, display: 'block', borderRadius: '100px', position: 'relative', diff --git a/desktop/app/src/ui/components/colors.tsx b/desktop/app/src/ui/components/colors.tsx index a3a1191a3..1638c1761 100644 --- a/desktop/app/src/ui/components/colors.tsx +++ b/desktop/app/src/ui/components/colors.tsx @@ -47,11 +47,11 @@ export const colors = { purple: '#8C73C8', // Purple - Verbose purpleTint: '#E8E3F4', purpleLight: '#ccc9d6', // purpleLight 90 - Highlighting row's background when it matches the query - grey: '#88A2AB', // Grey - Debug - greyTint: '#E7ECEE', - greyTint2: '#e5e5e5', // Grey - Can be used in demarcation with greyStackTraceTint - greyTint3: '#515151', // Grey - Can be used as the color for the title - greyStackTraceTint: '#f5f6f8', // Grey - It is used as the background for the stacktrace in crash reporter plugin + gray: '#88A2AB', // Grey - Debug + grayTint: '#E7ECEE', + grayTint2: '#e5e5e5', // Grey - Can be used in demarcation with greyStackTraceTint + grayTint3: '#515151', // Grey - Can be used as the color for the title + grayStackTraceTint: '#f5f6f8', // Grey - It is used as the background for the stacktrace in crash reporter plugin cyan: '#4FC9EA', // Cyan - Info cyanTint: '#DCF4FB', // Cyan - Info // FIG UI Light diff --git a/desktop/app/src/ui/components/table/TableHead.tsx b/desktop/app/src/ui/components/table/TableHead.tsx index 3971bcd05..b282f68fc 100644 --- a/desktop/app/src/ui/components/table/TableHead.tsx +++ b/desktop/app/src/ui/components/table/TableHead.tsx @@ -15,7 +15,7 @@ import { TableOnSort, TableRowSortOrder, } from './types'; -import {normaliseColumnWidth, isPercentage} from './utils'; +import {normalizeColumnWidth, isPercentage} from './utils'; import {PureComponent} from 'react'; import ContextMenu from '../ContextMenu'; import {theme, _Interactive, _InteractiveProps} from 'flipper-plugin'; @@ -287,7 +287,7 @@ export default class TableHead extends PureComponent<{ ); } - const width = normaliseColumnWidth(columnSizes[key]); + const width = normalizeColumnWidth(columnSizes[key]); const isResizable = col.resizable !== false; const elem = ( diff --git a/desktop/app/src/ui/components/table/TableRow.tsx b/desktop/app/src/ui/components/table/TableRow.tsx index 92cf060e4..f8ea12c66 100644 --- a/desktop/app/src/ui/components/table/TableRow.tsx +++ b/desktop/app/src/ui/components/table/TableRow.tsx @@ -17,7 +17,7 @@ import React from 'react'; import FilterRow from '../filter/FilterRow'; import styled from '@emotion/styled'; import FlexRow from '../FlexRow'; -import {normaliseColumnWidth} from './utils'; +import {normalizeColumnWidth} from './utils'; import {DEFAULT_ROW_HEIGHT} from './types'; import {Property} from 'csstype'; import {theme} from 'flipper-plugin'; @@ -163,7 +163,7 @@ export default class TableRow extends React.PureComponent { title={title} multiline={multiline} justifyContent={col && col.align ? col.align : 'flex-start'} - width={normaliseColumnWidth(columnSizes[key])}> + width={normalizeColumnWidth(columnSizes[key])}> {isFilterable && onAddFilter != null ? ( {value} diff --git a/desktop/app/src/ui/components/table/utils.tsx b/desktop/app/src/ui/components/table/utils.tsx index 2e371bb14..53f016def 100644 --- a/desktop/app/src/ui/components/table/utils.tsx +++ b/desktop/app/src/ui/components/table/utils.tsx @@ -7,7 +7,7 @@ * @format */ -export function normaliseColumnWidth( +export function normalizeColumnWidth( width: string | number | null | undefined, ): number | string { if (width == null || width === 'flex') { diff --git a/desktop/plugins/public/rn-tic-tac-toe/index.tsx b/desktop/plugins/public/rn-tic-tac-toe/index.tsx index a625b7a31..a78e73680 100644 --- a/desktop/plugins/public/rn-tic-tac-toe/index.tsx +++ b/desktop/plugins/public/rn-tic-tac-toe/index.tsx @@ -183,6 +183,6 @@ const Cell = styled('button')({ backgroundColor: colors.highlight, color: 'white', ':disabled': { - backgroundColor: colors.greyTint2, + backgroundColor: colors.grayTint2, }, });