mark unused vars as errors

Reviewed By: lblasa

Differential Revision: D50500690

fbshipit-source-id: 6f739fe25c232ecfe842337af4399681e85f6a13
This commit is contained in:
Anton Kastritskiy
2023-10-20 12:44:58 -07:00
committed by Facebook GitHub Bot
parent 4834fda6fa
commit 663380e721
14 changed files with 11 additions and 28 deletions

View File

@@ -204,7 +204,7 @@ module.exports = {
'no-dupe-class-members': 0,
'@typescript-eslint/no-redeclare': 1,
'@typescript-eslint/no-unused-vars': [
1,
2,
{
ignoreRestSiblings: true,
varsIgnorePattern: '^_',

View File

@@ -22,7 +22,6 @@ import {
checkPortInUse,
getAuthToken,
getEnvironmentInfo,
hasAuthToken,
setupPrefetcher,
startFlipperServer,
startServer,

View File

@@ -7,7 +7,7 @@
* @format
*/
import React, {CSSProperties, forwardRef} from 'react';
import React from 'react';
import styled from '@emotion/styled';
import {
normalizePadding,

View File

@@ -16,7 +16,6 @@ import React, {
} from 'react';
import {Badge, Tooltip, Typography, Button} from 'antd';
import styled from '@emotion/styled';
import {keyframes} from '@emotion/css';
import reactElementToJSXString from 'react-element-to-jsx-string';
import {SandyPluginContext} from '../plugin/PluginContext';
import {createState} from 'flipper-plugin-core';

View File

@@ -7,15 +7,9 @@
* @format
*/
import React, {CSSProperties, forwardRef} from 'react';
import React, {CSSProperties} from 'react';
import styled from '@emotion/styled';
import {
normalizePadding,
normalizeSpace,
PaddingProps,
Spacing,
theme,
} from './theme';
import {normalizeSpace, Spacing, theme} from './theme';
import type {SplitLayoutProps} from './Layout';
import {Sidebar} from './Sidebar';

View File

@@ -27,7 +27,7 @@ export const ERR_NO_IDB_OR_XCODE_AVAILABLE =
export const ERR_PHYSICAL_DEVICE_LOGS_WITHOUT_IDB =
'Cannot provide logs from a physical device without idb.';
// eslint-disable-next-line @typescript-eslint/naming-convention
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
type iOSSimulatorDevice = {
state: 'Booted' | 'Shutdown' | 'Shutting Down';
availability?: string;

View File

@@ -7,10 +7,7 @@
* @format
*/
import os from 'os';
import xdgBasedir from 'xdg-basedir';
import net from 'net';
import fs from 'fs-extra';
import fetch from 'node-fetch';
import {EnvironmentInfo} from 'flipper-common';
import semver from 'semver';

View File

@@ -7,6 +7,8 @@
* @format
*/
// otherwise there is an error with `declare global`
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type {RenderHost} from 'flipper-ui-core';
declare global {

View File

@@ -19,7 +19,7 @@ import {useCallback} from 'react';
import {useDispatch, useSelector} from 'react-redux';
import {PluginDefinition} from '../plugin';
import {startPluginDownload} from '../reducers/pluginDownloads';
import {loadPlugin, switchPlugin} from '../reducers/pluginManager';
import {switchPlugin} from '../reducers/pluginManager';
import {
getActiveClient,
getPluginDownloadStatusMap,

View File

@@ -27,13 +27,6 @@ type Props = {
color: Color;
};
const DefaultColor: Color = {
r: 255,
g: 255,
b: 255,
a: 1,
};
const CenteredContentContainer = styled.div(AutoMarginStyle);
const ObjectContainer = styled.div(ObjectContainerStyle);
const NumberValue = styled.span(NumberAttributeValueStyle);

View File

@@ -437,7 +437,7 @@ async function buildServerRelease() {
await fs.mkdirp(path.join(dir, 'static', 'defaultPlugins'));
await prepareDefaultPlugins(argv.channel === 'insiders');
await compileServerMain(false);
await compileServerMain();
await copyStaticResources(dir, versionNumber);
await linkLocalDeps(dir);
await downloadIcons(path.join(dir, 'static'));

View File

@@ -279,7 +279,7 @@ export function genMercurialRevision(): Promise<string | null> {
.catch(() => null);
}
export async function compileServerMain(dev: boolean) {
export async function compileServerMain() {
console.log('⚙️ Compiling server sources...');
await exec(`cd ${serverDir} && yarn build`);
console.log('✅ Compiled server sources.');

View File

@@ -102,7 +102,7 @@ async function copyStaticResources() {
async function restartServer() {
try {
await compileServerMain(true);
await compileServerMain();
await launchServer(true, ++startCount === 1); // only open on the first time
} catch (e) {
console.error(

View File

@@ -16,7 +16,6 @@ import {EOL} from 'os';
import pmap from 'p-map';
import {rootDir} from './paths';
import yargs from 'yargs';
import {isPluginJson} from 'flipper-common';
const argv = yargs
.usage('yarn tsc-plugins [args]')