chore(lint): enforce stricter eslint/oxlint rules (#37883)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-02-11 11:07:02 -05:00
committed by GitHub
parent c28729f944
commit 534fa48f1f
9 changed files with 29 additions and 6 deletions

View File

@@ -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';

View File

@@ -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);