This is an automated email from the ASF dual-hosted git repository.
tbonelee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 0c25a6ee09 [ZEPPELIN-6426] Remove redundant eslint-disable comments in
zeppelin-web-angular
0c25a6ee09 is described below
commit 0c25a6ee09cd43f3b4b1de1218b4e43bd8434b86
Author: ChanHo Lee <[email protected]>
AuthorDate: Wed Jun 17 00:48:44 2026 +0900
[ZEPPELIN-6426] Remove redundant eslint-disable comments in
zeppelin-web-angular
### What is this PR for?
zeppelin-web-angular has several eslint-disable comments that no longer
suppress any violation under the current ESLint configuration (e.g.
no-invalid-this, id-blacklist, no-eval, jsdoc/no-types,
<at>typescript-eslint/naming-convention,
<at>angular-eslint/component-class-suffix). These unused directives are
misleading and add noise, so this PR removes them. No functional change.
### What type of PR is it?
Improvement
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6426
### How should this be tested?
* Run `npm run lint` in zeppelin-web-angular and confirm it still passes.
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Closes #5264 from tbonelee/fix-lint.
Signed-off-by: ChanHo Lee <[email protected]>
---
zeppelin-web-angular/eslint.config.js | 7 +++++++
zeppelin-web-angular/projects/zeppelin-react/eslint.config.js | 8 ++++++++
.../zeppelin-sdk/src/interfaces/message-common.interface.ts | 1 -
.../zeppelin-sdk/src/interfaces/message-operator.interface.ts | 1 -
.../zeppelin-visualization/src/g2-visualization-component-base.ts | 1 -
.../projects/zeppelin-visualization/src/table-transformation.ts | 1 -
zeppelin-web-angular/src/app/app-http.interceptor.ts | 1 -
.../src/app/core/destroy-hook/destroy-hook.component.ts | 1 -
.../src/app/core/message-listener/message-listener.ts | 7 +------
zeppelin-web-angular/src/app/languages/scala.ts | 1 -
.../src/app/pages/workspace/share/result/result.component.ts | 1 -
zeppelin-web-angular/src/app/services/helium.service.ts | 1 -
12 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/zeppelin-web-angular/eslint.config.js
b/zeppelin-web-angular/eslint.config.js
index 86f78bb57c..69bc491e05 100644
--- a/zeppelin-web-angular/eslint.config.js
+++ b/zeppelin-web-angular/eslint.config.js
@@ -25,6 +25,13 @@ module.exports = tseslint.config(
// Build output, vendored binaries and the React sub-app are never linted.
ignores: ['dist/**', 'target/**', '.angular/**', 'coverage/**', 'node/**',
'projects/zeppelin-react/**']
},
+ {
+ // Fail (not just warn) on eslint-disable directives that no longer
suppress
+ // anything. The flat-config default is 'warn', and `ng lint` exits 0 on
+ // warnings, so stale directives would otherwise accumulate unnoticed --
+ // promoting to 'error' keeps the ZEPPELIN-6426 cleanup enforced.
+ linterOptions: { reportUnusedDisableDirectives: 'error' }
+ },
{
files: ['**/*.ts'],
// == legacy `plugin:@angular-eslint/recommended` (sets the TS parser and
diff --git a/zeppelin-web-angular/projects/zeppelin-react/eslint.config.js
b/zeppelin-web-angular/projects/zeppelin-react/eslint.config.js
index b981e30ca1..4cc363261d 100644
--- a/zeppelin-web-angular/projects/zeppelin-react/eslint.config.js
+++ b/zeppelin-web-angular/projects/zeppelin-react/eslint.config.js
@@ -31,6 +31,14 @@ module.exports = tseslint.config(
// == legacy `ignorePatterns`
ignores: ['dist/**', 'node_modules/**', 'webpack.config.js']
},
+ {
+ // Fail (not just warn) on eslint-disable directives that no longer
suppress
+ // anything. The flat-config default is 'warn', and `npm run lint:react`
+ // (plain `eslint`, no --max-warnings) exits 0 on warnings, so stale
+ // directives would otherwise accumulate unnoticed -- mirrors the root
+ // zeppelin-web-angular config (ZEPPELIN-6426).
+ linterOptions: { reportUnusedDisableDirectives: 'error' }
+ },
{
files: ['src/**/*.{ts,tsx}'],
// == legacy `extends`: eslint:recommended + @typescript-eslint/recommended
diff --git
a/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-common.interface.ts
b/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-common.interface.ts
index 2ebbe71f52..dfbaf4bf18 100644
---
a/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-common.interface.ts
+++
b/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-common.interface.ts
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/naming-convention */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git
a/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-operator.interface.ts
b/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-operator.interface.ts
index c1a0c96952..1f8036b393 100644
---
a/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-operator.interface.ts
+++
b/zeppelin-web-angular/projects/zeppelin-sdk/src/interfaces/message-operator.interface.ts
@@ -10,7 +10,6 @@
* limitations under the License.
*/
-/* eslint-disable jsdoc/no-types */
/**
* Representation of event type.
*/
diff --git
a/zeppelin-web-angular/projects/zeppelin-visualization/src/g2-visualization-component-base.ts
b/zeppelin-web-angular/projects/zeppelin-visualization/src/g2-visualization-component-base.ts
index 3a1f3da43c..cc6e01173f 100644
---
a/zeppelin-web-angular/projects/zeppelin-visualization/src/g2-visualization-component-base.ts
+++
b/zeppelin-web-angular/projects/zeppelin-visualization/src/g2-visualization-component-base.ts
@@ -21,7 +21,6 @@ import { Visualization } from './visualization';
template: '',
standalone: false
})
-// eslint-disable-next-line @angular-eslint/component-class-suffix
export abstract class G2VisualizationComponentBase implements OnDestroy {
abstract container: ElementRef<HTMLDivElement>;
chart?: G2.Chart | null;
diff --git
a/zeppelin-web-angular/projects/zeppelin-visualization/src/table-transformation.ts
b/zeppelin-web-angular/projects/zeppelin-visualization/src/table-transformation.ts
index fcaf559cb5..aa671fcd73 100644
---
a/zeppelin-web-angular/projects/zeppelin-visualization/src/table-transformation.ts
+++
b/zeppelin-web-angular/projects/zeppelin-visualization/src/table-transformation.ts
@@ -14,7 +14,6 @@ import { GraphConfig } from '@zeppelin/sdk';
import { TableData } from './table-data';
import { Transformation } from './transformation';
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
export class TableTransformation extends Transformation {
constructor(config: GraphConfig) {
super(config);
diff --git a/zeppelin-web-angular/src/app/app-http.interceptor.ts
b/zeppelin-web-angular/src/app/app-http.interceptor.ts
index db003370f9..e3e4f26a4f 100644
--- a/zeppelin-web-angular/src/app/app-http.interceptor.ts
+++ b/zeppelin-web-angular/src/app/app-http.interceptor.ts
@@ -28,7 +28,6 @@ export class AppHttpInterceptor implements HttpInterceptor {
intercept(httpRequest: HttpRequest<any>, next: HttpHandler):
Observable<HttpEvent<any>> {
let httpRequestUpdated = httpRequest.clone({ withCredentials: true });
if (environment.production) {
- // eslint-disable-next-line @typescript-eslint/naming-convention
httpRequestUpdated = httpRequest.clone({ setHeaders: {
'X-Requested-With': 'XMLHttpRequest' } });
}
return next.handle(httpRequestUpdated).pipe(
diff --git
a/zeppelin-web-angular/src/app/core/destroy-hook/destroy-hook.component.ts
b/zeppelin-web-angular/src/app/core/destroy-hook/destroy-hook.component.ts
index 97d15b2d7e..12e7374e9b 100644
--- a/zeppelin-web-angular/src/app/core/destroy-hook/destroy-hook.component.ts
+++ b/zeppelin-web-angular/src/app/core/destroy-hook/destroy-hook.component.ts
@@ -17,7 +17,6 @@ import { Subject } from 'rxjs';
template: '',
standalone: false
})
-// eslint-disable-next-line @angular-eslint/component-class-suffix
export class DestroyHookComponent implements OnDestroy {
readonly destroy$ = new Subject<void>();
diff --git
a/zeppelin-web-angular/src/app/core/message-listener/message-listener.ts
b/zeppelin-web-angular/src/app/core/message-listener/message-listener.ts
index 12897460ae..6487124ecc 100644
--- a/zeppelin-web-angular/src/app/core/message-listener/message-listener.ts
+++ b/zeppelin-web-angular/src/app/core/message-listener/message-listener.ts
@@ -19,7 +19,6 @@ import { Message, MessageReceiveDataTypeMap,
ReceiveArgumentsType } from '@zeppe
template: '',
standalone: false
})
-// eslint-disable-next-line @angular-eslint/component-class-suffix
export class MessageListenersManager implements OnDestroy {
__zeppelinMessageListeners__?: Array<() => void>;
__zeppelinMessageListeners$__: Subscriber<unknown> | null = new Subscriber();
@@ -43,18 +42,14 @@ export function MessageListener<K extends keyof
MessageReceiveDataTypeMap>(op: K
) {
const oldValue = descriptor.value as ReceiveArgumentsType<K>;
- // eslint-disable-next-line no-invalid-this
const fn = function (this: MessageListenersManager) {
- // eslint-disable-next-line no-invalid-this
if (!this.__zeppelinMessageListeners$__) {
throw new Error('__zeppelinMessageListeners$__ is not defined');
}
- // eslint-disable-next-line no-invalid-this
+
this.__zeppelinMessageListeners$__.add(
- // eslint-disable-next-line no-invalid-this
this.messageService.receive(op).subscribe(data => {
// @ts-ignore
- // eslint-disable-next-line no-invalid-this
oldValue.apply(this, [data]);
})
);
diff --git a/zeppelin-web-angular/src/app/languages/scala.ts
b/zeppelin-web-angular/src/app/languages/scala.ts
index 4b8c821055..4930eb05c9 100644
--- a/zeppelin-web-angular/src/app/languages/scala.ts
+++ b/zeppelin-web-angular/src/app/languages/scala.ts
@@ -232,7 +232,6 @@ export const language = {
[/[\/*]/, 'comment.doc']
],
- // eslint-disable-next-line id-blacklist
string: [
[/[^\\"]+/, 'string'],
[/@escapes/, 'string.escape'],
diff --git
a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
index 85f9715c7f..1b2ef5c9f3 100644
---
a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
+++
b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
@@ -596,7 +596,6 @@ export class NotebookParagraphResultComponent implements
OnInit, AfterViewInit,
this.destroy$.complete();
}
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
private commitClassicVizConfigChange(configForMode: GraphConfig, mode:
string) {
if (this.isPending) {
return;
diff --git a/zeppelin-web-angular/src/app/services/helium.service.ts
b/zeppelin-web-angular/src/app/services/helium.service.ts
index 84fe126e2f..f120bc120d 100644
--- a/zeppelin-web-angular/src/app/services/helium.service.ts
+++ b/zeppelin-web-angular/src/app/services/helium.service.ts
@@ -91,7 +91,6 @@ export class HeliumService extends BaseRest {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any)._heliumBundles = [] as HeliumBundle[];
availableBundles.forEach(bundle => {
- // eslint-disable-next-line no-eval
eval(bundle);
});