Skip to content

Commit

Permalink
Running lint --fix (#20705)
Browse files Browse the repository at this point in the history
Co-authored-by: Dr. Lint-a-lot <[email protected]>
  • Loading branch information
github-actions[bot] and Dr. Lint-a-lot authored Oct 15, 2024
1 parent 25900b3 commit 058ccd5
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const StyledTable = styled.table`
${tableCss}
`;

// eslint-disable-next-line react/prop-types
const NoData = ({ noDataText }) => {
if (typeof noDataText === 'string') {
return (
Expand Down
4 changes: 2 additions & 2 deletions graylog2-web-interface/src/components/common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const StyledBootstrapPagination = styled(BootstrapPagination)(({ theme }) => css
const UltimatePagination = createUltimatePagination({
WrapperComponent: StyledBootstrapPagination,
itemTypeToComponent: {
/* eslint-disable react/prop-types */

[ITEM_TYPES.PAGE]: ({ value, isActive, onClick }) => {
const title = isActive ? 'Active page' : `Open page ${value}`;

Expand Down Expand Up @@ -171,7 +171,7 @@ const UltimatePagination = createUltimatePagination({
</BootstrapPagination.Last>
);
},
/* eslint-enable react/prop-types */

},
});

Expand Down
2 changes: 1 addition & 1 deletion graylog2-web-interface/src/components/common/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import styled, { css, useTheme } from 'styled-components';

const Popover = (props: React.ComponentProps<typeof MantinePopover>) => {
const theme = useTheme();
// eslint-disable-next-line react/prop-types

const arrowBackground = (!props.position || props.position.startsWith('bottom'))
? theme.colors.variant.lightest.default
: theme.colors.global.contentBackground;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ const IndicatorSeparator = () => null;

const DropdownIndicator = (props) => {
const {
/* eslint-disable react/prop-types */

children = <Icon name="arrow_drop_down" />,
getStyles,
innerProps: { ref, ...restInnerProps },
/* eslint-enable react/prop-types */

} = props;

return (
Expand All @@ -63,7 +63,6 @@ const Control = ({ children, ...props }: React.ComponentProps<typeof Components.
<Components.Control {...props} className={CONTROL_CLASS}>{children}</Components.Control>
);

/* eslint-disable react/prop-types */
const CustomOption = (optionRenderer: (option: Option, isSelected: boolean) => React.ReactElement) => (
(props: React.ComponentProps<typeof Components.Option>): React.ReactElement => {
const { data, isSelected } = props;
Expand All @@ -81,7 +80,6 @@ const CustomSingleValue = (valueRenderer: (option: Option) => React.ReactElement

return <Components.SingleValue {...props}>{valueRenderer(data)}</Components.SingleValue>;
};
/* eslint-enable react/prop-types */

const CustomInput = (inputProps: { [key: string]: any }) => (
(props) => <Components.Input {...props} {...inputProps} />
Expand Down
10 changes: 5 additions & 5 deletions graylog2-web-interface/src/components/common/TypeAheadInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Container = styled.div(({ theme }) => css`
}
.tt-query {
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%);
}
input[type="text"].tt-hint {
Expand All @@ -59,9 +59,9 @@ export const Container = styled.div(({ theme }) => css`
.tt-menu {
min-width: 160px;
//background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.2);
border: 1px solid rgb(0 0 0 / 20%);
border-radius: 4px;
//box-shadow: 0 5px 10px rgba(0,0,0,.2);
//box-shadow: 0 5px 10px rgb(0 0 0 / 20%);
width: 100%;
background-color: ${theme.colors.global.contentBackground};
box-shadow: 0 3px 3px ${theme.colors.global.navigationBoxShadow};
Expand All @@ -88,10 +88,10 @@ export const Container = styled.div(({ theme }) => css`
.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
color: #ffffff;
color: #fff;
text-decoration: none;
background-color: #0081c2;
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #08c, #0077b3);
background-repeat: repeat-x;
outline: 0;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Props = {
streams: Array<Stream>,
decorators: Array<Decorator>,
types: { [key: string]: any },
// eslint-disable-next-line react/require-default-props

show?: boolean,
onCancel: () => void,
onSave: (newDecorators: Array<Decorator>) => unknown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jest.mock('react-router-dom', () => {
};
});

// eslint-disable-next-line react/prop-types
const TestCommonProviders = ({ children }) => (
<ApiContext.Provider value={{
availableStreams: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as React from 'react';
import { Grid } from '@mantine/core';

const Col = ({ children, ...props }: React.ComponentProps<typeof Grid.Col>) => (
// eslint-disable-next-line react/prop-types

<Grid.Col {...props} style={{ ...props.style }}>
{children}
</Grid.Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { createViewWithWidgets } from 'fixtures/searches';
import WidgetGrid from './WidgetGrid';

jest.mock('./widgets/Widget', () => () => 'widget');
// eslint-disable-next-line react/prop-types

jest.mock('components/common/ReactGridContainer', () => ({ children }) => <span>{children}</span>);

jest.mock('views/components/contexts/WidgetFieldTypesContextProvider', () => ({ children }) => children);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jest.mock('hooks/usePluginEntities');
jest.mock('logic/rest/FetchProvider', () => jest.fn(() => Promise.resolve()));

type SUTProps = {
// eslint-disable-next-line react/require-default-props

error?: QueryValidationState,
// eslint-disable-next-line react/require-default-props

warning?: QueryValidationState,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import FieldType, { Properties } from 'views/logic/fieldtypes/FieldType';
describe('HighlightingColorForm', () => {
const field = FieldTypeMapping.create('foo', FieldType.create('number', [Properties.Numeric]));

// eslint-disable-next-line react/prop-types
const SimpleForm = ({ value = undefined, ...rest }) => (
<Formik initialValues={{ color: value }} onSubmit={() => {}}>
<HighlightingColorForm field={field} {...rest} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const chartData = [
const columnPivots = [Pivot.create(['field1'], 'unknown')];
const config = AggregationWidgetConfig.builder().series([Series.forFunction('count')]).columnPivots(columnPivots).build();

// eslint-disable-next-line react/require-default-props
const SUT = ({ chartDataProp = chartData, plotConfig = config, neverHide = false }: { chartDataProp?: Array<{ name: string, }>, plotConfig?: AggregationWidgetConfig, neverHide?: boolean }) => (
<WidgetFocusContext.Provider value={{
focusedWidget: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jest.mock('views/components/Value', () => ({ value }: { value: string }) => <div

type Data = Record<string, Rows>;
type SUTProps = {
// eslint-disable-next-line react/require-default-props

data?: Data;
};

Expand Down

0 comments on commit 058ccd5

Please sign in to comment.