Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
1822296ea8
commit
260b887493
8 changed files with 15 additions and 16 deletions
|
@ -224,7 +224,8 @@ module.exports = {
|
|||
'no-undef-init': 'error',
|
||||
'no-unsafe-finally': 'error',
|
||||
'no-unsanitized/property': 'error',
|
||||
'no-unused-expressions': 'error',
|
||||
'no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'error',
|
||||
'no-unused-labels': 'error',
|
||||
'no-var': 'error',
|
||||
'object-shorthand': 'error',
|
||||
|
|
|
@ -30,10 +30,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await visualBuilder.markdownSwitchSubTab('markdown');
|
||||
const rerenderedTable = await visualBuilder.getMarkdownTableVariables();
|
||||
rerenderedTable.forEach((row) => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
variableName === 'label'
|
||||
? expect(row.key).to.include.string(checkedValue)
|
||||
: expect(row.key).to.not.include.string(checkedValue);
|
||||
if (variableName === 'label') {
|
||||
expect(row.key).to.include.string(checkedValue);
|
||||
} else {
|
||||
expect(row.key).to.not.include.string(checkedValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -107,10 +108,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
|
||||
table.forEach((row, index) => {
|
||||
// exception: last index for variable is always: {{count.label}}
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
index === table.length - 1
|
||||
? expect(row.key).to.not.include.string(VARIABLE)
|
||||
: expect(row.key).to.include.string(VARIABLE);
|
||||
if (index === table.length - 1) {
|
||||
expect(row.key).to.not.include.string(VARIABLE);
|
||||
} else {
|
||||
expect(row.key).to.include.string(VARIABLE);
|
||||
}
|
||||
});
|
||||
|
||||
await cleanupMarkdownData(VARIABLE, VARIABLE);
|
||||
|
|
|
@ -19,7 +19,7 @@ import { MockUrlParamsContextProvider } from '../../../context/UrlParamsContext/
|
|||
// our current storybook setup has core-js-related problems when trying to import
|
||||
// it.
|
||||
// storiesOf('app/TransactionDurationAlertTrigger', module).add('example',
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
() => {
|
||||
const params = {
|
||||
threshold: 1500,
|
||||
|
|
|
@ -85,7 +85,7 @@ export const LogEntryRow = memo(
|
|||
]);
|
||||
|
||||
const handleOpenViewLogInContext = useCallback(() => {
|
||||
openViewLogInContext?.(logEntry); // eslint-disable-line no-unused-expressions
|
||||
openViewLogInContext?.(logEntry);
|
||||
trackMetric({ metric: 'view_in_context__stream' });
|
||||
}, [openViewLogInContext, logEntry, trackMetric]);
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ export const LogEntryCategoriesResultsContent: React.FunctionComponent<LogEntryC
|
|||
|
||||
const showLoadDataErrorNotification = useCallback(
|
||||
(error: Error) => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
services.notifications?.toasts.addError(error, {
|
||||
title: loadDataErrorTitle,
|
||||
});
|
||||
|
|
|
@ -103,7 +103,6 @@ export const LogEntryRateResultsContent: React.FunctionComponent = () => {
|
|||
}),
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
navigateToApp?.('logs', { path: `/stream?${stringify(params)}` });
|
||||
},
|
||||
[queryTimeRange, navigateToApp]
|
||||
|
|
|
@ -102,12 +102,10 @@ const StatefulRowRenderersBrowserComponent: React.FC<StatefulRowRenderersBrowser
|
|||
const hideFieldBrowser = useCallback(() => setShow(false), []);
|
||||
|
||||
const handleDisableAll = useCallback(() => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
tableRef?.current?.setSelection([]);
|
||||
}, [tableRef]);
|
||||
|
||||
const handleEnableAll = useCallback(() => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
tableRef?.current?.setSelection(renderers);
|
||||
}, [tableRef]);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ const RowRenderersBrowserComponent = React.forwardRef(
|
|||
(item: RowRendererOption) => () => {
|
||||
const newSelection = xor([item], notExcludedRowRenderers);
|
||||
// @ts-expect-error
|
||||
ref?.current?.setSelection(newSelection); // eslint-disable-line no-unused-expressions
|
||||
ref?.current?.setSelection(newSelection);
|
||||
},
|
||||
[notExcludedRowRenderers, ref]
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue