From ffdc0c3aa24571a83d0871ea768fae129c87be70 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Fri, 29 Aug 2025 08:25:38 +0900 Subject: [PATCH 01/14] [ZEPPELIN-6305] chore: edit package.json so that lint cover projects path --- zeppelin-web-angular/package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index 1a418855e4b..b9b051e08c8 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -13,7 +13,8 @@ "build-project:vis": " ng build --project zeppelin-visualization", "build-project:helium": "ng build --project zeppelin-helium", "test": "ng test", - "lint": "ng lint && prettier --check \"src/**/*.{ts,js,css,html}\"", + "lint": "ng lint && prettier --check \"{src,projects}/**/*.{ts,js,css,html}\"", + "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix projects/**/*.ts && prettier --write \"{src,projects}/**/*.{ts,js,css,html}\"", "e2e": "ng e2e" }, "engines": { @@ -88,13 +89,17 @@ "typescript": "3.8.3" }, "lint-staged": { - "src/**/*.{ts,js,json}": [ + "{src,projects}/**/*.{ts,js,json}": [ "./node_modules/.bin/prettier --write", "git add" ], "src/**/*.ts": [ "tslint --project src/tslint.json --fix", "git add" + ], + "projects/**/*.ts": [ + "tslint --project tslint.json --fix", + "git add" ] }, "husky": { From 5b247ab4214589de164dccd2e990e946d9d50940 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Tue, 2 Sep 2025 00:22:55 +0900 Subject: [PATCH 02/14] ZEPPELIN-6305 chore: apply npm run lint:fix --- .../projects/helium-vis-example/karma.conf.js | 2 +- .../helium-vis-example/src/json-vis.module.ts | 2 +- .../projects/helium-vis-example/src/test.ts | 10 +--- .../projects/zeppelin-helium/karma.conf.js | 2 +- .../zeppelin-helium/src/common-deps.ts | 2 +- .../projects/zeppelin-helium/src/test.ts | 10 +--- .../src/zeppelin-helium.module.ts | 2 +- .../src/zeppelin-helium.service.ts | 32 +++++------ .../projects/zeppelin-sdk/karma.conf.js | 2 +- .../interfaces/message-operator.interface.ts | 6 +- .../projects/zeppelin-sdk/src/message.ts | 56 +++++++------------ .../zeppelin-visualization/karma.conf.js | 2 +- .../src/g2-visualization-component-base.ts | 4 +- 13 files changed, 53 insertions(+), 79 deletions(-) diff --git a/zeppelin-web-angular/projects/helium-vis-example/karma.conf.js b/zeppelin-web-angular/projects/helium-vis-example/karma.conf.js index ed77432da6e..c13ce59e931 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/karma.conf.js +++ b/zeppelin-web-angular/projects/helium-vis-example/karma.conf.js @@ -13,7 +13,7 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function (config) { +module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], diff --git a/zeppelin-web-angular/projects/helium-vis-example/src/json-vis.module.ts b/zeppelin-web-angular/projects/helium-vis-example/src/json-vis.module.ts index caa81eabfd4..a259f70a658 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/src/json-vis.module.ts +++ b/zeppelin-web-angular/projects/helium-vis-example/src/json-vis.module.ts @@ -20,4 +20,4 @@ import { JsonVisComponent } from './json-vis.component'; entryComponents: [JsonVisComponent], exports: [JsonVisComponent] }) -export class JsonVisModule { } +export class JsonVisModule {} diff --git a/zeppelin-web-angular/projects/helium-vis-example/src/test.ts b/zeppelin-web-angular/projects/helium-vis-example/src/test.ts index f003001f581..951bb4eb70f 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/src/test.ts +++ b/zeppelin-web-angular/projects/helium-vis-example/src/test.ts @@ -13,20 +13,14 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import { getTestBed } from '@angular/core/testing'; -import { - platformBrowserDynamicTesting, - BrowserDynamicTestingModule -} from '@angular/platform-browser-dynamic/testing'; +import { platformBrowserDynamicTesting, BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing'; // tslint:disable-next-line:no-import-side-effect import 'zone.js/dist/zone'; // tslint:disable-next-line:no-import-side-effect import 'zone.js/dist/zone-testing'; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); declare const require: NodeJS.Require; diff --git a/zeppelin-web-angular/projects/zeppelin-helium/karma.conf.js b/zeppelin-web-angular/projects/zeppelin-helium/karma.conf.js index 3ddb74a1a49..ea627c1bfed 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/karma.conf.js +++ b/zeppelin-web-angular/projects/zeppelin-helium/karma.conf.js @@ -13,7 +13,7 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function (config) { +module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], diff --git a/zeppelin-web-angular/projects/zeppelin-helium/src/common-deps.ts b/zeppelin-web-angular/projects/zeppelin-helium/src/common-deps.ts index a4595ce7e4a..e10b3ccdd3b 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/src/common-deps.ts +++ b/zeppelin-web-angular/projects/zeppelin-helium/src/common-deps.ts @@ -37,7 +37,7 @@ export const COMMON_DEPS = { '@zeppelin/sdk': sdk, '@zeppelin/visualization': visualization, '@zeppelin/helium': zeppelinHelium, - 'lodash': lodash, + lodash: lodash, 'ng-zorro-antd': ngZorro, rxjs, tslib diff --git a/zeppelin-web-angular/projects/zeppelin-helium/src/test.ts b/zeppelin-web-angular/projects/zeppelin-helium/src/test.ts index 393a1592962..6f0de9170d0 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/src/test.ts +++ b/zeppelin-web-angular/projects/zeppelin-helium/src/test.ts @@ -13,10 +13,7 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import { getTestBed } from '@angular/core/testing'; -import { - platformBrowserDynamicTesting, - BrowserDynamicTestingModule -} from '@angular/platform-browser-dynamic/testing'; +import { platformBrowserDynamicTesting, BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing'; // tslint:disable-next-line:no-import-side-effect import 'zone.js/dist/zone'; // tslint:disable-next-line:no-import-side-effect @@ -25,10 +22,7 @@ import 'zone.js/dist/zone-testing'; declare const require: NodeJS.Require; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.module.ts b/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.module.ts index e24ac800a78..2b3985d5f57 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.module.ts +++ b/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.module.ts @@ -13,4 +13,4 @@ import { NgModule } from '@angular/core'; @NgModule({}) -export class ZeppelinHeliumModule { } +export class ZeppelinHeliumModule {} diff --git a/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.service.ts b/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.service.ts index 42b339c8a59..1833deed88e 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.service.ts +++ b/zeppelin-web-angular/projects/zeppelin-helium/src/zeppelin-helium.service.ts @@ -30,8 +30,7 @@ export class ZeppelinHeliumPackage { public icon = 'build', // tslint:disable-next-line:no-any public visualization?: any - ) { - } + ) {} } export enum HeliumPackageType { @@ -49,7 +48,7 @@ export function createHeliumPackage(config: { // tslint:disable-next-line:no-any component: Type; // tslint:disable-next-line:no-any - visualization?: any + visualization?: any; }) { return new ZeppelinHeliumPackage( config.name, @@ -65,10 +64,9 @@ export function createHeliumPackage(config: { providedIn: ZeppelinHeliumModule }) export class ZeppelinHeliumService { - depsDefined = false; - constructor() { } + constructor() {} defineDeps() { if (this.depsDefined) { @@ -77,21 +75,23 @@ export class ZeppelinHeliumService { Object.entries(COMMON_DEPS).forEach(([externalKey, externalValue]) => // tslint:disable-next-line:no-any (window as any).define(externalKey, [], () => externalValue) - ) + ); this.depsDefined = true; } loadPackage(name: string): Promise { this.defineDeps(); - return SystemJs.import(`./assets/helium-packages/${name}.umd.js`) - .then(() => SystemJs.import(name)) - // tslint:disable-next-line:no-any - .then((plugin: any) => { - if (plugin instanceof ZeppelinHeliumPackage) { - return Promise.resolve(plugin); - } else { - throw new TypeError('This module is not a valid helium package'); - } - }); + return ( + SystemJs.import(`./assets/helium-packages/${name}.umd.js`) + .then(() => SystemJs.import(name)) + // tslint:disable-next-line:no-any + .then((plugin: any) => { + if (plugin instanceof ZeppelinHeliumPackage) { + return Promise.resolve(plugin); + } else { + throw new TypeError('This module is not a valid helium package'); + } + }) + ); } } diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/karma.conf.js b/zeppelin-web-angular/projects/zeppelin-sdk/karma.conf.js index bf69ea2ebb1..fbf53c55e4f 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/karma.conf.js +++ b/zeppelin-web-angular/projects/zeppelin-sdk/karma.conf.js @@ -13,7 +13,7 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function (config) { +module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], 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 cc10753cffc..1d31d208b9d 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 @@ -373,9 +373,9 @@ export enum OP { GET_INTERPRETER_BINDINGS = 'GET_INTERPRETER_BINDINGS', /** - * [c-s] - * @param selectedSettingIds - */ + * [c-s] + * @param selectedSettingIds + */ SAVE_INTERPRETER_BINDINGS = 'SAVE_INTERPRETER_BINDINGS', /** diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/src/message.ts b/zeppelin-web-angular/projects/zeppelin-sdk/src/message.ts index cd30db598f5..951e140bd9d 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/src/message.ts +++ b/zeppelin-web-angular/projects/zeppelin-sdk/src/message.ts @@ -10,30 +10,25 @@ * limitations under the License. */ -import {interval, Observable, Subject, Subscription} from 'rxjs'; -import {delay, filter, map, mergeMap, retryWhen, take} from 'rxjs/operators'; -import {webSocket, WebSocketSubject} from 'rxjs/webSocket'; +import { interval, Observable, Subject, Subscription } from 'rxjs'; +import { delay, filter, map, mergeMap, retryWhen, take } from 'rxjs/operators'; +import { webSocket, WebSocketSubject } from 'rxjs/webSocket'; -import {Ticket} from './interfaces/message-common.interface'; +import { Ticket } from './interfaces/message-common.interface'; import { MessageReceiveDataTypeMap, MessageSendDataTypeMap, MixMessageDataTypeMap } from './interfaces/message-data-type-map.interface'; -import { - Note, - NoteConfig, - PersonalizedMode, - SendNote -} from './interfaces/message-notebook.interface'; -import {OP} from './interfaces/message-operator.interface'; +import { Note, NoteConfig, PersonalizedMode, SendNote } from './interfaces/message-notebook.interface'; +import { OP } from './interfaces/message-operator.interface'; import { DynamicFormParams, ParagraphConfig, ParagraphParams, SendParagraph } from './interfaces/message-paragraph.interface'; -import {WebSocketMessage} from './interfaces/websocket-message.interface'; +import { WebSocketMessage } from './interfaces/websocket-message.interface'; export type ArgumentsType = T extends (...args: infer U) => void ? U : never; @@ -56,7 +51,9 @@ export class Message { private pingIntervalSubscription = new Subscription(); private wsUrl?: string; private ticket?: Ticket; - private uniqueClientId = Math.random().toString(36).substring(2, 7); + private uniqueClientId = Math.random() + .toString(36) + .substring(2, 7); private lastMsgIdSeqSent = 0; constructor() { @@ -99,9 +96,7 @@ export class Message { connect() { if (!this.wsUrl) { - throw new Error( - 'WebSocket URL is not set. Please call setWsUrl() before connect()' - ) + throw new Error('WebSocket URL is not set. Please call setWsUrl() before connect()'); } this.ws = webSocket>({ url: this.wsUrl, @@ -112,18 +107,9 @@ export class Message { this.ws .pipe( // reconnect - retryWhen(errors => - errors.pipe( - mergeMap(() => - this.close$.pipe( - take(1), - delay(4000) - ) - ) - ) - ) + retryWhen(errors => errors.pipe(mergeMap(() => this.close$.pipe(take(1), delay(4000))))) ) - .subscribe((e) => { + .subscribe(e => { console.log('Receive:', e); this.received$.next(this.interceptReceived(e as WebSocketMessage)); }); @@ -184,9 +170,7 @@ export class Message { const isResponseForRequestFromThisClient = uniqueClientId === this.uniqueClientId; if (message.op === OP.PARAGRAPH) { - if (isResponseForRequestFromThisClient && - this.lastMsgIdSeqSent > msgIdSeqReceived - ) { + if (isResponseForRequestFromThisClient && this.lastMsgIdSeqSent > msgIdSeqReceived) { console.log('PARAPGRAPH is already updated by shortcircuit'); return false; } else { @@ -282,7 +266,7 @@ export class Message { } reloadNote(noteId: string): void { - this.send(OP.RELOAD_NOTE, { id: noteId }) + this.send(OP.RELOAD_NOTE, { id: noteId }); } getNote(noteId: string): void { @@ -411,9 +395,9 @@ export class Message { op: OP.PARAGRAPH_STATUS, data: { id: paragraphId, - status: "PENDING" + status: 'PENDING' } - }) + }); // send message to server this.send(OP.RUN_PARAGRAPH, { @@ -542,8 +526,10 @@ export class Message { } saveInterpreterBindings(noteId: string, selectedSettingIds: string[]): void { - this.send(OP.SAVE_INTERPRETER_BINDINGS, - {noteId: noteId, selectedSettingIds: selectedSettingIds}); + this.send(OP.SAVE_INTERPRETER_BINDINGS, { + noteId: noteId, + selectedSettingIds: selectedSettingIds + }); } listConfigurations(): void { diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/karma.conf.js b/zeppelin-web-angular/projects/zeppelin-visualization/karma.conf.js index e04c06a8f52..1e0e9a02881 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/karma.conf.js +++ b/zeppelin-web-angular/projects/zeppelin-visualization/karma.conf.js @@ -13,7 +13,7 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function (config) { +module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], 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 d7fe02bfcca..5969387103d 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 @@ -60,7 +60,7 @@ export abstract class G2VisualizationComponentBase implements OnDestroy { this.chart.changeHeight(this.config.height || 400); setTimeout(() => { if (!this.chart) { - throw new Error('Can not refresh the chart, Please make sure on correct assignment.') + throw new Error('Can not refresh the chart, Please make sure on correct assignment.'); } this.setScale(this.chart); this.chart.forceFit(); @@ -91,7 +91,7 @@ export abstract class G2VisualizationComponentBase implements OnDestroy { throw new Error(`Can't find the container, Please make sure on correct assignment.`); } } - return this.chart + return this.chart; } ngOnDestroy(): void { From 9ce714bb8a8b5d365238ed22077108e610c4142a Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 00:15:04 +0900 Subject: [PATCH 03/14] [ZEPPELIN-6305] refactor: fix lint target from a specific folder to **/*.ts --- zeppelin-web-angular/.prettierignore | 5 +++++ zeppelin-web-angular/package.json | 8 ++++---- zeppelin-web-angular/tslint.json | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/zeppelin-web-angular/.prettierignore b/zeppelin-web-angular/.prettierignore index b9f1979fbdf..460e0367a80 100644 --- a/zeppelin-web-angular/.prettierignore +++ b/zeppelin-web-angular/.prettierignore @@ -1,3 +1,8 @@ **/*.md **/*.less **/*.svg + +dist/* +node/* +node_modules/* +target/* \ No newline at end of file diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index b9b051e08c8..b51f83ea4be 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -13,8 +13,8 @@ "build-project:vis": " ng build --project zeppelin-visualization", "build-project:helium": "ng build --project zeppelin-helium", "test": "ng test", - "lint": "ng lint && prettier --check \"{src,projects}/**/*.{ts,js,css,html}\"", - "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix projects/**/*.ts && prettier --write \"{src,projects}/**/*.{ts,js,css,html}\"", + "lint": "ng lint && prettier --check \"**/*.{ts,js,css,html}\"", + "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix **/*.ts && prettier --write \"**/*.{ts,js,css,html}\"", "e2e": "ng e2e" }, "engines": { @@ -89,7 +89,7 @@ "typescript": "3.8.3" }, "lint-staged": { - "{src,projects}/**/*.{ts,js,json}": [ + "**/*.{ts,js,json}": [ "./node_modules/.bin/prettier --write", "git add" ], @@ -97,7 +97,7 @@ "tslint --project src/tslint.json --fix", "git add" ], - "projects/**/*.ts": [ + "**/*.ts": [ "tslint --project tslint.json --fix", "git add" ] diff --git a/zeppelin-web-angular/tslint.json b/zeppelin-web-angular/tslint.json index f8cc3bf2062..f8a877587bf 100644 --- a/zeppelin-web-angular/tslint.json +++ b/zeppelin-web-angular/tslint.json @@ -1,5 +1,8 @@ { "rulesDirectory": ["node_modules/codelyzer", "node_modules/nz-tslint-rules", "tslint-rules"], + "linterOptions": { + "exclude": ["src/**/*.ts", "dist/**", "node/**", "node_modules/**"] + }, "rules": { "nz-secondary-entry-imports": true, "banana-in-box": true, From 77393e471db57d230b999979a7161f48e8e5344a Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 00:19:44 +0900 Subject: [PATCH 04/14] [ZEPPELIN-6305] chore: apply npm run lint:fix --- zeppelin-web-angular/e2e/protractor.conf.js | 8 ++--- zeppelin-web-angular/e2e/src/app.e2e-spec.ts | 13 ++++--- zeppelin-web-angular/karma.conf.js | 2 +- zeppelin-web-angular/webpack.partial.js | 38 +++++++++++++++++--- 4 files changed, 47 insertions(+), 14 deletions(-) diff --git a/zeppelin-web-angular/e2e/protractor.conf.js b/zeppelin-web-angular/e2e/protractor.conf.js index 1be6b530682..7db8a814918 100644 --- a/zeppelin-web-angular/e2e/protractor.conf.js +++ b/zeppelin-web-angular/e2e/protractor.conf.js @@ -21,11 +21,9 @@ const { SpecReporter } = require('jasmine-spec-reporter'); */ exports.config = { allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], + specs: ['./src/**/*.e2e-spec.ts'], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', @@ -41,4 +39,4 @@ exports.config = { }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } -}; \ No newline at end of file +}; diff --git a/zeppelin-web-angular/e2e/src/app.e2e-spec.ts b/zeppelin-web-angular/e2e/src/app.e2e-spec.ts index fcdd911b5b5..e12080414da 100644 --- a/zeppelin-web-angular/e2e/src/app.e2e-spec.ts +++ b/zeppelin-web-angular/e2e/src/app.e2e-spec.ts @@ -27,9 +27,14 @@ describe('workspace-project App', () => { afterEach(async () => { // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE - } as logging.Entry)); + const logs = await browser + .manage() + .logs() + .get(logging.Type.BROWSER); + expect(logs).not.toContain( + jasmine.objectContaining({ + level: logging.Level.SEVERE + } as logging.Entry) + ); }); }); diff --git a/zeppelin-web-angular/karma.conf.js b/zeppelin-web-angular/karma.conf.js index 67c6820c27b..edf69d9b4a2 100644 --- a/zeppelin-web-angular/karma.conf.js +++ b/zeppelin-web-angular/karma.conf.js @@ -13,7 +13,7 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function (config) { +module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], diff --git a/zeppelin-web-angular/webpack.partial.js b/zeppelin-web-angular/webpack.partial.js index c2261441f9c..20ad710264a 100644 --- a/zeppelin-web-angular/webpack.partial.js +++ b/zeppelin-web-angular/webpack.partial.js @@ -16,12 +16,42 @@ module.exports = { plugins: [ new MonacoWebpackPlugin({ languages: [ - 'bat', 'cpp', 'csharp', 'csp', 'css', 'dockerfile', 'go', 'handlebars', 'html', 'java', 'javascript', 'json', - 'less', 'lua', 'markdown', 'mysql', 'objective', 'perl', 'pgsql', 'php', 'powershell', 'python', 'r', 'ruby', - 'rust', 'scheme', 'scss', 'shell', 'sql', 'swift', 'typescript', 'vb', 'xml', 'yaml' + 'bat', + 'cpp', + 'csharp', + 'csp', + 'css', + 'dockerfile', + 'go', + 'handlebars', + 'html', + 'java', + 'javascript', + 'json', + 'less', + 'lua', + 'markdown', + 'mysql', + 'objective', + 'perl', + 'pgsql', + 'php', + 'powershell', + 'python', + 'r', + 'ruby', + 'rust', + 'scheme', + 'scss', + 'shell', + 'sql', + 'swift', + 'typescript', + 'vb', + 'xml', + 'yaml' ], features: ['!accessibilityHelp'] }) ] }; - From e0e20f5c250d372011b36532d9126e2c42ba97f9 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 00:21:45 +0900 Subject: [PATCH 05/14] [ZEPPELIN-6305] chore: add EOL in .prettierignore --- zeppelin-web-angular/.prettierignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-web-angular/.prettierignore b/zeppelin-web-angular/.prettierignore index 460e0367a80..30c21f1d7de 100644 --- a/zeppelin-web-angular/.prettierignore +++ b/zeppelin-web-angular/.prettierignore @@ -5,4 +5,4 @@ dist/* node/* node_modules/* -target/* \ No newline at end of file +target/* From 404a7e0a234b4e80dd33eddac40d7303d7c40158 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 08:30:35 +0900 Subject: [PATCH 06/14] [ZEPPELIN-6305] refactor: add extension to applied by prettier --- zeppelin-web-angular/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index b51f83ea4be..1f9cdf598a2 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -13,8 +13,8 @@ "build-project:vis": " ng build --project zeppelin-visualization", "build-project:helium": "ng build --project zeppelin-helium", "test": "ng test", - "lint": "ng lint && prettier --check \"**/*.{ts,js,css,html}\"", - "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix **/*.ts && prettier --write \"**/*.{ts,js,css,html}\"", + "lint": "ng lint && prettier --check \"**/*.{ts,js,json,css,html}\"", + "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix **/*.ts && prettier --write \"**/*.{ts,js,json,css,html}\"", "e2e": "ng e2e" }, "engines": { @@ -89,7 +89,7 @@ "typescript": "3.8.3" }, "lint-staged": { - "**/*.{ts,js,json}": [ + "**/*.{ts,js,json,css,html}": [ "./node_modules/.bin/prettier --write", "git add" ], From bc8205c4a1af81794a8aec3df276e532736406f4 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 08:31:53 +0900 Subject: [PATCH 07/14] [ZEPPELIN-6305] chore: apply npm run lint:fix --- zeppelin-web-angular/angular.json | 56 +++++-------------- zeppelin-web-angular/e2e/tsconfig.json | 6 +- .../helium-vis-example/ng-package.json | 2 +- .../projects/helium-vis-example/package.json | 2 +- .../helium-vis-example/tsconfig.lib.json | 10 +--- .../helium-vis-example/tsconfig.spec.json | 14 +---- .../projects/helium-vis-example/tslint.json | 14 +---- .../projects/zeppelin-helium/ng-package.json | 2 +- .../projects/zeppelin-helium/package.json | 2 +- .../zeppelin-helium/tsconfig.lib.json | 10 +--- .../zeppelin-helium/tsconfig.spec.json | 14 +---- .../projects/zeppelin-helium/tslint.json | 14 +---- .../projects/zeppelin-sdk/ng-package.json | 2 +- .../projects/zeppelin-sdk/tsconfig.lib.json | 10 +--- .../projects/zeppelin-sdk/tsconfig.spec.json | 14 +---- .../projects/zeppelin-sdk/tslint.json | 14 +---- .../zeppelin-visualization/ng-package.json | 2 +- .../zeppelin-visualization/package.json | 2 +- .../zeppelin-visualization/tsconfig.lib.json | 10 +--- .../zeppelin-visualization/tsconfig.spec.json | 14 +---- .../zeppelin-visualization/tslint.json | 14 +---- zeppelin-web-angular/tsconfig.app.json | 14 +---- zeppelin-web-angular/tsconfig.json | 40 ++++--------- zeppelin-web-angular/tsconfig.spec.json | 15 +---- 24 files changed, 65 insertions(+), 232 deletions(-) diff --git a/zeppelin-web-angular/angular.json b/zeppelin-web-angular/angular.json index 7cce21f83b5..1ba0a1d3eff 100644 --- a/zeppelin-web-angular/angular.json +++ b/zeppelin-web-angular/angular.json @@ -76,11 +76,7 @@ "./node_modules/github-markdown-css/github-markdown.css" ], "stylePreprocessorOptions": { - "includePaths": [ - "src/styles/theme", - "src/styles/theme/dark", - "src/styles/theme/light" - ] + "includePaths": ["src/styles/theme", "src/styles/theme/dark", "src/styles/theme/light"] }, "scripts": [ "node_modules/mathjax/MathJax.js", @@ -134,26 +130,16 @@ "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", - "styles": [ - "src/styles.less" - ], + "styles": ["src/styles.less"], "scripts": [], - "assets": [ - "src/favicon.ico", - "src/assets" - ] + "assets": ["src/favicon.ico", "src/assets"] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } } } @@ -179,9 +165,7 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "e2e/tsconfig.json", - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } } } @@ -210,13 +194,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "projects/zeppelin-helium/tsconfig.lib.json", - "projects/zeppelin-helium/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["projects/zeppelin-helium/tsconfig.lib.json", "projects/zeppelin-helium/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } } } @@ -249,9 +228,7 @@ "projects/helium-vis-example/tsconfig.lib.json", "projects/helium-vis-example/tsconfig.spec.json" ], - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } } } @@ -284,9 +261,7 @@ "projects/zeppelin-visualization/tsconfig.lib.json", "projects/zeppelin-visualization/tsconfig.spec.json" ], - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } } } @@ -315,17 +290,12 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "projects/zeppelin-sdk/tsconfig.lib.json", - "projects/zeppelin-sdk/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["projects/zeppelin-sdk/tsconfig.lib.json", "projects/zeppelin-sdk/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } } } } }, "defaultProject": "zeppelin" -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/e2e/tsconfig.json b/zeppelin-web-angular/e2e/tsconfig.json index 39b800f7896..677f30ff8ab 100644 --- a/zeppelin-web-angular/e2e/tsconfig.json +++ b/zeppelin-web-angular/e2e/tsconfig.json @@ -4,10 +4,6 @@ "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] + "types": ["jasmine", "jasminewd2", "node"] } } diff --git a/zeppelin-web-angular/projects/helium-vis-example/ng-package.json b/zeppelin-web-angular/projects/helium-vis-example/ng-package.json index 2193ef3df33..a25ad3d233d 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/ng-package.json +++ b/zeppelin-web-angular/projects/helium-vis-example/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/helium-vis-example/package.json b/zeppelin-web-angular/projects/helium-vis-example/package.json index 17f7cb02fbc..6b574506b43 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/package.json +++ b/zeppelin-web-angular/projects/helium-vis-example/package.json @@ -5,4 +5,4 @@ "@angular/common": "^8.2.9", "@angular/core": "^8.2.9" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/helium-vis-example/tsconfig.lib.json b/zeppelin-web-angular/projects/helium-vis-example/tsconfig.lib.json index bd23948e591..2972099ba19 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/tsconfig.lib.json +++ b/zeppelin-web-angular/projects/helium-vis-example/tsconfig.lib.json @@ -6,10 +6,7 @@ "declaration": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, "angularCompilerOptions": { "annotateForClosureCompiler": true, @@ -19,8 +16,5 @@ "strictInjectionParameters": true, "enableResourceInlining": true }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/zeppelin-web-angular/projects/helium-vis-example/tsconfig.spec.json b/zeppelin-web-angular/projects/helium-vis-example/tsconfig.spec.json index 16da33db072..ec3528a8fd0 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/tsconfig.spec.json +++ b/zeppelin-web-angular/projects/helium-vis-example/tsconfig.spec.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/zeppelin-web-angular/projects/helium-vis-example/tslint.json b/zeppelin-web-angular/projects/helium-vis-example/tslint.json index 124133f8499..205aedaa558 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/tslint.json +++ b/zeppelin-web-angular/projects/helium-vis-example/tslint.json @@ -1,17 +1,7 @@ { "extends": "../../tslint.json", "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] + "directive-selector": [true, "attribute", "lib", "camelCase"], + "component-selector": [true, "element", "lib", "kebab-case"] } } diff --git a/zeppelin-web-angular/projects/zeppelin-helium/ng-package.json b/zeppelin-web-angular/projects/zeppelin-helium/ng-package.json index da717624c15..132f1ef09b7 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/ng-package.json +++ b/zeppelin-web-angular/projects/zeppelin-helium/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/zeppelin-helium/package.json b/zeppelin-web-angular/projects/zeppelin-helium/package.json index cd0b499afa9..6ae361a0bb6 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/package.json +++ b/zeppelin-web-angular/projects/zeppelin-helium/package.json @@ -9,4 +9,4 @@ "rxjs": "~6.5.3", "ng-zorro-antd": "^8.3.0" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.lib.json b/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.lib.json index 45b781973db..9e14859e0bf 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.lib.json +++ b/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.lib.json @@ -6,10 +6,7 @@ "declaration": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, "angularCompilerOptions": { "annotateForClosureCompiler": true, @@ -20,8 +17,5 @@ "enableResourceInlining": true, "flatModuleId": "@zeppelin/helium" }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.spec.json b/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.spec.json index 16da33db072..ec3528a8fd0 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.spec.json +++ b/zeppelin-web-angular/projects/zeppelin-helium/tsconfig.spec.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-helium/tslint.json b/zeppelin-web-angular/projects/zeppelin-helium/tslint.json index 124133f8499..205aedaa558 100644 --- a/zeppelin-web-angular/projects/zeppelin-helium/tslint.json +++ b/zeppelin-web-angular/projects/zeppelin-helium/tslint.json @@ -1,17 +1,7 @@ { "extends": "../../tslint.json", "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] + "directive-selector": [true, "attribute", "lib", "camelCase"], + "component-selector": [true, "element", "lib", "kebab-case"] } } diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/ng-package.json b/zeppelin-web-angular/projects/zeppelin-sdk/ng-package.json index 41dc5a032d3..2cd75f06c25 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/ng-package.json +++ b/zeppelin-web-angular/projects/zeppelin-sdk/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.lib.json b/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.lib.json index 784751866f8..08b5b681956 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.lib.json +++ b/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.lib.json @@ -6,10 +6,7 @@ "declaration": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, "angularCompilerOptions": { "annotateForClosureCompiler": true, @@ -20,8 +17,5 @@ "enableResourceInlining": true, "flatModuleId": "@zeppelin/sdk" }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.spec.json b/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.spec.json index 16da33db072..ec3528a8fd0 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.spec.json +++ b/zeppelin-web-angular/projects/zeppelin-sdk/tsconfig.spec.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-sdk/tslint.json b/zeppelin-web-angular/projects/zeppelin-sdk/tslint.json index 124133f8499..205aedaa558 100644 --- a/zeppelin-web-angular/projects/zeppelin-sdk/tslint.json +++ b/zeppelin-web-angular/projects/zeppelin-sdk/tslint.json @@ -1,17 +1,7 @@ { "extends": "../../tslint.json", "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] + "directive-selector": [true, "attribute", "lib", "camelCase"], + "component-selector": [true, "element", "lib", "kebab-case"] } } diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/ng-package.json b/zeppelin-web-angular/projects/zeppelin-visualization/ng-package.json index 78b3ecf185e..5f0a54a8e3d 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/ng-package.json +++ b/zeppelin-web-angular/projects/zeppelin-visualization/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/package.json b/zeppelin-web-angular/projects/zeppelin-visualization/package.json index 1d4232be543..0c6239f1113 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/package.json +++ b/zeppelin-web-angular/projects/zeppelin-visualization/package.json @@ -5,4 +5,4 @@ "@angular/common": "^8.2.8", "@angular/core": "^8.2.8" } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.lib.json b/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.lib.json index 15689086f6e..15cc393d9b3 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.lib.json +++ b/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.lib.json @@ -6,10 +6,7 @@ "declaration": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, "angularCompilerOptions": { "annotateForClosureCompiler": true, @@ -20,8 +17,5 @@ "enableResourceInlining": true, "flatModuleId": "@zeppelin/visualization" }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.spec.json b/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.spec.json index 16da33db072..ec3528a8fd0 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.spec.json +++ b/zeppelin-web-angular/projects/zeppelin-visualization/tsconfig.spec.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/zeppelin-web-angular/projects/zeppelin-visualization/tslint.json b/zeppelin-web-angular/projects/zeppelin-visualization/tslint.json index 124133f8499..205aedaa558 100644 --- a/zeppelin-web-angular/projects/zeppelin-visualization/tslint.json +++ b/zeppelin-web-angular/projects/zeppelin-visualization/tslint.json @@ -1,17 +1,7 @@ { "extends": "../../tslint.json", "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] + "directive-selector": [true, "attribute", "lib", "camelCase"], + "component-selector": [true, "element", "lib", "kebab-case"] } } diff --git a/zeppelin-web-angular/tsconfig.app.json b/zeppelin-web-angular/tsconfig.app.json index 565a11a2156..add669334a0 100644 --- a/zeppelin-web-angular/tsconfig.app.json +++ b/zeppelin-web-angular/tsconfig.app.json @@ -4,15 +4,7 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "src/test.ts", - "src/**/*.spec.ts" - ] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.ts"], + "exclude": ["src/test.ts", "src/**/*.spec.ts"] } diff --git a/zeppelin-web-angular/tsconfig.json b/zeppelin-web-angular/tsconfig.json index b118ddf25fc..00296eaca6f 100644 --- a/zeppelin-web-angular/tsconfig.json +++ b/zeppelin-web-angular/tsconfig.json @@ -3,28 +3,13 @@ "compilerOptions": { "baseUrl": "./", "paths": { - "@zeppelin/*": [ - "./src/app/*", - "./src/environments/*" - ], - "@zeppelin/helium": [ - "./dist/zeppelin-helium" - ], - "@zeppelin/helium/*": [ - "./dist/zeppelin-helium/*" - ], - "@zeppelin/visualization": [ - "dist/zeppelin-visualization" - ], - "@zeppelin/visualization/*": [ - "dist/zeppelin-visualization/*" - ], - "@zeppelin/sdk": [ - "dist/zeppelin-sdk" - ], - "@zeppelin/sdk/*": [ - "dist/zeppelin-sdk/*" - ] + "@zeppelin/*": ["./src/app/*", "./src/environments/*"], + "@zeppelin/helium": ["./dist/zeppelin-helium"], + "@zeppelin/helium/*": ["./dist/zeppelin-helium/*"], + "@zeppelin/visualization": ["dist/zeppelin-visualization"], + "@zeppelin/visualization/*": ["dist/zeppelin-visualization/*"], + "@zeppelin/sdk": ["dist/zeppelin-sdk"], + "@zeppelin/sdk/*": ["dist/zeppelin-sdk/*"] }, "outDir": "./dist/out-tsc", "sourceMap": true, @@ -38,12 +23,7 @@ "skipLibCheck": true, "importHelpers": true, "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ] + "typeRoots": ["node_modules/@types"], + "lib": ["es2018", "dom"] } -} \ No newline at end of file +} diff --git a/zeppelin-web-angular/tsconfig.spec.json b/zeppelin-web-angular/tsconfig.spec.json index 6400fde7d54..430cf757cee 100644 --- a/zeppelin-web-angular/tsconfig.spec.json +++ b/zeppelin-web-angular/tsconfig.spec.json @@ -2,17 +2,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "files": ["src/test.ts", "src/polyfills.ts"], + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } From 831e63224838aab13424be919fbd4decd98a9655 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Wed, 3 Sep 2025 00:23:20 +0900 Subject: [PATCH 08/14] [ZEPPELIN-6305] fix: remove tslint -p option, set range of lint-staged --- zeppelin-web-angular/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index 1f9cdf598a2..ca0597c7538 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -13,8 +13,8 @@ "build-project:vis": " ng build --project zeppelin-visualization", "build-project:helium": "ng build --project zeppelin-helium", "test": "ng test", - "lint": "ng lint && prettier --check \"**/*.{ts,js,json,css,html}\"", - "lint:fix": "tslint --project src/tslint.json --fix src/**/*.ts && tslint --project tslint.json --fix **/*.ts && prettier --write \"**/*.{ts,js,json,css,html}\"", + "lint": "ng lint && tslint tslint-rules/*.ts && prettier --check \"**/*.{ts,js,json,css,html}\"", + "lint:fix": "ng lint --fix && tslint --fix tslint-rules/*.ts && prettier --write \"**/*.{ts,js,json,css,html}\"", "e2e": "ng e2e" }, "engines": { @@ -93,12 +93,12 @@ "./node_modules/.bin/prettier --write", "git add" ], - "src/**/*.ts": [ - "tslint --project src/tslint.json --fix", + "tslint-rules/*.ts": [ + "tslint --fix tslint-rules/*.ts", "git add" ], - "**/*.ts": [ - "tslint --project tslint.json --fix", + "{e2e,projects,src}/**/*.ts": [ + "ng lint --fix", "git add" ] }, From 2ded0a7066fd58961ab48fb4bb7ecdd38d15edd9 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Wed, 3 Sep 2025 00:43:23 +0900 Subject: [PATCH 09/14] [ZEPPELIN-6305] chore: apply npm run lint:fix --- .../helium-vis-example/src/json-visualization.ts | 3 ++- .../tslint-rules/constructorParamsOrderRule.ts | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/zeppelin-web-angular/projects/helium-vis-example/src/json-visualization.ts b/zeppelin-web-angular/projects/helium-vis-example/src/json-visualization.ts index 1e63eee1b74..dea934d77d3 100644 --- a/zeppelin-web-angular/projects/helium-vis-example/src/json-visualization.ts +++ b/zeppelin-web-angular/projects/helium-vis-example/src/json-visualization.ts @@ -36,7 +36,8 @@ export class JsonVisualization extends Visualization { private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig, - private componentFactoryResolver?: ComponentFactoryResolver) { + private componentFactoryResolver?: ComponentFactoryResolver + ) { super(config); } diff --git a/zeppelin-web-angular/tslint-rules/constructorParamsOrderRule.ts b/zeppelin-web-angular/tslint-rules/constructorParamsOrderRule.ts index 692051a33e8..2392dc158cd 100644 --- a/zeppelin-web-angular/tslint-rules/constructorParamsOrderRule.ts +++ b/zeppelin-web-angular/tslint-rules/constructorParamsOrderRule.ts @@ -95,11 +95,14 @@ function walk(ctx: Lint.WalkContext) { } function getModifier(param: ts.ParameterDeclaration): string { - const hasOptional = param.decorators?.some(d => { - let expr = d.expression; - if (ts.isCallExpression(expr)) expr = expr.expression; - return ts.isIdentifier(expr) && expr.text === "Optional"; - }) || !!param.questionToken; + const hasOptional = + param.decorators?.some(d => { + let expr = d.expression; + if (ts.isCallExpression(expr)) { + expr = expr.expression; + } + return ts.isIdentifier(expr) && expr.text === 'Optional'; + }) || !!param.questionToken; if (hasOptional) { return 'optional'; From 28a46225e00978ce30cc2f160f647e55f7ffe028 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 14:47:14 +0900 Subject: [PATCH 10/14] [ZEPPELIN-6305] fix: refactor to avoid using nglint --- zeppelin-web-angular/package.json | 8 ++------ zeppelin-web-angular/tslint.json | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index ca0597c7538..4e70d085942 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -93,12 +93,8 @@ "./node_modules/.bin/prettier --write", "git add" ], - "tslint-rules/*.ts": [ - "tslint --fix tslint-rules/*.ts", - "git add" - ], - "{e2e,projects,src}/**/*.ts": [ - "ng lint --fix", + "**/*.ts": [ + "tslint --fix", "git add" ] }, diff --git a/zeppelin-web-angular/tslint.json b/zeppelin-web-angular/tslint.json index f8a877587bf..f7ab7e7d8ae 100644 --- a/zeppelin-web-angular/tslint.json +++ b/zeppelin-web-angular/tslint.json @@ -1,7 +1,7 @@ { "rulesDirectory": ["node_modules/codelyzer", "node_modules/nz-tslint-rules", "tslint-rules"], "linterOptions": { - "exclude": ["src/**/*.ts", "dist/**", "node/**", "node_modules/**"] + "exclude": ["dist/**", "node/**", "node_modules/**"] }, "rules": { "nz-secondary-entry-imports": true, From 6a62384dce9c26d38e80eeffd0b0ab9bdb05664e Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 15:21:02 +0900 Subject: [PATCH 11/14] [ZEPPELIN-6305] chore: combine *.ts's lint staged command --- zeppelin-web-angular/package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index 4e70d085942..99a3f352a02 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -89,12 +89,13 @@ "typescript": "3.8.3" }, "lint-staged": { - "**/*.{ts,js,json,css,html}": [ + "**/*.ts": [ + "tslint --fix", "./node_modules/.bin/prettier --write", "git add" ], - "**/*.ts": [ - "tslint --fix", + "**/*.{js,json,css,html}": [ + "./node_modules/.bin/prettier --write", "git add" ] }, From 3850663f6a8e7ba4892542e8676f7bfa8ac028b0 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 16:02:00 +0900 Subject: [PATCH 12/14] [ZEPPELIN-6305] chore: add tslint-rules in prettierignore --- zeppelin-web-angular/.prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/zeppelin-web-angular/.prettierignore b/zeppelin-web-angular/.prettierignore index 30c21f1d7de..e09944f6df8 100644 --- a/zeppelin-web-angular/.prettierignore +++ b/zeppelin-web-angular/.prettierignore @@ -6,3 +6,4 @@ dist/* node/* node_modules/* target/* +tslint-rules/* \ No newline at end of file From 751727efe27b4939597761207bdb743de0d79881 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 16:04:52 +0900 Subject: [PATCH 13/14] [ZEPPELIN-6305] chore: add ELF in .prettierignore --- zeppelin-web-angular/.prettierignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-web-angular/.prettierignore b/zeppelin-web-angular/.prettierignore index e09944f6df8..adb502cd9dc 100644 --- a/zeppelin-web-angular/.prettierignore +++ b/zeppelin-web-angular/.prettierignore @@ -6,4 +6,4 @@ dist/* node/* node_modules/* target/* -tslint-rules/* \ No newline at end of file +tslint-rules/* From 07094b6b29ed8b514962bab8a32c3f0a9d90c74e Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 16:22:51 +0900 Subject: [PATCH 14/14] [ZEPPELIN-6305] fix: exclude only for .js in tslint-rules for prettier --- zeppelin-web-angular/.prettierignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-web-angular/.prettierignore b/zeppelin-web-angular/.prettierignore index adb502cd9dc..515cc4e37a5 100644 --- a/zeppelin-web-angular/.prettierignore +++ b/zeppelin-web-angular/.prettierignore @@ -6,4 +6,4 @@ dist/* node/* node_modules/* target/* -tslint-rules/* +tslint-rules/**/*.js