mirror of
https://github.com/apache/superset.git
synced 2026-04-23 18:14:56 +00:00
chore(lint): enforce stricter eslint/oxlint rules (#37883)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,12 +117,16 @@ interface AppState {
|
||||
class App extends PureComponent<AppProps, AppState> {
|
||||
hasLoggedLocalStorageUsage: boolean;
|
||||
|
||||
private boundOnHashChanged: () => void;
|
||||
|
||||
constructor(props: AppProps) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hash: window.location.hash,
|
||||
};
|
||||
|
||||
this.boundOnHashChanged = this.onHashChanged.bind(this);
|
||||
|
||||
this.showLocalStorageUsageWarning = throttle(
|
||||
this.showLocalStorageUsageWarning,
|
||||
LOCALSTORAGE_WARNING_MESSAGE_THROTTLE_MS,
|
||||
@@ -131,7 +135,7 @@ class App extends PureComponent<AppProps, AppState> {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener('hashchange', this.onHashChanged.bind(this));
|
||||
window.addEventListener('hashchange', this.boundOnHashChanged);
|
||||
|
||||
// Horrible hack to disable side swipe navigation when in SQL Lab. Even though the
|
||||
// docs say setting this style on any div will prevent it, turns out it only works
|
||||
@@ -165,7 +169,7 @@ class App extends PureComponent<AppProps, AppState> {
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('hashchange', this.onHashChanged.bind(this));
|
||||
window.removeEventListener('hashchange', this.boundOnHashChanged);
|
||||
|
||||
// And now we need to reset the overscroll behavior back to the default.
|
||||
document.body.style.overscrollBehaviorX = 'auto';
|
||||
|
||||
@@ -102,6 +102,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
|
||||
);
|
||||
|
||||
function renameTab() {
|
||||
// TODO: Replace native prompt with a proper modal dialog
|
||||
// eslint-disable-next-line no-alert
|
||||
const newTitle = prompt(t('Enter a new title for the tab'));
|
||||
if (newTitle) {
|
||||
actions.queryEditorSetTitle(qe, newTitle, qe.id);
|
||||
|
||||
Reference in New Issue
Block a user