diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js index a152cf3b64c..81429c29543 100644 --- a/desktop/.eslintrc.js +++ b/desktop/.eslintrc.js @@ -112,6 +112,7 @@ module.exports = { 'no-bitwise': 0, // bitwise operations needed in some places 'consistent-return': 0, 'no-var': 2, + 'object-shorthand': ['error', 'properties'], 'prefer-const': [2, {destructuring: 'all'}], 'prefer-spread': 1, 'prefer-rest-params': 1, diff --git a/desktop/eslint-plugin-flipper/src/rules/noTsFileExtension.tsx b/desktop/eslint-plugin-flipper/src/rules/noTsFileExtension.tsx index 20c607fe3b4..eed133465a3 100644 --- a/desktop/eslint-plugin-flipper/src/rules/noTsFileExtension.tsx +++ b/desktop/eslint-plugin-flipper/src/rules/noTsFileExtension.tsx @@ -38,7 +38,7 @@ export default createESLintRule({ Program(node) { if (isTs) { context.report({ - node: node, + node, messageId: 'noTsFileExtension', }); } diff --git a/desktop/flipper-common/src/clientUtils.tsx b/desktop/flipper-common/src/clientUtils.tsx index 7592f49a147..7bd37cd26e3 100644 --- a/desktop/flipper-common/src/clientUtils.tsx +++ b/desktop/flipper-common/src/clientUtils.tsx @@ -109,7 +109,7 @@ export function deconstructPluginKey(pluginKey: string): PluginKeyConstituents { type: 'client', ...deconstructClientId(clientId), client: clientId, - pluginName: pluginName, + pluginName, }; } } diff --git a/desktop/flipper-plugin/src/ui/Dialog.tsx b/desktop/flipper-plugin/src/ui/Dialog.tsx index 33bbce2194b..7609cccede8 100644 --- a/desktop/flipper-plugin/src/ui/Dialog.tsx +++ b/desktop/flipper-plugin/src/ui/Dialog.tsx @@ -149,7 +149,7 @@ export const Dialog = { ...rest, defaultValue: true, children: () => message, - onConfirm: onConfirm, + onConfirm, }); }, diff --git a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx index 0a4a831cb5f..43db7d1a4f9 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx @@ -228,7 +228,7 @@ export function tableContextMenuFactory( onChange={(color: string) => { dispatch({ type: 'setSearchHighlightColor', - color: color, + color, }); }}> {Object.entries(theme.searchHighlightBackground).map( diff --git a/desktop/flipper-plugin/src/ui/data-table/TableSearch.tsx b/desktop/flipper-plugin/src/ui/data-table/TableSearch.tsx index 7fcd3df805a..1dee7440a10 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableSearch.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableSearch.tsx @@ -76,7 +76,7 @@ export const TableSearch = memo(function TableSearch({ ); const toggleSearchDropdown = useCallback( (show: boolean) => { - dispatch({type: 'showSearchDropdown', show: show}); + dispatch({type: 'showSearchDropdown', show}); }, [dispatch], ); diff --git a/desktop/flipper-server/src/app-connectivity/ServerController.tsx b/desktop/flipper-server/src/app-connectivity/ServerController.tsx index cc78481b0f2..efde39fadf0 100644 --- a/desktop/flipper-server/src/app-connectivity/ServerController.tsx +++ b/desktop/flipper-server/src/app-connectivity/ServerController.tsx @@ -538,7 +538,7 @@ export class ServerController const info = { client, - connection: connection, + connection, }; recorder.log( diff --git a/desktop/flipper-server/src/app-connectivity/ServerRSocket.tsx b/desktop/flipper-server/src/app-connectivity/ServerRSocket.tsx index 3751017811e..f24517120b4 100644 --- a/desktop/flipper-server/src/app-connectivity/ServerRSocket.tsx +++ b/desktop/flipper-server/src/app-connectivity/ServerRSocket.tsx @@ -74,8 +74,8 @@ class ServerRSocket extends ServerWebSocketBase { ? this._trustedRequestHandler : this._untrustedRequestHandler, transport: new RSocketTCPServer({ - port: port, - serverFactory: serverFactory, + port, + serverFactory, }), }); rawServer.start(); diff --git a/desktop/flipper-server/src/devices/android/AndroidCertificateProvider.tsx b/desktop/flipper-server/src/devices/android/AndroidCertificateProvider.tsx index 0d2ebaa0fcb..d02d453f274 100644 --- a/desktop/flipper-server/src/devices/android/AndroidCertificateProvider.tsx +++ b/desktop/flipper-server/src/devices/android/AndroidCertificateProvider.tsx @@ -137,6 +137,6 @@ export default class AndroidCertificateProvider extends CertificateProvider { ].map((s) => this.santitizeString(s)); const isMatch = sanitizedDeviceCsr === sanitizedClientCsr; - return {isMatch: isMatch, foundCsr: sanitizedDeviceCsr}; + return {isMatch, foundCsr: sanitizedDeviceCsr}; } } diff --git a/desktop/flipper-server/src/devices/android/AndroidCrashUtils.tsx b/desktop/flipper-server/src/devices/android/AndroidCrashUtils.tsx index eeceacc5b63..b25c94241e3 100644 --- a/desktop/flipper-server/src/devices/android/AndroidCrashUtils.tsx +++ b/desktop/flipper-server/src/devices/android/AndroidCrashUtils.tsx @@ -31,8 +31,8 @@ export function parseAndroidCrash(content: string, logDate?: Date) { } const crash: CrashLog = { callstack: content, - name: name, - reason: reason, + name, + reason, date: logDate?.getTime(), }; return crash; diff --git a/desktop/flipper-server/src/server/startFlipperServer.tsx b/desktop/flipper-server/src/server/startFlipperServer.tsx index 243887fb008..6a4a905b80b 100644 --- a/desktop/flipper-server/src/server/startFlipperServer.tsx +++ b/desktop/flipper-server/src/server/startFlipperServer.tsx @@ -67,9 +67,9 @@ export async function startFlipperServer( appPath, homePath: os.homedir(), execPath, - staticPath: staticPath, + staticPath, tempPath: os.tmpdir(), - desktopPath: desktopPath, + desktopPath, }, launcherSettings, processConfig: loadProcessConfig(env), diff --git a/desktop/flipper-server/src/server/startServer.tsx b/desktop/flipper-server/src/server/startServer.tsx index a35d8f13de9..46c6ef0dbe9 100644 --- a/desktop/flipper-server/src/server/startServer.tsx +++ b/desktop/flipper-server/src/server/startServer.tsx @@ -167,7 +167,7 @@ async function startHTTPServer( debug: !isProduction(), graphSecret: GRAPH_SECRET, appVersion: environmentInfo.appVersion, - sessionId: sessionId, + sessionId, unixname: environmentInfo.os.unixname, authToken: token, }; diff --git a/desktop/flipper-ui/src/chrome/ConsoleLogs.tsx b/desktop/flipper-ui/src/chrome/ConsoleLogs.tsx index ee7911ca79a..c1f24928b69 100644 --- a/desktop/flipper-ui/src/chrome/ConsoleLogs.tsx +++ b/desktop/flipper-ui/src/chrome/ConsoleLogs.tsx @@ -41,7 +41,7 @@ type ConsoleFeedLogMessage = { export function enableConsoleHook() { addLogTailer((level, ...data) => { - const logMessage = {method: level, data: data, id: v4()}; + const logMessage = {method: level, data, id: v4()}; exportLogs.push(logMessage); if (level === 'debug') { diff --git a/desktop/flipper-ui/src/chrome/ListView.tsx b/desktop/flipper-ui/src/chrome/ListView.tsx index 793b447ce85..6fcc899d8ed 100644 --- a/desktop/flipper-ui/src/chrome/ListView.tsx +++ b/desktop/flipper-ui/src/chrome/ListView.tsx @@ -179,11 +179,11 @@ export default class ListView extends Component { let selectedElements: Set = new Set([]); if (this.props.type === 'single') { if (!selected) { - this.setState({selectedElements: selectedElements}); + this.setState({selectedElements}); this.props.onChange([...selectedElements]); } else { selectedElements.add(id); - this.setState({selectedElements: selectedElements}); + this.setState({selectedElements}); this.props.onChange([...selectedElements]); } } else { diff --git a/desktop/flipper-ui/src/dispatcher/application.tsx b/desktop/flipper-ui/src/dispatcher/application.tsx index 7578dd28b29..8c8814634e3 100644 --- a/desktop/flipper-ui/src/dispatcher/application.tsx +++ b/desktop/flipper-ui/src/dispatcher/application.tsx @@ -47,7 +47,7 @@ export default (store: Store, logger: Logger) => { const isFocused = document.hasFocus(); store.dispatch({ type: 'windowIsFocused', - payload: {isFocused: isFocused, time: Date.now()}, + payload: {isFocused, time: Date.now()}, }); }); diff --git a/desktop/flipper-ui/src/reducers/__tests__/sandydeviceplugins.node.tsx b/desktop/flipper-ui/src/reducers/__tests__/sandydeviceplugins.node.tsx index 602cfc1a65e..d7c632bf65b 100644 --- a/desktop/flipper-ui/src/reducers/__tests__/sandydeviceplugins.node.tsx +++ b/desktop/flipper-ui/src/reducers/__tests__/sandydeviceplugins.node.tsx @@ -37,8 +37,8 @@ function devicePlugin(client: DevicePluginClient) { initialized = true; return { - activateStub: activateStub, - deactivateStub: deactivateStub, + activateStub, + deactivateStub, destroyStub, }; } diff --git a/desktop/flipper-ui/src/reducers/connections.tsx b/desktop/flipper-ui/src/reducers/connections.tsx index 10f11c178b7..b3d4816e1f5 100644 --- a/desktop/flipper-ui/src/reducers/connections.tsx +++ b/desktop/flipper-ui/src/reducers/connections.tsx @@ -293,7 +293,7 @@ export default (state: State = INITAL_STATE, action: Actions): State => { state.userPreferredApp, selectedPlugin, userPreferredPlugin: selectedPlugin, - deepLinkPayload: deepLinkPayload, + deepLinkPayload, }; } diff --git a/desktop/flipper-ui/src/reducers/pluginDownloads.tsx b/desktop/flipper-ui/src/reducers/pluginDownloads.tsx index 6eb61707c75..f1a3f76b51f 100644 --- a/desktop/flipper-ui/src/reducers/pluginDownloads.tsx +++ b/desktop/flipper-ui/src/reducers/pluginDownloads.tsx @@ -78,7 +78,7 @@ export default function reducer( return produce(state, (draft) => { draft[installationDir] = { plugin, - startedByUser: startedByUser, + startedByUser, status: PluginDownloadStatus.QUEUED, }; }); diff --git a/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx b/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx index 0ecbb31b723..48d8c2516a1 100644 --- a/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx +++ b/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx @@ -392,7 +392,7 @@ export function NavbarButton({ if (count !== undefined) { return ( {React.createElement(staticView, { - logger: logger, + logger, })} )} diff --git a/desktop/flipper-ui/src/ui/components/TooltipProvider.tsx b/desktop/flipper-ui/src/ui/components/TooltipProvider.tsx index 71ebaf3fe2d..c9d08e4c356 100644 --- a/desktop/flipper-ui/src/ui/components/TooltipProvider.tsx +++ b/desktop/flipper-ui/src/ui/components/TooltipProvider.tsx @@ -149,7 +149,7 @@ const TooltipProvider: React.FC<{}> = memo(function TooltipProvider({ setTooltip({ rect: node.getBoundingClientRect(), title, - options: options, + options, }); }, options.delay); return; @@ -157,7 +157,7 @@ const TooltipProvider: React.FC<{}> = memo(function TooltipProvider({ setTooltip({ rect: node.getBoundingClientRect(), title, - options: options, + options, }); }, close() { diff --git a/desktop/flipper-ui/src/ui/components/searchable/Searchable.tsx b/desktop/flipper-ui/src/ui/components/searchable/Searchable.tsx index 685dd7ea07a..96f256f6772 100644 --- a/desktop/flipper-ui/src/ui/components/searchable/Searchable.tsx +++ b/desktop/flipper-ui/src/ui/components/searchable/Searchable.tsx @@ -222,7 +222,7 @@ export default function Searchable( ? this.props.defaultSearchTerm : savedState.searchTerm || this.state.searchTerm; this.setState({ - searchTerm: searchTerm, + searchTerm, filters: savedState.filters || this.state.filters, regexEnabled: savedState.regexEnabled || this.state.regexEnabled, contentSearchEnabled: diff --git a/desktop/flipper-ui/src/utils/__tests__/exportData.node.tsx b/desktop/flipper-ui/src/utils/__tests__/exportData.node.tsx index 13b8e5135fb..6f1f602195b 100644 --- a/desktop/flipper-ui/src/utils/__tests__/exportData.node.tsx +++ b/desktop/flipper-ui/src/utils/__tests__/exportData.node.tsx @@ -1125,7 +1125,7 @@ test('test determinePluginsToProcess to ignore archived clients', async () => { pluginKey: `${client.id}#TestPlugin`, pluginId: 'TestPlugin', pluginName: 'TestPlugin', - client: client, + client, }, ]); }); diff --git a/desktop/flipper-ui/src/utils/__tests__/messageQueueSandy.node.tsx b/desktop/flipper-ui/src/utils/__tests__/messageQueueSandy.node.tsx index 99daaf8c42f..d1bd7d126d5 100644 --- a/desktop/flipper-ui/src/utils/__tests__/messageQueueSandy.node.tsx +++ b/desktop/flipper-ui/src/utils/__tests__/messageQueueSandy.node.tsx @@ -742,6 +742,6 @@ test('queue will be cleaned up when it exceeds maximum size', () => { }); expect(state[pluginKey][newLength - 1]).toEqual({ method: 'test', - params: {i: i}, // ~50001 + params: {i}, // ~50001 }); }); diff --git a/desktop/flipper-ui/src/utils/exportData.tsx b/desktop/flipper-ui/src/utils/exportData.tsx index a6fd8eadde3..4f5d24c0816 100644 --- a/desktop/flipper-ui/src/utils/exportData.tsx +++ b/desktop/flipper-ui/src/utils/exportData.tsx @@ -252,7 +252,7 @@ async function addSaltToDeviceSerial({ flipperReleaseRevision: revision, clients: updatedClients, device: {...newDevice.toJSON(), pluginStates: devicePluginStates}, - deviceScreenshot: deviceScreenshot, + deviceScreenshot, store: { activeNotifications: updatedPluginNotifications, }, diff --git a/desktop/flipper-ui/src/utils/testUtils.tsx b/desktop/flipper-ui/src/utils/testUtils.tsx index 294ee3e0002..03a2325b681 100644 --- a/desktop/flipper-ui/src/utils/testUtils.tsx +++ b/desktop/flipper-ui/src/utils/testUtils.tsx @@ -44,7 +44,7 @@ export function createMockDownloadablePluginDetails( const name = params.name || `flipper-plugin-${lowercasedID}`; const details: DownloadablePluginDetails = { name: name || `flipper-plugin-${lowercasedID}`, - id: id, + id, buildId, bugs: { email: 'bugs@localhost', @@ -63,9 +63,9 @@ export function createMockDownloadablePluginDetails( specVersion: 2, pluginType: 'client', title: title ?? id, - version: version, + version, downloadUrls: [`http://localhost/${lowercasedID}/${version}`], - lastUpdated: lastUpdated, + lastUpdated, isActivatable: false, isEnabledByDefault: false, }; diff --git a/desktop/plugins/public/cpu/index.tsx b/desktop/plugins/public/cpu/index.tsx index 0bdd9365abf..00fbf8d757f 100644 --- a/desktop/plugins/public/cpu/index.tsx +++ b/desktop/plugins/public/cpu/index.tsx @@ -341,7 +341,7 @@ export function devicePlugin(client: PluginClient<{}, {}>) { } cpuState.set({ cpuCount: count, - cpuFreq: cpuFreq, + cpuFreq, monitoring: false, hardwareInfo: '', temperatureMap: {}, @@ -520,7 +520,7 @@ function buildAvailableGovList(freq: CPUFrequency): string { function buildSidebarRow(key: string, val: any) { return { - key: key, + key, value: val, }; } diff --git a/desktop/plugins/public/crash_reporter/crash-utils.tsx b/desktop/plugins/public/crash_reporter/crash-utils.tsx index 4503ff62ce5..637d4eced08 100644 --- a/desktop/plugins/public/crash_reporter/crash-utils.tsx +++ b/desktop/plugins/public/crash_reporter/crash-utils.tsx @@ -53,7 +53,7 @@ export function showCrashNotification( id: crash.notificationID, message: msg, severity: 'error', - title: title, + title, action: crash.notificationID, category: crash.reason || 'Unknown reason', }); diff --git a/desktop/plugins/public/databases/DatabasesPlugin.tsx b/desktop/plugins/public/databases/DatabasesPlugin.tsx index f1c07510252..805a3d49fef 100644 --- a/desktop/plugins/public/databases/DatabasesPlugin.tsx +++ b/desktop/plugins/public/databases/DatabasesPlugin.tsx @@ -122,7 +122,7 @@ const QueryHistory = React.memo(({history}: {history: Array}) => { const value = query.value; rows.push({ key: `${i}`, - columns: {time: {value: time}, query: {value: value}}, + columns: {time: {value: time}, query: {value}}, }); } } @@ -445,7 +445,7 @@ export function Component() { const onGoToRow = useCallback( (row: number, _count: number) => { - instance.goToRow({row: row}); + instance.goToRow({row}); }, [instance], ); diff --git a/desktop/plugins/public/databases/index.tsx b/desktop/plugins/public/databases/index.tsx index df381daf6ca..4774cc0edf8 100644 --- a/desktop/plugins/public/databases/index.tsx +++ b/desktop/plugins/public/databases/index.tsx @@ -132,7 +132,7 @@ export function plugin(client: PluginClient) { ...state, databases, outdatedDatabaseList: false, - selectedDatabase: selectedDatabase, + selectedDatabase, selectedDatabaseTable: selectedTable, pageRowNumber: 0, currentPage: sameTableSelected ? state.currentPage : null, @@ -402,13 +402,13 @@ export function plugin(client: PluginClient) { databaseId: newState.selectedDatabase, order: newState.currentSort?.key, reverse: (newState.currentSort?.direction || 'up') === 'down', - table: table, + table, start: newState.pageRowNumber, }) .then((data) => { updatePage({ - databaseId: databaseId, - table: table, + databaseId, + table, columns: data.columns, rows: data.values, start: data.start, @@ -426,13 +426,13 @@ export function plugin(client: PluginClient) { if (newState.currentStructure === null && databaseId && table) { client .send('getTableStructure', { - databaseId: databaseId, - table: table, + databaseId, + table, }) .then((data) => { updateStructure({ - databaseId: databaseId, - table: table, + databaseId, + table, columns: data.structureColumns, rows: data.structureValues, indexesColumns: data.indexesColumns, @@ -453,8 +453,8 @@ export function plugin(client: PluginClient) { ) { client .send('getTableInfo', { - databaseId: databaseId, - table: table, + databaseId, + table, }) .then((data) => { updateTableInfo({ diff --git a/desktop/plugins/public/layout/InspectorSidebar.tsx b/desktop/plugins/public/layout/InspectorSidebar.tsx index 63084518e27..a5ea21b2ab3 100644 --- a/desktop/plugins/public/layout/InspectorSidebar.tsx +++ b/desktop/plugins/public/layout/InspectorSidebar.tsx @@ -129,7 +129,7 @@ const Sidebar: React.FC = (props: Props) => { sectionDefs.push({ key: extraSection, id: extraSection, - data: data, + data, }); } } else { @@ -156,7 +156,7 @@ const Sidebar: React.FC = (props: Props) => { name: props.element?.name, }) .then((response) => { - setElementSnapshot({element: element, snapshot: response.snapshot}); + setElementSnapshot({element, snapshot: response.snapshot}); }) .catch((e) => { console.log( diff --git a/desktop/plugins/public/layout/Search.tsx b/desktop/plugins/public/layout/Search.tsx index 6a8345a6ef3..ee3ec959b0d 100644 --- a/desktop/plugins/public/layout/Search.tsx +++ b/desktop/plugins/public/layout/Search.tsx @@ -165,7 +165,7 @@ export default class Search extends Component { matches: new Set( searchResults.filter((x) => x.isMatch).map((x) => x.element.id), ), - query: query, + query, }); } diff --git a/desktop/plugins/public/layout/index.tsx b/desktop/plugins/public/layout/index.tsx index fad35a025c7..e17bf59a532 100644 --- a/desktop/plugins/public/layout/index.tsx +++ b/desktop/plugins/public/layout/index.tsx @@ -298,7 +298,7 @@ export default class LayoutPlugin extends FlipperPlugin< this.client .call('setResolvedPath', { className: params.className, - resolvedPath: resolvedPath, + resolvedPath, }) .catch((e) => { console.warn('[Layout] setResolvePath failed with error', e); @@ -451,10 +451,10 @@ export default class LayoutPlugin extends FlipperPlugin< this.setState({visualizerWindow: null}); }; visualizerWindow.onresize = () => { - this.setState({visualizerWindow: visualizerWindow}); + this.setState({visualizerWindow}); }; visualizerWindow.onload = () => { - this.setState({visualizerWindow: visualizerWindow}); + this.setState({visualizerWindow}); }; } }; diff --git a/desktop/plugins/public/leak_canary/index.tsx b/desktop/plugins/public/leak_canary/index.tsx index 86f19de43ad..39cadbbbf06 100644 --- a/desktop/plugins/public/leak_canary/index.tsx +++ b/desktop/plugins/public/leak_canary/index.tsx @@ -109,7 +109,7 @@ export default class LeakCanary extends FlipperPlugin< } this.setState({ - leaks: leaks, + leaks, leaksCount: leaks.length, }); }; @@ -159,7 +159,7 @@ export default class LeakCanary extends FlipperPlugin< elementSimple.expanded = !elementSimple.expanded; this.setState({ - leaks: leaks, + leaks, }); }; @@ -172,13 +172,13 @@ export default class LeakCanary extends FlipperPlugin< _: number, // depth ): {mutable: boolean; type: DataDescriptionType; value: any} { if (!isNaN(value)) { - return {mutable: false, type: 'number', value: value}; + return {mutable: false, type: 'number', value}; } else if (value == 'true' || value == 'false') { - return {mutable: false, type: 'boolean', value: value}; + return {mutable: false, type: 'boolean', value}; } else if (value == 'null') { - return {mutable: false, type: 'null', value: value}; + return {mutable: false, type: 'null', value}; } - return {mutable: false, type: 'enum', value: value}; + return {mutable: false, type: 'enum', value}; } renderSidebar() { diff --git a/desktop/plugins/public/leak_canary/processLeakString.tsx b/desktop/plugins/public/leak_canary/processLeakString.tsx index 523803ccf4e..ee23d7e44b5 100644 --- a/desktop/plugins/public/leak_canary/processLeakString.tsx +++ b/desktop/plugins/public/leak_canary/processLeakString.tsx @@ -250,7 +250,7 @@ function processLeak(output: Leak[], leakInfo: string): Leak[] { elementsSimple: toObjectMap(elementsSimple), staticFields: toObjectMap(staticFields, true), instanceFields: toObjectMap(instanceFields, true), - retainedSize: retainedSize, + retainedSize, }); return output; } diff --git a/desktop/plugins/public/shared_preferences/src/index.tsx b/desktop/plugins/public/shared_preferences/src/index.tsx index 6bd5b34314a..d120bcdcb1e 100644 --- a/desktop/plugins/public/shared_preferences/src/index.tsx +++ b/desktop/plugins/public/shared_preferences/src/index.tsx @@ -131,7 +131,7 @@ export function plugin(client: PluginClient) { const name = selectedPreferences.get(); if (name != null) { updateSharedPreferences({ - name: name, + name, preferences: preferences.preferences, }); @@ -171,7 +171,7 @@ export function plugin(client: PluginClient) { client.onConnect(async () => { const results = await client.send('getAllSharedPreferences', {}); Object.entries(results).forEach(([name, prefs]) => - updateSharedPreferences({name: name, preferences: prefs}), + updateSharedPreferences({name, preferences: prefs}), ); }); diff --git a/desktop/plugins/public/ui-debugger/components/shared/createDropDownItem.tsx b/desktop/plugins/public/ui-debugger/components/shared/createDropDownItem.tsx index d9d0e76c7c3..ca92babd29d 100644 --- a/desktop/plugins/public/ui-debugger/components/shared/createDropDownItem.tsx +++ b/desktop/plugins/public/ui-debugger/components/shared/createDropDownItem.tsx @@ -12,5 +12,5 @@ export function createDropDownItem( label: string, icon?: React.ReactNode, ) { - return {key: wireframeMode, label: label, icon}; + return {key: wireframeMode, label, icon}; } diff --git a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/ColorInput.tsx b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/ColorInput.tsx index 3b63a08dc14..c07cde32bbb 100644 --- a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/ColorInput.tsx +++ b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/ColorInput.tsx @@ -67,7 +67,7 @@ export function ColorInspector({ { value: inspectable.value.r, addonText: 'R', - mutable: mutable, + mutable, hint: 'COLOR', min: 0, max: 255, @@ -76,7 +76,7 @@ export function ColorInspector({ { value: inspectable.value.g, addonText: 'G', - mutable: mutable, + mutable, hint: 'COLOR', min: 0, max: 255, @@ -85,7 +85,7 @@ export function ColorInspector({ { value: inspectable.value.b, addonText: 'B', - mutable: mutable, + mutable, hint: 'COLOR', min: 0, max: 255, @@ -96,7 +96,7 @@ export function ColorInspector({ addonText: 'A', min: 0, max: 1, - mutable: mutable, + mutable, hint: 'COLOR', onChange: (updated) => onChange({...inspectable.value, a: updated}), }, diff --git a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/SelectInput.tsx b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/SelectInput.tsx index 49bc8e6f7b9..484d043408e 100644 --- a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/SelectInput.tsx +++ b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/SelectInput.tsx @@ -39,7 +39,7 @@ export function SelectInput({ value={optimisticValue.value} options={options} style={{ - color: color, + color, height: rowHeight, ...opactity(optimisticValue), }} diff --git a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/TextInput.tsx b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/TextInput.tsx index 9785d277b85..83ece5af115 100644 --- a/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/TextInput.tsx +++ b/desktop/plugins/public/ui-debugger/components/sidebarV2/attributes/TextInput.tsx @@ -32,7 +32,7 @@ export function StyledTextArea({ autoSize className={cx(inputBase, !mutable && readOnlyInput)} bordered - style={{color: color, ...pendingStyle(optimisticValue)}} + style={{color, ...pendingStyle(optimisticValue)}} readOnly={!mutable} value={optimisticValue.value} onChange={(event) => optimisticValue.onChange(event.target.value)} diff --git a/desktop/plugins/public/ui-debugger/components/tree/ContextMenu.tsx b/desktop/plugins/public/ui-debugger/components/tree/ContextMenu.tsx index 98da0d05856..a02080e0a79 100644 --- a/desktop/plugins/public/ui-debugger/components/tree/ContextMenu.tsx +++ b/desktop/plugins/public/ui-debugger/components/tree/ContextMenu.tsx @@ -162,7 +162,7 @@ export const ContextMenu: React.FC<{ }, ...Object.entries(hoveredNode.inlineAttributes).map( ([key, value]) => ({ - key: key, + key, label: `Copy ${key}`, icon: , onClick: () => { diff --git a/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx b/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx index de0dbac2376..62f87715053 100644 --- a/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx +++ b/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx @@ -430,7 +430,7 @@ export function TreeNodeRow({ top: 0, left: 0, height: TreeItemHeight, - transform: transform, + transform, //Due to absolute positioning width is set outside of react via a useLayoutEffect in parent }}> ) { streamInterceptor.emit('frameReceived', { frameTime: frameScan.frameTime, snapshot: frameScan.snapshot, - nodes: nodes, + nodes, }); applyFrameworkEvents(frameScan, nodes); }; diff --git a/desktop/plugins/public/ui-debugger/plugin/uiActions.tsx b/desktop/plugins/public/ui-debugger/plugin/uiActions.tsx index 3a91d3072b7..d5d004a462a 100644 --- a/desktop/plugins/public/ui-debugger/plugin/uiActions.tsx +++ b/desktop/plugins/public/ui-debugger/plugin/uiActions.tsx @@ -60,7 +60,7 @@ export function uiActions( } else { uiState.nodeSelection.set({ source, - node: node, //last known state of the node, may be offscreen + node, //last known state of the node, may be offscreen }); } @@ -68,7 +68,7 @@ export function uiActions( tracker.track('node-selected', { name: node.name, tags: node.tags, - source: source, + source, }); let current = node.parent; @@ -255,11 +255,11 @@ export function uiActions( ); tracker.track('attribute-editted', { - nodeId: nodeId, + nodeId, nodeName: node?.name ?? 'Unknown', attributeName: last(attributePath) ?? 'Unknown', attributePath, - value: value, + value, attributeType: (typeof value).toString(), tags: node?.tags ?? [], }); diff --git a/desktop/scripts/build-icons.tsx b/desktop/scripts/build-icons.tsx index c3521cc824d..ee6b91771c0 100644 --- a/desktop/scripts/build-icons.tsx +++ b/desktop/scripts/build-icons.tsx @@ -28,7 +28,7 @@ function getIconPartsFromName(icon: string): { const isOutlineVersion = icon.endsWith('-outline'); const trimmedName = isOutlineVersion ? icon.replace('-outline', '') : icon; const variant = isOutlineVersion ? 'outline' : 'filled'; - return {trimmedName: trimmedName, variant: variant}; + return {trimmedName, variant}; } export async function downloadIcons(buildFolder: string) {