Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
chore: fix linting
718555bfac5e246c
diff --git a/backend/src/applications/webdav/constants/routes.ts b/backend/src/applications/webdav/constants/routes.tsindex dd2800d1..c9ff511f 100644--- a/backend/src/applications/webdav/constants/routes.ts+++ b/backend/src/applications/webdav/constants/routes.ts@@ -29,4 +29,3 @@ export const WEBDAV_SPACES: Record<(typeof WEBDAV_NS)[keyof typeof WEBDAV_NS], {spaceRepository: [SPACE_REPOSITORY.TRASH]}}-diff --git a/backend/src/applications/webdav/models/webdav-file.model.ts b/backend/src/applications/webdav/models/webdav-file.model.tsindex 712fb276..8ea92ec3 100644--- a/backend/src/applications/webdav/models/webdav-file.model.ts+++ b/backend/src/applications/webdav/models/webdav-file.model.ts@@ -76,6 +76,7 @@ export class WebDAVFile implements Omit<FileProps, 'path'> {return SUPPORTED_LOCKS}+ // eslint-disable-next-line @typescript-eslint/class-literal-property-styleget lockdiscovery() {// implemented in propfind method, used for propname casereturn nulldiff --git a/backend/src/applications/webdav/utils/if-header.ts b/backend/src/applications/webdav/utils/if-header.tsindex 27937f37..d4a1a1af 100644--- a/backend/src/applications/webdav/utils/if-header.ts+++ b/backend/src/applications/webdav/utils/if-header.ts@@ -12,7 +12,7 @@ import { IfHeader } from '../interfaces/if-header.interface'// "etag":{"mustMatch":true,"value":"W/\"A weak ETag\""}},// {"path":"/webdav/specs/","etag":{"mustMatch":true,"value":"\"strong ETag\""}}]-const ifHeaderRegExp = /(?:<([^>]+)>)?\s*\(([^\)]+)\)/g+const ifHeaderRegExp = /(?:<([^>]+)>)?\s*\(([^)]+)\)/gconst ifHeaderInternalRegExp = /((not)|\[([^\]]+)\]|<(DAV:no-lock)>|<([^>]+)>|([^\s]+))/gifunction parseIfHeaderInternal(path: string, group: string) {diff --git a/frontend/eslint.config.js b/frontend/eslint.config.jsindex a7805beb..813818ae 100644--- a/frontend/eslint.config.js+++ b/frontend/eslint.config.js@@ -60,6 +60,7 @@ module.exports = tseslint.config(rules: {'@angular-eslint/template/click-events-have-key-events': 'off','@angular-eslint/template/interactive-supports-focus': 'off'- }- }+ },+ ignores: ['src/assets/**']+ },)diff --git a/frontend/src/app/applications/spaces/spaces.constants.ts b/frontend/src/app/applications/spaces/spaces.constants.tsindex 7ce2130a..b7517036 100644--- a/frontend/src/app/applications/spaces/spaces.constants.ts+++ b/frontend/src/app/applications/spaces/spaces.constants.ts@@ -104,14 +104,14 @@ export const SPACES_MENU: AppMenu = {title: SPACES_TITLE.SHORT_PERSONAL_FILES,icon: SPACES_ICON.PERSONAL,link: SPACES_PATH.PERSONAL_FILES,- matchLink: new RegExp(`^${SPACES_PATH.PERSONAL_FILES}[\/|\?]`)+ matchLink: new RegExp(`^${SPACES_PATH.PERSONAL_FILES}[/|?]`)},{id: USER_PERMISSION.SPACES,title: SPACES_TITLE.SPACES,icon: SPACES_ICON.SPACES,link: SPACES_PATH.SPACES,- matchLink: new RegExp(`^${SPACES_PATH.SPACES}(\\?|$)|^${SPACES_PATH.SPACES}\/${SPACES_PATH.FILES}\/(?!${SPACES_PATH.PERSONAL}(\/|\\?|$))`)+ matchLink: new RegExp(`^${SPACES_PATH.SPACES}(\\?|$)|^${SPACES_PATH.SPACES}/${SPACES_PATH.FILES}/(?!${SPACES_PATH.PERSONAL}(/|\\?|$))`)},{id: USER_PERMISSION.SHARES,@@ -140,7 +140,7 @@ export const SPACES_MENU: AppMenu = {title: SPACES_TITLE.TRASH,icon: SPACES_ICON.TRASH,link: SPACES_PATH.TRASH,- matchLink: new RegExp(`^${SPACES_PATH.SPACES}\/${SPACES_PATH.TRASH}\/`)+ matchLink: new RegExp(`^${SPACES_PATH.SPACES}/${SPACES_PATH.TRASH}/`)}]} as constdiff --git a/frontend/src/app/auth/auth.interceptor.ts b/frontend/src/app/auth/auth.interceptor.tsindex 44701af3..660e604a 100644--- a/frontend/src/app/auth/auth.interceptor.ts+++ b/frontend/src/app/auth/auth.interceptor.ts@@ -73,7 +73,7 @@ export class AuthInterceptor implements HttpInterceptor {return throwError(() => error)}- private handleRetries(request: HttpRequest<any>, next: HttpHandler, error: HttpErrorResponse): Observable<any> {+ private handleRetries(request: HttpRequest<any>, next: HttpHandler, _error: HttpErrorResponse): Observable<any> {return next.handle(request).pipe(retryWhen((error) =>error.pipe(diff --git a/frontend/src/app/common/components/code-mirror.component.ts b/frontend/src/app/common/components/code-mirror.component.tsindex f0942333..bb52f042 100755--- a/frontend/src/app/common/components/code-mirror.component.ts+++ b/frontend/src/app/common/components/code-mirror.component.ts@@ -33,17 +33,10 @@ function normalizeLineEndings(str: string) {declare const CodeMirror: any@Component({+ // eslint-disable-next-line @angular-eslint/component-selectorselector: 'ngx-codemirror',template: `- <textarea- [name]="name"- class="ngx-codemirror {{ className }}"- [class.ngx-codemirror--focused]="isFocused"- autocomplete="off"- [autofocus]="autoFocus"- #ref- >- </textarea>+ <textarea [name]="name" class="ngx-codemirror {{ className }}" [class.ngx-codemirror--focused]="isFocused" autocomplete="off" #ref> </textarea>`,providers: [{@@ -69,6 +62,7 @@ export class CodeMirrorComponent implements AfterViewInit, OnDestroy, ControlVal/* called when the editor is focused or loses focus */@Output() focusChange = new EventEmitter<boolean>()/* called when the editor is scrolled */+ // eslint-disable-next-line @angular-eslint/no-output-native@Output() scroll = new EventEmitter<ScrollInfo>()@ViewChild('ref', { static: true }) ref: ElementRefvalue = ''@@ -92,7 +86,7 @@ export class CodeMirrorComponent implements AfterViewInit, OnDestroy, ControlVal* @link http://codemirror.net/doc/manual.html#config*/@Input()- set options(value: { [key: string]: any }) {+ set options(value: Record<string, any>) {this._options = valueif (!this._differ && value) {this._differ = this._differs.find(value).create()diff --git a/frontend/src/app/common/components/password-strength-bar.component.ts b/frontend/src/app/common/components/password-strength-bar.component.tsindex 486949a5..e907cce8 100644--- a/frontend/src/app/common/components/password-strength-bar.component.ts+++ b/frontend/src/app/common/components/password-strength-bar.component.ts@@ -56,7 +56,7 @@ export class PasswordStrengthBarComponent implements OnChanges {private static measureStrength(p: string) {let _force = 0- const _regex = /[$-/:-?{-~!"^_`\[\]]/g // "+ const _regex = /[$-/:-?{-~!"^_`[\]]/g // "const _lowerLetters = /[a-z]+/.test(p)const _upperLetters = /[A-Z]+/.test(p)@@ -84,7 +84,7 @@ export class PasswordStrengthBarComponent implements OnChanges {return _force}- ngOnChanges(changes: { [propName: string]: SimpleChange }) {+ ngOnChanges(changes: Record<string, SimpleChange>) {const password = changes['passwordToCheck'].currentValuethis.setBarColors(5, '#DDD')if (password) {@@ -94,18 +94,9 @@ export class PasswordStrengthBarComponent implements OnChanges {}private getColor(s: number) {- let idx- if (s <= 10) {- idx = 0- } else if (s <= 20) {- idx = 1- } else if (s <= 30) {- idx = 2- } else if (s <= 40) {- idx = 3- } else {- idx = 4- }+ // Compute index from 0 to 4 depending on s value (in steps of 10)+ const idx = Math.min(Math.floor((s - 1) / 10), 4)+return {idx: idx + 1,col: this.colors[idx]diff --git a/frontend/src/app/common/directives/off-click.directive.ts b/frontend/src/app/common/directives/off-click.directive.tsindex 23312ea7..f7d5e435 100644--- a/frontend/src/app/common/directives/off-click.directive.ts+++ b/frontend/src/app/common/directives/off-click.directive.ts@@ -7,6 +7,7 @@import { Directive, HostListener, Input, OnDestroy, OnInit } from '@angular/core'@Directive({+ // eslint-disable-next-line @angular-eslint/directive-selectorselector: '[offClick]'})export class OffClickDirective implements OnInit, OnDestroy {diff --git a/frontend/src/app/common/pipes/highlight.pipe.ts b/frontend/src/app/common/pipes/highlight.pipe.tsindex 64851e8b..541891b2 100644--- a/frontend/src/app/common/pipes/highlight.pipe.ts+++ b/frontend/src/app/common/pipes/highlight.pipe.ts@@ -13,12 +13,10 @@ export class HighlightPipe implements PipeTransform {return text}if (search && text) {- let pattern = search.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')+ let pattern = search.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&')pattern = pattern.split(' ')- .filter((t) => {- return t.length > 0- })+ .filter((t) => t.length > 0).join('|')const regex = new RegExp(pattern, 'gi')return text.replace(regex, (match) => `<b>${match}</b>`)