Files
superset2/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx
Superset Dev 0e32b0399f chore(lint): upgrade no-unused-vars rule from warn to error
Flip @typescript-eslint/no-unused-vars from "warn" to "error" in
oxlint.json (with argsIgnorePattern/varsIgnorePattern of "^_" and
caughtErrors "none"), and clean up the resulting violations across the
frontend.

Fixes favor proper cleanup over underscore hacks: genuinely dead
imports, variables, and destructured props are removed; parameters are
only "_"-prefixed when their position is required by an external or
callback signature (event handlers, render props, antd validators,
forwardRef, or omit-from-rest destructuring).

Note: the .eslintrc.js half of the prior attempt (#37886) is obsolete
since the frontend migrated to oxlint as the primary linter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-16 15:48:06 -07:00

40 lines
1.3 KiB
TypeScript

/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core/translation';
import type { ErrorMessageComponentProps } from './types';
import { ErrorAlert } from './ErrorAlert';
export function FrontendNetworkErrorMessage({
error,
compact,
closable,
}: ErrorMessageComponentProps) {
const { level, message } = error;
return (
<ErrorAlert
compact={compact}
closable={closable}
errorType={t('Network Error')}
message={message}
type={level}
/>
);
}