This is an automated email from the ASF dual-hosted git repository. bossenti pushed a commit to branch chore/formatting-lintin-ns-module in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 47cdebcbcb299cb5b4c5f69d4a8086b03ced710c Author: bossenti <[email protected]> AuthorDate: Thu Jan 12 21:42:09 2023 +0100 [#877] apply formatting and linting to NS module --- ui/.eslintignore | 1 - ui/.prettierignore | 1 - ui/src/app/NS/XS.service.spec.ts | 20 ++++++++++---------- ui/src/app/NS/xs.service.ts | 28 ++++++++++++++-------------- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/ui/.eslintignore b/ui/.eslintignore index e55ff402d..aaf2800bf 100644 --- a/ui/.eslintignore +++ b/ui/.eslintignore @@ -32,4 +32,3 @@ src/app/files src/app/info src/app/login src/app/notifications -src/app/NS \ No newline at end of file diff --git a/ui/.prettierignore b/ui/.prettierignore index 134205dda..384124140 100644 --- a/ui/.prettierignore +++ b/ui/.prettierignore @@ -32,4 +32,3 @@ src/app/files src/app/info src/app/login src/app/notifications -src/app/NS \ No newline at end of file diff --git a/ui/src/app/NS/XS.service.spec.ts b/ui/src/app/NS/XS.service.spec.ts index aab2c3878..6db8f577a 100644 --- a/ui/src/app/NS/XS.service.spec.ts +++ b/ui/src/app/NS/XS.service.spec.ts @@ -19,16 +19,16 @@ import { XsService } from './xs.service'; describe('XSService', () => { - const service: XsService = new XsService(); + const service: XsService = new XsService(); - it('should get string XS String', () => { - expect(service.XS_STRING).toBe('xs:string'); - }); + it('should get string XS String', () => { + expect(service.XS_STRING).toBe('xs:string'); + }); - it('should check for numbers', () => { - expect(service.isNumber(service.XS_DOUBLE)).toBeTrue(); - expect(service.isNumber(service.XS_INTEGER)).toBeTrue(); - expect(service.isNumber(service.XS_NUMBER)).toBeTrue(); - expect(service.isNumber(service.XS_STRING)).toBeFalse(); - }); + it('should check for numbers', () => { + expect(service.isNumber(service.XS_DOUBLE)).toBeTrue(); + expect(service.isNumber(service.XS_INTEGER)).toBeTrue(); + expect(service.isNumber(service.XS_NUMBER)).toBeTrue(); + expect(service.isNumber(service.XS_STRING)).toBeFalse(); + }); }); diff --git a/ui/src/app/NS/xs.service.ts b/ui/src/app/NS/xs.service.ts index 77986e0d6..a8eea881e 100644 --- a/ui/src/app/NS/xs.service.ts +++ b/ui/src/app/NS/xs.service.ts @@ -20,19 +20,19 @@ import { Injectable } from '@angular/core'; @Injectable() export class XsService { + XS_STRING = 'xs:string'; + XS_INTEGER = 'http://www.w3.org/2001/XMLSchema#integer'; + XS_DOUBLE = 'http://www.w3.org/2001/XMLSchema#double'; + XS_BOOLEAN = 'http://www.w3.org/2001/XMLSchema#boolean'; + XS_NUMBER = 'http://www.w3.org/2001/XMLSchema#number'; + XS_STRING1 = 'http://www.w3.org/2001/XMLSchema#string'; + SO_URL = 'https://schema.org/URL'; - XS_STRING = 'xs:string'; - XS_INTEGER = 'http://www.w3.org/2001/XMLSchema#integer'; - XS_DOUBLE = 'http://www.w3.org/2001/XMLSchema#double'; - XS_BOOLEAN = 'http://www.w3.org/2001/XMLSchema#boolean'; - XS_NUMBER = 'http://www.w3.org/2001/XMLSchema#number'; - XS_STRING1 = 'http://www.w3.org/2001/XMLSchema#string'; - SO_URL = 'https://schema.org/URL'; - - isNumber(datatype: string): boolean { - return datatype === this.XS_DOUBLE || - datatype === this.XS_INTEGER || - datatype === this.XS_NUMBER; - } - + isNumber(datatype: string): boolean { + return ( + datatype === this.XS_DOUBLE || + datatype === this.XS_INTEGER || + datatype === this.XS_NUMBER + ); + } }
