From 31a6ebfd3f4b958f48ef8943f2d58b7bc1676b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 5 Dec 2023 10:36:04 +0000 Subject: [PATCH] feat: upgrade prettier to v3 --- .prettierignore | 1 + .../storage/elasticsearch/elasticsearch.ts | 5 +- configuration/prettier-config/index.js | 15 ++ configuration/prettier-config/index.json | 13 - configuration/prettier-config/package.json | 11 +- frontend/app/package.json | 1 - .../{.prettierrc.js => prettier.config.mjs} | 8 +- .../app/animation/animation-choreographer.ts | 5 +- .../about/about-page/about-page.component.ts | 5 +- .../app/modules/auth/auth-guard.service.ts | 5 +- .../schedule/schedule-sync.service.ts | 6 +- .../app/modules/calendar/calendar.service.ts | 5 +- .../dashboard/dashboard.component.html | 2 +- .../mensa-section.component.html | 2 +- .../data/chips/action-chip-list.component.ts | 4 +- .../src/app/modules/data/chips/tree-node.ts | 13 +- .../data/coordinated-search.provider.ts | 11 +- .../modules/data/elements/rating.component.ts | 5 +- .../data/elements/title-card.component.html | 8 +- .../data/list/simple-data-list.component.ts | 5 +- .../special/mensa/place-mensa-service.ts | 16 +- .../map/page/map-list-modal.component.ts | 5 +- .../modules/map/page/map-page.component.ts | 4 +- .../menu/navigation/navigation.service.ts | 5 +- .../app/src/app/modules/news/news.provider.ts | 5 +- .../page/schedule-single-events.spec.ts | 4 +- .../schedule/page/schedule-view.component.ts | 11 +- .../app/modules/settings/settings.provider.ts | 15 +- .../app/util/internet-connection.service.ts | 5 +- frontend/app/src/app/util/ion-icon/icon.scss | 5 +- frontend/app/src/index.html | 2 +- frontend/app/src/theme/components/_card.scss | 4 +- packages/api-cli/test/copy.spec.ts | 4 +- packages/api/src/client.ts | 6 +- packages/api/test/client.spec.ts | 4 +- packages/collection-utils/src/key-by.ts | 11 +- packages/collection-utils/src/pick.ts | 30 ++- packages/collection-utils/src/uniq.ts | 11 +- packages/core/api-doc.html | 2 +- packages/core/src/general/i18n.ts | 4 +- packages/core/src/meta.ts | 240 +++++++++--------- packages/core/src/protocol/error.ts | 7 +- packages/core/src/protocol/route.ts | 144 +++++------ packages/core/test/features.spec.ts | 4 +- packages/easy-ast/src/ast-internal-util.ts | 4 +- packages/easy-ast/src/easy-ast.ts | 5 +- packages/logger/src/common.ts | 4 +- pnpm-lock.yaml | 122 ++++----- prettier.config.cjs | 3 - prettier.config.js | 1 + 50 files changed, 455 insertions(+), 362 deletions(-) create mode 100644 .prettierignore create mode 100644 configuration/prettier-config/index.js delete mode 100644 configuration/prettier-config/index.json rename frontend/app/{.prettierrc.js => prettier.config.mjs} (83%) delete mode 100644 prettier.config.cjs create mode 100644 prettier.config.js diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..bd5535a6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +pnpm-lock.yaml diff --git a/backend/backend/src/storage/elasticsearch/elasticsearch.ts b/backend/backend/src/storage/elasticsearch/elasticsearch.ts index 2a9b8181..37d58185 100644 --- a/backend/backend/src/storage/elasticsearch/elasticsearch.ts +++ b/backend/backend/src/storage/elasticsearch/elasticsearch.ts @@ -84,7 +84,10 @@ export class Elasticsearch implements Database { * @param config an assembled config file * @param mailQueue a mail queue for monitoring */ - constructor(private readonly config: SCConfigFile, mailQueue?: MailQueue) { + constructor( + private readonly config: SCConfigFile, + mailQueue?: MailQueue, + ) { if (config.internal.database === undefined || typeof config.internal.database.version !== 'string') { throw new TypeError('Database version is undefined. Check your config file'); } diff --git a/configuration/prettier-config/index.js b/configuration/prettier-config/index.js new file mode 100644 index 00000000..c69ebbcf --- /dev/null +++ b/configuration/prettier-config/index.js @@ -0,0 +1,15 @@ +/** @type {import('prettier').Config} */ +const config = { + tabWidth: 2, + printWidth: 110, + useTabs: false, + semi: true, + singleQuote: true, + quoteProps: 'consistent', + trailingComma: 'all', + bracketSpacing: false, + arrowParens: 'avoid', + endOfLine: 'lf' +} + +export default config; diff --git a/configuration/prettier-config/index.json b/configuration/prettier-config/index.json deleted file mode 100644 index 0481d49b..00000000 --- a/configuration/prettier-config/index.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/prettierrc", - "tabWidth": 2, - "printWidth": 110, - "useTabs": false, - "semi": true, - "singleQuote": true, - "quoteProps": "consistent", - "trailingComma": "all", - "bracketSpacing": false, - "arrowParens": "avoid", - "endOfLine": "lf" -} diff --git a/configuration/prettier-config/package.json b/configuration/prettier-config/package.json index 4ed5354e..3f8f08bd 100644 --- a/configuration/prettier-config/package.json +++ b/configuration/prettier-config/package.json @@ -9,16 +9,19 @@ "contributors": [ "Rainer Killinger " ], - "main": "index.json", + "main": "index.js", "files": [ - "index.json", + "index.js", "CHANGELOG.md", "README.md" ], "scripts": { - "test": "npx prettier --config index.json --check \"test/*.js\"" + "test": "prettier --config index.js --check \"test/*.js\"" + }, + "devDependencies": { + "prettier": "3.1.0" }, "peerDependencies": { - "prettier": "2.8.6" + "prettier": "3.1.0" } } diff --git a/frontend/app/package.json b/frontend/app/package.json index 5639c12d..0b3ea93e 100644 --- a/frontend/app/package.json +++ b/frontend/app/package.json @@ -106,7 +106,6 @@ "ngx-markdown": "16.0.0", "ngx-moment": "6.0.2", "opening_hours": "3.8.0", - "prettier": "2.8.6", "rxjs": "7.8.1", "swiper": "8.4.5", "tslib": "2.4.1", diff --git a/frontend/app/.prettierrc.js b/frontend/app/prettier.config.mjs similarity index 83% rename from frontend/app/.prettierrc.js rename to frontend/app/prettier.config.mjs index 98114568..b4d5d817 100644 --- a/frontend/app/.prettierrc.js +++ b/frontend/app/prettier.config.mjs @@ -12,9 +12,11 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ +import prettierConfig from '@openstapps/prettier-config'; -module.exports = { - ...require('@openstapps/prettier-config'), +/** @type {import('prettier').Config} */ +const config = { + ...prettierConfig, overrides: [ { files: 'src/**/*.html', @@ -25,3 +27,5 @@ module.exports = { ], ignorePath: ['.prettierignore', '../../.gitignore'], }; + +export default config; diff --git a/frontend/app/src/app/animation/animation-choreographer.ts b/frontend/app/src/app/animation/animation-choreographer.ts index 1bb1fda7..9a68847e 100644 --- a/frontend/app/src/app/animation/animation-choreographer.ts +++ b/frontend/app/src/app/animation/animation-choreographer.ts @@ -49,7 +49,10 @@ export class SharedAxisChoreographer { */ currentValue: T; - constructor(initialValue: T, readonly pages?: T[]) { + constructor( + initialValue: T, + readonly pages?: T[], + ) { this.currentValue = initialValue; this.expectedValue = initialValue; } diff --git a/frontend/app/src/app/modules/about/about-page/about-page.component.ts b/frontend/app/src/app/modules/about/about-page/about-page.component.ts index 818c973e..ea0d5923 100644 --- a/frontend/app/src/app/modules/about/about-page/about-page.component.ts +++ b/frontend/app/src/app/modules/about/about-page/about-page.component.ts @@ -35,7 +35,10 @@ export class AboutPageComponent implements OnInit { version: string; - constructor(private readonly route: ActivatedRoute, private readonly configProvider: ConfigProvider) {} + constructor( + private readonly route: ActivatedRoute, + private readonly configProvider: ConfigProvider, + ) {} async ngOnInit() { const route = this.route.snapshot.url.map(it => it.path).join('/'); diff --git a/frontend/app/src/app/modules/auth/auth-guard.service.ts b/frontend/app/src/app/modules/auth/auth-guard.service.ts index 5abdf5d7..03a570eb 100644 --- a/frontend/app/src/app/modules/auth/auth-guard.service.ts +++ b/frontend/app/src/app/modules/auth/auth-guard.service.ts @@ -22,7 +22,10 @@ import {AuthHelperService} from './auth-helper.service'; providedIn: 'root', }) export class AuthGuardService implements CanActivate { - constructor(private authHelper: AuthHelperService, private router: Router) {} + constructor( + private authHelper: AuthHelperService, + private router: Router, + ) {} public async canActivate(route: ActivatedProtectedRouteSnapshot, _state: RouterStateSnapshot) { if (route.queryParamMap.get('token')) { diff --git a/frontend/app/src/app/modules/background/schedule/schedule-sync.service.ts b/frontend/app/src/app/modules/background/schedule/schedule-sync.service.ts index 3ceaa38b..1521105b 100644 --- a/frontend/app/src/app/modules/background/schedule/schedule-sync.service.ts +++ b/frontend/app/src/app/modules/background/schedule/schedule-sync.service.ts @@ -134,9 +134,9 @@ export class ScheduleSyncService { private formatChanges(changes: ChangesOf): string[] { return changes.changes.map( change => - `${ - this.translator.translator.translatedPropertyNames(SCThingType.DateSeries)?.[change] - }: ${formatRelevantKeys[change]( + `${this.translator.translator.translatedPropertyNames(SCThingType.DateSeries)?.[ + change + ]}: ${formatRelevantKeys[change]( changes.new[change] as never, this.dateFormatPipe, this.durationFormatPipe, diff --git a/frontend/app/src/app/modules/calendar/calendar.service.ts b/frontend/app/src/app/modules/calendar/calendar.service.ts index 7627d5bb..ddcd31c5 100644 --- a/frontend/app/src/app/modules/calendar/calendar.service.ts +++ b/frontend/app/src/app/modules/calendar/calendar.service.ts @@ -38,7 +38,10 @@ export class CalendarService { calendarName = 'StApps'; // eslint-disable-next-line @typescript-eslint/no-empty-function - constructor(readonly calendar: Calendar, private readonly configProvider: ConfigProvider) { + constructor( + readonly calendar: Calendar, + private readonly configProvider: ConfigProvider, + ) { this.calendarName = (this.configProvider.getValue('name') as string) ?? 'StApps'; } diff --git a/frontend/app/src/app/modules/dashboard/dashboard.component.html b/frontend/app/src/app/modules/dashboard/dashboard.component.html index 9c989e1b..f5610cf6 100644 --- a/frontend/app/src/app/modules/dashboard/dashboard.component.html +++ b/frontend/app/src/app/modules/dashboard/dashboard.component.html @@ -33,7 +33,7 @@ {{ nextEvent - ? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm') + ? (nextEvent!.dates | nextDateInList | amDateFormat: 'll, HH:mm') : ('dashboard.schedule.noEvent' | translate) }} diff --git a/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html b/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html index 83103fde..cf55a5c5 100644 --- a/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html +++ b/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html @@ -16,7 +16,7 @@ - + diff --git a/frontend/app/src/app/modules/data/chips/action-chip-list.component.ts b/frontend/app/src/app/modules/data/chips/action-chip-list.component.ts index 5ddd985b..a2f7fed8 100644 --- a/frontend/app/src/app/modules/data/chips/action-chip-list.component.ts +++ b/frontend/app/src/app/modules/data/chips/action-chip-list.component.ts @@ -42,8 +42,8 @@ export class ActionChipListComponent { const maybeCoords = isInPlace ? item?.inPlace?.geo.point.coordinates : hasDirectGeo - ? item.geo.point.coordinates - : undefined; + ? item.geo.point.coordinates + : undefined; const isNullIsland = maybeCoords ? maybeCoords[0] === 0 && maybeCoords[1] === 0 : false; this.applicable = { locate: false, // TODO: reimplement this at a later date diff --git a/frontend/app/src/app/modules/data/chips/tree-node.ts b/frontend/app/src/app/modules/data/chips/tree-node.ts index dd7bf59f..7191c3c7 100644 --- a/frontend/app/src/app/modules/data/chips/tree-node.ts +++ b/frontend/app/src/app/modules/data/chips/tree-node.ts @@ -44,7 +44,10 @@ export class TreeNode | SelectionValue> { */ parent?: TreeNode>; - constructor(readonly children: T[], readonly ref: ChangeDetectorRef) { + constructor( + readonly children: T[], + readonly ref: ChangeDetectorRef, + ) { this.updateParents(); this.accumulateApplyValues(); } @@ -58,11 +61,11 @@ export class TreeNode | SelectionValue> { ? it.checked ? Selection.ON : it.indeterminate - ? Selection.PARTIAL - : Selection.OFF + ? Selection.PARTIAL + : Selection.OFF : (it as SelectionValue).selected - ? Selection.ON - : Selection.OFF, + ? Selection.ON + : Selection.OFF, ); this.checked = selections.every(it => it === Selection.ON); diff --git a/frontend/app/src/app/modules/data/coordinated-search.provider.ts b/frontend/app/src/app/modules/data/coordinated-search.provider.ts index 299de051..7c4016ea 100644 --- a/frontend/app/src/app/modules/data/coordinated-search.provider.ts +++ b/frontend/app/src/app/modules/data/coordinated-search.provider.ts @@ -29,10 +29,13 @@ async function delay(ms: number): Promise { * ['a', 'b', 'c'] => {0: 'a', 1: 'b', 2: 'c'} */ export function arrayToIndexMap(array: T[]): Record { - return array.reduce((previous, current, index) => { - previous[index] = current; - return previous; - }, {} as Record); + return array.reduce( + (previous, current, index) => { + previous[index] = current; + return previous; + }, + {} as Record, + ); } interface OngoingQuery { diff --git a/frontend/app/src/app/modules/data/elements/rating.component.ts b/frontend/app/src/app/modules/data/elements/rating.component.ts index 75eabf98..9149a555 100644 --- a/frontend/app/src/app/modules/data/elements/rating.component.ts +++ b/frontend/app/src/app/modules/data/elements/rating.component.ts @@ -51,7 +51,10 @@ export class StappsRatingComponent { this.dish.next(value); } - constructor(readonly elementRef: ElementRef, readonly ratingProvider: RatingProvider) {} + constructor( + readonly elementRef: ElementRef, + readonly ratingProvider: RatingProvider, + ) {} @HostListener('document:mousedown', ['$event']) clickOutside(event: MouseEvent) { diff --git a/frontend/app/src/app/modules/data/elements/title-card.component.html b/frontend/app/src/app/modules/data/elements/title-card.component.html index a3e70887..3dc776d7 100644 --- a/frontend/app/src/app/modules/data/elements/title-card.component.html +++ b/frontend/app/src/app/modules/data/elements/title-card.component.html @@ -17,11 +17,11 @@

{{ - 'honorificPrefix' | thingTranslate : item + 'honorificPrefix' | thingTranslate: item }} - {{ 'name' | thingTranslate : item }} + {{ 'name' | thingTranslate: item }} {{ - 'honorificSuffix' | thingTranslate : item + 'honorificSuffix' | thingTranslate: item }}

@@ -33,7 +33,7 @@
- {{ 'description' | thingTranslate : item }} + {{ 'description' | thingTranslate: item }}
diff --git a/frontend/app/src/app/modules/data/list/simple-data-list.component.ts b/frontend/app/src/app/modules/data/list/simple-data-list.component.ts index 36e2dc1e..256d43a6 100644 --- a/frontend/app/src/app/modules/data/list/simple-data-list.component.ts +++ b/frontend/app/src/app/modules/data/list/simple-data-list.component.ts @@ -53,7 +53,10 @@ export class SimpleDataListComponent implements OnInit { destroy$ = inject(DestroyRef); - constructor(protected router: Router, private readonly dataRoutingService: DataRoutingService) {} + constructor( + protected router: Router, + private readonly dataRoutingService: DataRoutingService, + ) {} ngOnInit(): void { if (!this.autoRouting) return; diff --git a/frontend/app/src/app/modules/data/types/place/special/mensa/place-mensa-service.ts b/frontend/app/src/app/modules/data/types/place/special/mensa/place-mensa-service.ts index e711da47..06ecc697 100644 --- a/frontend/app/src/app/modules/data/types/place/special/mensa/place-mensa-service.ts +++ b/frontend/app/src/app/modules/data/types/place/special/mensa/place-mensa-service.ts @@ -26,7 +26,10 @@ import {SettingsProvider} from '../../../../../settings/settings.provider'; providedIn: 'root', }) export class PlaceMensaService { - constructor(private dataProvider: DataProvider, readonly settingsProvider: SettingsProvider) {} + constructor( + private dataProvider: DataProvider, + readonly settingsProvider: SettingsProvider, + ) {} /** * Fetches all dishes for this building @@ -39,10 +42,13 @@ export class PlaceMensaService { Array.from({length: days}) .map((_, i) => i) .map(i => moment().add(i, 'days').toISOString()) - .reduce((accumulator, item) => { - accumulator[item] = item; - return accumulator; - }, {} as Record), + .reduce( + (accumulator, item) => { + accumulator[item] = item; + return accumulator; + }, + {} as Record, + ), date => ({ filter: { arguments: { diff --git a/frontend/app/src/app/modules/map/page/map-list-modal.component.ts b/frontend/app/src/app/modules/map/page/map-list-modal.component.ts index d7a89a84..66b98f0c 100644 --- a/frontend/app/src/app/modules/map/page/map-list-modal.component.ts +++ b/frontend/app/src/app/modules/map/page/map-list-modal.component.ts @@ -47,7 +47,10 @@ export class MapListModalComponent implements OnInit { */ @Input() queryText?: string; - constructor(private mapProvider: MapProvider, readonly modalController: ModalController) {} + constructor( + private mapProvider: MapProvider, + readonly modalController: ModalController, + ) {} /** * Populate the list with the results from the search diff --git a/frontend/app/src/app/modules/map/page/map-page.component.ts b/frontend/app/src/app/modules/map/page/map-page.component.ts index 5b2bd14f..4a2453d0 100644 --- a/frontend/app/src/app/modules/map/page/map-page.component.ts +++ b/frontend/app/src/app/modules/map/page/map-page.component.ts @@ -359,8 +359,8 @@ export class MapPageComponent implements OnInit { this.locationStatus?.location === 'denied' ? location.NOT_ALLOWED : this.locationStatus?.location === 'granted' - ? unknownError - : location.NOT_ENABLED + ? unknownError + : location.NOT_ENABLED }`, buttons: ['OK'], }) diff --git a/frontend/app/src/app/modules/menu/navigation/navigation.service.ts b/frontend/app/src/app/modules/menu/navigation/navigation.service.ts index 4f9033d7..6dbcc490 100644 --- a/frontend/app/src/app/modules/menu/navigation/navigation.service.ts +++ b/frontend/app/src/app/modules/menu/navigation/navigation.service.ts @@ -22,7 +22,10 @@ import {NGXLogger} from 'ngx-logger'; providedIn: 'root', }) export class NavigationService { - constructor(private configProvider: ConfigProvider, private logger: NGXLogger) {} + constructor( + private configProvider: ConfigProvider, + private logger: NGXLogger, + ) {} async getMenu() { let menu: SCAppConfigurationMenuCategory[] = []; diff --git a/frontend/app/src/app/modules/news/news.provider.ts b/frontend/app/src/app/modules/news/news.provider.ts index 7dfdfe7a..dfe970e2 100644 --- a/frontend/app/src/app/modules/news/news.provider.ts +++ b/frontend/app/src/app/modules/news/news.provider.ts @@ -37,7 +37,10 @@ import {SettingsProvider} from '../settings/settings.provider'; providedIn: 'root', }) export class NewsProvider { - constructor(private dataProvider: DataProvider, private settingsProvider: SettingsProvider) {} + constructor( + private dataProvider: DataProvider, + private settingsProvider: SettingsProvider, + ) {} async getCurrentSettings(): Promise { const settings: SCSetting[] = []; diff --git a/frontend/app/src/app/modules/schedule/page/schedule-single-events.spec.ts b/frontend/app/src/app/modules/schedule/page/schedule-single-events.spec.ts index 05bd42e2..f274c31f 100644 --- a/frontend/app/src/app/modules/schedule/page/schedule-single-events.spec.ts +++ b/frontend/app/src/app/modules/schedule/page/schedule-single-events.spec.ts @@ -46,7 +46,9 @@ describe('ScheduleSingleEvents', () => { start: time.hour() + time.minute() / 60, startAsString: moment(time).format('LT'), duration: series.duration as string, - endAsString: moment(time).add(series.duration?.[index]).format('LT'), + endAsString: moment(time) + .add(series.duration?.[index]) + .format('LT'), }, }, }; diff --git a/frontend/app/src/app/modules/schedule/page/schedule-view.component.ts b/frontend/app/src/app/modules/schedule/page/schedule-view.component.ts index 235814cf..d3737b90 100644 --- a/frontend/app/src/app/modules/schedule/page/schedule-view.component.ts +++ b/frontend/app/src/app/modules/schedule/page/schedule-view.component.ts @@ -133,10 +133,13 @@ export class ScheduleViewComponent extends CalendarComponent implements OnInit, for (const series of dateSeries.dates) { const weekDays = Object.keys( - series.dates.reduce((accumulator, date) => { - accumulator[moment(date).weekday()] = true; - return accumulator; - }, {} as Record), + series.dates.reduce( + (accumulator, date) => { + accumulator[moment(date).weekday()] = true; + return accumulator; + }, + {} as Record, + ), ); for (const day of weekDays) { diff --git a/frontend/app/src/app/modules/settings/settings.provider.ts b/frontend/app/src/app/modules/settings/settings.provider.ts index a3f52249..0cb9c75e 100644 --- a/frontend/app/src/app/modules/settings/settings.provider.ts +++ b/frontend/app/src/app/modules/settings/settings.provider.ts @@ -197,7 +197,10 @@ export class SettingsProvider { * @param storage TODO * @param configProvider TODO */ - constructor(private readonly storage: StorageProvider, private readonly configProvider: ConfigProvider) { + constructor( + private readonly storage: StorageProvider, + private readonly configProvider: ConfigProvider, + ) { this.categoriesOrder = []; this.settingsCache = {}; } @@ -330,9 +333,8 @@ export class SettingsProvider { if (await this.storage.has(STORAGE_KEY_SETTING_VALUES)) { // get setting values from StorageProvider into settingsCache - const valuesContainer: SettingValuesContainer = await this.storage.get( - STORAGE_KEY_SETTING_VALUES, - ); + const valuesContainer: SettingValuesContainer = + await this.storage.get(STORAGE_KEY_SETTING_VALUES); // iterate through keys of categories for (const categoryKey of Object.keys(this.settingsCache)) { // iterate through setting keys of category @@ -384,9 +386,8 @@ export class SettingsProvider { */ public async saveSettingValues(): Promise { if (await this.storage.has(STORAGE_KEY_SETTING_VALUES)) { - const savedSettingsValues: SettingValuesContainer = await this.storage.get( - STORAGE_KEY_SETTING_VALUES, - ); + const savedSettingsValues: SettingValuesContainer = + await this.storage.get(STORAGE_KEY_SETTING_VALUES); const cacheSettingsValues = this.getSettingValuesFromCache(); const mergedSettingValues = deepMerge(savedSettingsValues, cacheSettingsValues); await this.storage.put(STORAGE_KEY_SETTING_VALUES, mergedSettingValues); diff --git a/frontend/app/src/app/util/internet-connection.service.ts b/frontend/app/src/app/util/internet-connection.service.ts index e8ed9ea8..63345224 100644 --- a/frontend/app/src/app/util/internet-connection.service.ts +++ b/frontend/app/src/app/util/internet-connection.service.ts @@ -101,7 +101,10 @@ export class InternetConnectionService { private readonly errors = new Set(); - constructor(private readonly logger: NGXLogger, private readonly router: Router) {} + constructor( + private readonly logger: NGXLogger, + private readonly router: Router, + ) {} /** * Retry all failed http requests diff --git a/frontend/app/src/app/util/ion-icon/icon.scss b/frontend/app/src/app/util/ion-icon/icon.scss index 9ac563b7..2465779f 100644 --- a/frontend/app/src/app/util/ion-icon/icon.scss +++ b/frontend/app/src/app/util/ion-icon/icon.scss @@ -22,7 +22,10 @@ height: 100%; font-size: inherit; - font-variation-settings: 'wght' var(--weight), 'GRAD' var(--grade), 'FILL' var(--fill); + font-variation-settings: + 'wght' var(--weight), + 'GRAD' var(--grade), + 'FILL' var(--fill); transition: all 0.2s ease-in-out; } diff --git a/frontend/app/src/index.html b/frontend/app/src/index.html index c39e6c12..cf3ded06 100644 --- a/frontend/app/src/index.html +++ b/frontend/app/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/frontend/app/src/theme/components/_card.scss b/frontend/app/src/theme/components/_card.scss index e33fb7cb..dd4c0145 100644 --- a/frontend/app/src/theme/components/_card.scss +++ b/frontend/app/src/theme/components/_card.scss @@ -27,7 +27,9 @@ border-radius: var(--border-radius-default); box-shadow: var(--shadow-cards); - transition: transform 250ms ease-in-out, box-shadow 250ms ease-in-out; + transition: + transform 250ms ease-in-out, + box-shadow 250ms ease-in-out; } @media (hover: hover) { diff --git a/packages/api-cli/test/copy.spec.ts b/packages/api-cli/test/copy.spec.ts index 63b26dae..2e08d638 100644 --- a/packages/api-cli/test/copy.spec.ts +++ b/packages/api-cli/test/copy.spec.ts @@ -39,8 +39,8 @@ export type RecursivePartial = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends object - ? RecursivePartial - : T[P]; + ? RecursivePartial + : T[P]; }; chai.should(); diff --git a/packages/api/src/client.ts b/packages/api/src/client.ts index 0e44faff..2c16c1be 100644 --- a/packages/api/src/client.ts +++ b/packages/api/src/client.ts @@ -95,7 +95,11 @@ export class Client { * * TODO: remove headers/version */ - constructor(protected httpClient: HttpClientInterface, protected url: string, protected version?: string) { + constructor( + protected httpClient: HttpClientInterface, + protected url: string, + protected version?: string, + ) { // cut trailing slash if needed this.url = this.url.replace(/\/$/, ''); diff --git a/packages/api/test/client.spec.ts b/packages/api/test/client.spec.ts index fe265f0e..d1272b6e 100644 --- a/packages/api/test/client.spec.ts +++ b/packages/api/test/client.spec.ts @@ -51,8 +51,8 @@ export type RecursivePartial = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends object - ? RecursivePartial - : T[P]; + ? RecursivePartial + : T[P]; }; async function invokeIndexRoute(): Promise>> { diff --git a/packages/collection-utils/src/key-by.ts b/packages/collection-utils/src/key-by.ts index e7f3a544..06871614 100644 --- a/packages/collection-utils/src/key-by.ts +++ b/packages/collection-utils/src/key-by.ts @@ -20,8 +20,11 @@ * iteratee is invoked with one argument: (value). */ export function keyBy(collection: T[], key: (item: T) => string | number): Record { - return collection.reduce((accumulator, item) => { - accumulator[key(item)] = item; - return accumulator; - }, {} as Record); + return collection.reduce( + (accumulator, item) => { + accumulator[key(item)] = item; + return accumulator; + }, + {} as Record, + ); } diff --git a/packages/collection-utils/src/pick.ts b/packages/collection-utils/src/pick.ts index 9405a37b..7088c507 100644 --- a/packages/collection-utils/src/pick.ts +++ b/packages/collection-utils/src/pick.ts @@ -17,12 +17,15 @@ * Pick a set of properties from an object */ export function pick(object: T, keys: U[]): Pick { - return keys.reduce((accumulator, key) => { - if (object.hasOwnProperty(key)) { - accumulator[key] = object[key]; - } - return accumulator; - }, {} as Pick); + return keys.reduce( + (accumulator, key) => { + if (object.hasOwnProperty(key)) { + accumulator[key] = object[key]; + } + return accumulator; + }, + {} as Pick, + ); } /** @@ -32,10 +35,13 @@ export function pickBy( object: T, predicate: (value: T[U], key: U) => boolean, ): Pick { - return (Object.keys(object) as U[]).reduce((accumulator, key) => { - if (predicate(object[key], key)) { - accumulator[key] = object[key]; - } - return accumulator; - }, {} as Pick); + return (Object.keys(object) as U[]).reduce( + (accumulator, key) => { + if (predicate(object[key], key)) { + accumulator[key] = object[key]; + } + return accumulator; + }, + {} as Pick, + ); } diff --git a/packages/collection-utils/src/uniq.ts b/packages/collection-utils/src/uniq.ts index 933c07e7..32e4056d 100644 --- a/packages/collection-utils/src/uniq.ts +++ b/packages/collection-utils/src/uniq.ts @@ -18,9 +18,12 @@ */ export function uniqBy(array: T[], transform: (item: T) => string | number): T[] { return Object.values( - array.reduce((accumulator, current) => { - accumulator[transform(current)] = current; - return accumulator; - }, {} as Record), + array.reduce( + (accumulator, current) => { + accumulator[transform(current)] = current; + return accumulator; + }, + {} as Record, + ), ); } diff --git a/packages/core/api-doc.html b/packages/core/api-doc.html index fb8fda2a..8198ee69 100644 --- a/packages/core/api-doc.html +++ b/packages/core/api-doc.html @@ -1,4 +1,4 @@ - + OpenStApps API diff --git a/packages/core/src/general/i18n.ts b/packages/core/src/general/i18n.ts index 5cd25889..5f75c01f 100644 --- a/packages/core/src/general/i18n.ts +++ b/packages/core/src/general/i18n.ts @@ -691,8 +691,8 @@ type RecursivePartial = { [P in keyof T]-?: T[P] extends Array ? Array> : T[P] extends object - ? RecursivePartial - : T[P]; + ? RecursivePartial + : T[P]; }; /** diff --git a/packages/core/src/meta.ts b/packages/core/src/meta.ts index bd00ec44..912ebaca 100644 --- a/packages/core/src/meta.ts +++ b/packages/core/src/meta.ts @@ -148,66 +148,66 @@ export type SCThingsField = keyof SCThings | string; export type SCAssociatedThingWithoutReferences = THING extends SCAssessment ? SCAssessmentWithoutReferences : THING extends SCAcademicEvent - ? SCAcademicEventWithoutReferences - : THING extends SCArticle - ? SCArticleWithoutReferences - : THING extends SCBook - ? SCBookWithoutReferences - : THING extends SCBuilding - ? SCBuildingWithoutReferences - : THING extends SCCatalog - ? SCCatalogWithoutReferences - : THING extends SCContactPoint - ? SCContactPointWithoutReferences - : THING extends SCCourseOfStudy - ? SCCourseOfStudyWithoutReferences - : THING extends SCCertification - ? SCCertificationWithoutReferences - : THING extends SCDateSeries - ? SCDateSeriesWithoutReferences - : THING extends SCDiff - ? SCDiffWithoutReferences - : THING extends SCDish - ? SCDishWithoutReferences - : THING extends SCFavorite - ? SCFavoriteWithoutReferences - : THING extends SCFloor - ? SCFloorWithoutReferences - : THING extends SCIdCard - ? SCIdCardWithoutReferences - : THING extends SCJobPosting - ? SCJobPostingWithoutReferences - : THING extends SCMessage - ? SCMessageWithoutReferences - : THING extends SCOrganization - ? SCOrganizationWithoutReferences - : THING extends SCPeriodical - ? SCPeriodicalWithoutReferences - : THING extends SCPerson - ? SCPersonWithoutReferences - : THING extends SCPointOfInterest - ? SCPointOfInterestWithoutReferences - : THING extends SCPublicationEvent - ? SCPublicationEventWithoutReferences - : THING extends SCRoom - ? SCRoomWithoutReferences - : THING extends SCSemester - ? SCSemesterWithoutReferences - : THING extends SCSetting - ? SCSettingWithoutReferences - : THING extends SCSportCourse - ? SCSportCourseWithoutReferences - : THING extends SCStudyModule - ? SCStudyModuleWithoutReferences - : THING extends SCTicket - ? SCTicketWithoutReferences - : THING extends SCToDo - ? SCToDoWithoutReferences - : THING extends SCTour - ? SCTourWithoutReferences - : THING extends SCVideo - ? SCVideoWithoutReferences - : never; + ? SCAcademicEventWithoutReferences + : THING extends SCArticle + ? SCArticleWithoutReferences + : THING extends SCBook + ? SCBookWithoutReferences + : THING extends SCBuilding + ? SCBuildingWithoutReferences + : THING extends SCCatalog + ? SCCatalogWithoutReferences + : THING extends SCContactPoint + ? SCContactPointWithoutReferences + : THING extends SCCourseOfStudy + ? SCCourseOfStudyWithoutReferences + : THING extends SCCertification + ? SCCertificationWithoutReferences + : THING extends SCDateSeries + ? SCDateSeriesWithoutReferences + : THING extends SCDiff + ? SCDiffWithoutReferences + : THING extends SCDish + ? SCDishWithoutReferences + : THING extends SCFavorite + ? SCFavoriteWithoutReferences + : THING extends SCFloor + ? SCFloorWithoutReferences + : THING extends SCIdCard + ? SCIdCardWithoutReferences + : THING extends SCJobPosting + ? SCJobPostingWithoutReferences + : THING extends SCMessage + ? SCMessageWithoutReferences + : THING extends SCOrganization + ? SCOrganizationWithoutReferences + : THING extends SCPeriodical + ? SCPeriodicalWithoutReferences + : THING extends SCPerson + ? SCPersonWithoutReferences + : THING extends SCPointOfInterest + ? SCPointOfInterestWithoutReferences + : THING extends SCPublicationEvent + ? SCPublicationEventWithoutReferences + : THING extends SCRoom + ? SCRoomWithoutReferences + : THING extends SCSemester + ? SCSemesterWithoutReferences + : THING extends SCSetting + ? SCSettingWithoutReferences + : THING extends SCSportCourse + ? SCSportCourseWithoutReferences + : THING extends SCStudyModule + ? SCStudyModuleWithoutReferences + : THING extends SCTicket + ? SCTicketWithoutReferences + : THING extends SCToDo + ? SCToDoWithoutReferences + : THING extends SCTour + ? SCTourWithoutReferences + : THING extends SCVideo + ? SCVideoWithoutReferences + : never; /** * Thing for a thing without references @@ -215,63 +215,63 @@ export type SCAssociatedThingWithoutReferences = THING e export type SCAssociatedThing = THING extends SCAssessmentWithoutReferences ? SCAssessment : THING extends SCAcademicEventWithoutReferences - ? SCAcademicEvent - : THING extends SCArticleWithoutReferences - ? SCArticle - : THING extends SCBookWithoutReferences - ? SCBook - : THING extends SCBuildingWithoutReferences - ? SCBuilding - : THING extends SCCatalogWithoutReferences - ? SCCatalog - : THING extends SCContactPointWithoutReferences - ? SCContactPoint - : THING extends SCCourseOfStudyWithoutReferences - ? SCCourseOfStudy - : THING extends SCCertificationWithoutReferences - ? SCCertification - : THING extends SCDateSeriesWithoutReferences - ? SCDateSeries - : THING extends SCDiffWithoutReferences - ? SCDiff - : THING extends SCDishWithoutReferences - ? SCDish - : THING extends SCJobPostingWithoutReferences - ? SCJobPosting - : THING extends SCFavoriteWithoutReferences - ? SCFavorite - : THING extends SCFloorWithoutReferences - ? SCFloor - : THING extends SCIdCardWithoutReferences - ? SCIdCard - : THING extends SCMessageWithoutReferences - ? SCMessage - : THING extends SCOrganizationWithoutReferences - ? SCOrganization - : THING extends SCPeriodicalWithoutReferences - ? SCPeriodical - : THING extends SCPersonWithoutReferences - ? SCPerson - : THING extends SCPointOfInterestWithoutReferences - ? SCPointOfInterest - : THING extends SCPublicationEventWithoutReferences - ? SCPublicationEvent - : THING extends SCRoomWithoutReferences - ? SCRoom - : THING extends SCSemesterWithoutReferences - ? SCSemester - : THING extends SCSettingWithoutReferences - ? SCSetting - : THING extends SCSportCourseWithoutReferences - ? SCSportCourse - : THING extends SCStudyModuleWithoutReferences - ? SCStudyModule - : THING extends SCTicketWithoutReferences - ? SCTicket - : THING extends SCToDoWithoutReferences - ? SCToDo - : THING extends SCTourWithoutReferences - ? SCTour - : THING extends SCVideoWithoutReferences - ? SCVideo - : never; + ? SCAcademicEvent + : THING extends SCArticleWithoutReferences + ? SCArticle + : THING extends SCBookWithoutReferences + ? SCBook + : THING extends SCBuildingWithoutReferences + ? SCBuilding + : THING extends SCCatalogWithoutReferences + ? SCCatalog + : THING extends SCContactPointWithoutReferences + ? SCContactPoint + : THING extends SCCourseOfStudyWithoutReferences + ? SCCourseOfStudy + : THING extends SCCertificationWithoutReferences + ? SCCertification + : THING extends SCDateSeriesWithoutReferences + ? SCDateSeries + : THING extends SCDiffWithoutReferences + ? SCDiff + : THING extends SCDishWithoutReferences + ? SCDish + : THING extends SCJobPostingWithoutReferences + ? SCJobPosting + : THING extends SCFavoriteWithoutReferences + ? SCFavorite + : THING extends SCFloorWithoutReferences + ? SCFloor + : THING extends SCIdCardWithoutReferences + ? SCIdCard + : THING extends SCMessageWithoutReferences + ? SCMessage + : THING extends SCOrganizationWithoutReferences + ? SCOrganization + : THING extends SCPeriodicalWithoutReferences + ? SCPeriodical + : THING extends SCPersonWithoutReferences + ? SCPerson + : THING extends SCPointOfInterestWithoutReferences + ? SCPointOfInterest + : THING extends SCPublicationEventWithoutReferences + ? SCPublicationEvent + : THING extends SCRoomWithoutReferences + ? SCRoom + : THING extends SCSemesterWithoutReferences + ? SCSemester + : THING extends SCSettingWithoutReferences + ? SCSetting + : THING extends SCSportCourseWithoutReferences + ? SCSportCourse + : THING extends SCStudyModuleWithoutReferences + ? SCStudyModule + : THING extends SCTicketWithoutReferences + ? SCTicket + : THING extends SCToDoWithoutReferences + ? SCToDo + : THING extends SCTourWithoutReferences + ? SCTour + : THING extends SCVideoWithoutReferences + ? SCVideo + : never; diff --git a/packages/core/src/protocol/error.ts b/packages/core/src/protocol/error.ts index 681287a3..afd147de 100644 --- a/packages/core/src/protocol/error.ts +++ b/packages/core/src/protocol/error.ts @@ -45,7 +45,12 @@ export abstract class SCError implements SCErrorResponse { * @param statusCode HTTP status code to return this error with * @param stack Set to true if a stack trace should be created */ - constructor(public name: string, public message: string, public statusCode: number, stack = false) { + constructor( + public name: string, + public message: string, + public statusCode: number, + stack = false, + ) { // generate stacktrace if needed if (stack) { // eslint-disable-next-line unicorn/error-message diff --git a/packages/core/src/protocol/route.ts b/packages/core/src/protocol/route.ts index 16d43a83..ac20a4e4 100644 --- a/packages/core/src/protocol/route.ts +++ b/packages/core/src/protocol/route.ts @@ -193,24 +193,24 @@ export type SCResponses = export type SCAssociatedResponse = REQUEST extends SCBookAvailabilityRequest ? SCBookAvailabilityResponse : REQUEST extends SCBulkRequest - ? SCBulkResponse - : REQUEST extends SCBulkAddRequest - ? SCBulkAddResponse - : REQUEST extends SCBulkDoneRequest - ? SCBulkDoneResponse - : REQUEST extends SCFeedbackRequest - ? SCFeedbackResponse - : REQUEST extends SCRatingRequest - ? SCRatingResponse - : REQUEST extends SCIndexRequest - ? SCIndexResponse - : REQUEST extends SCMultiSearchRequest - ? SCMultiSearchResponse - : REQUEST extends SCSearchRequest - ? SCSearchResponse - : REQUEST extends SCThingUpdateRequest - ? SCThingUpdateResponse - : never; + ? SCBulkResponse + : REQUEST extends SCBulkAddRequest + ? SCBulkAddResponse + : REQUEST extends SCBulkDoneRequest + ? SCBulkDoneResponse + : REQUEST extends SCFeedbackRequest + ? SCFeedbackResponse + : REQUEST extends SCRatingRequest + ? SCRatingResponse + : REQUEST extends SCIndexRequest + ? SCIndexResponse + : REQUEST extends SCMultiSearchRequest + ? SCMultiSearchResponse + : REQUEST extends SCSearchRequest + ? SCSearchResponse + : REQUEST extends SCThingUpdateRequest + ? SCThingUpdateResponse + : never; /** * Associated request for a response @@ -218,24 +218,24 @@ export type SCAssociatedResponse = REQUEST extends SCBookAvailabilityRe export type SCAssociatedRequest = RESPONSE extends SCBookAvailabilityResponse ? SCBookAvailabilityRequest : RESPONSE extends SCBulkResponse - ? SCBulkRequest - : RESPONSE extends SCBulkAddResponse - ? SCBulkAddRequest - : RESPONSE extends SCBulkDoneResponse - ? SCBulkDoneRequest - : RESPONSE extends SCFeedbackResponse - ? SCFeedbackRequest - : RESPONSE extends SCRatingResponse - ? SCRatingRequest - : RESPONSE extends SCIndexResponse - ? SCIndexRequest - : RESPONSE extends SCMultiSearchResponse - ? SCMultiSearchRequest - : RESPONSE extends SCSearchResponse - ? SCSearchRequest - : RESPONSE extends SCThingUpdateResponse - ? SCThingUpdateRequest - : never; + ? SCBulkRequest + : RESPONSE extends SCBulkAddResponse + ? SCBulkAddRequest + : RESPONSE extends SCBulkDoneResponse + ? SCBulkDoneRequest + : RESPONSE extends SCFeedbackResponse + ? SCFeedbackRequest + : RESPONSE extends SCRatingResponse + ? SCRatingRequest + : RESPONSE extends SCIndexResponse + ? SCIndexRequest + : RESPONSE extends SCMultiSearchResponse + ? SCMultiSearchRequest + : RESPONSE extends SCSearchResponse + ? SCSearchRequest + : RESPONSE extends SCThingUpdateResponse + ? SCThingUpdateRequest + : never; /** * Associated request for a route @@ -243,24 +243,24 @@ export type SCAssociatedRequest = RESPONSE extends SCBookAvailabilityR export type SCAssignedRequest = ROUTE extends SCBookAvailabilityRoute ? SCBookAvailabilityRequest : ROUTE extends SCBulkRoute - ? SCBulkRequest - : ROUTE extends SCBulkAddRoute - ? SCBulkAddRequest - : ROUTE extends SCBulkDoneRoute - ? SCBulkDoneRequest - : ROUTE extends SCFeedbackRoute - ? SCFeedbackRequest - : ROUTE extends SCRatingRoute - ? SCRatingRequest - : ROUTE extends SCIndexRoute - ? SCIndexRequest - : ROUTE extends SCMultiSearchRoute - ? SCMultiSearchRequest - : ROUTE extends SCSearchRoute - ? SCSearchRequest - : ROUTE extends SCThingUpdateRoute - ? SCThingUpdateRequest - : never; + ? SCBulkRequest + : ROUTE extends SCBulkAddRoute + ? SCBulkAddRequest + : ROUTE extends SCBulkDoneRoute + ? SCBulkDoneRequest + : ROUTE extends SCFeedbackRoute + ? SCFeedbackRequest + : ROUTE extends SCRatingRoute + ? SCRatingRequest + : ROUTE extends SCIndexRoute + ? SCIndexRequest + : ROUTE extends SCMultiSearchRoute + ? SCMultiSearchRequest + : ROUTE extends SCSearchRoute + ? SCSearchRequest + : ROUTE extends SCThingUpdateRoute + ? SCThingUpdateRequest + : never; /** * Associated response for a route @@ -268,21 +268,21 @@ export type SCAssignedRequest = ROUTE extends SCB export type SCAssignedResponse = ROUTE extends SCBookAvailabilityRoute ? SCBookAvailabilityResponse : ROUTE extends SCBulkRoute - ? SCBulkResponse - : ROUTE extends SCBulkAddRoute - ? SCBulkAddResponse - : ROUTE extends SCBulkDoneRoute - ? SCBulkDoneResponse - : ROUTE extends SCFeedbackRoute - ? SCFeedbackResponse - : ROUTE extends SCRatingRoute - ? SCRatingResponse - : ROUTE extends SCIndexRoute - ? SCIndexResponse - : ROUTE extends SCMultiSearchRoute - ? SCMultiSearchResponse - : ROUTE extends SCSearchRoute - ? SCSearchResponse - : ROUTE extends SCThingUpdateRoute - ? SCThingUpdateResponse - : never; + ? SCBulkResponse + : ROUTE extends SCBulkAddRoute + ? SCBulkAddResponse + : ROUTE extends SCBulkDoneRoute + ? SCBulkDoneResponse + : ROUTE extends SCFeedbackRoute + ? SCFeedbackResponse + : ROUTE extends SCRatingRoute + ? SCRatingResponse + : ROUTE extends SCIndexRoute + ? SCIndexResponse + : ROUTE extends SCMultiSearchRoute + ? SCMultiSearchResponse + : ROUTE extends SCSearchRoute + ? SCSearchResponse + : ROUTE extends SCThingUpdateRoute + ? SCThingUpdateResponse + : never; diff --git a/packages/core/test/features.spec.ts b/packages/core/test/features.spec.ts index d4b2063f..bf2b1b83 100644 --- a/packages/core/test/features.spec.ts +++ b/packages/core/test/features.spec.ts @@ -117,8 +117,8 @@ describe('Features', () => { .map(it => project.definitions[it] as LightweightDefinition) .some(it => it.name === 'SCThing' || hasSCThingReferences(it)) : definition - ? typeHasSCThingReferences(definition.type) - : false; + ? typeHasSCThingReferences(definition.type) + : false; for (const thing of things) { expect(hasSCThingReferences(thing)).to.be.false; diff --git a/packages/easy-ast/src/ast-internal-util.ts b/packages/easy-ast/src/ast-internal-util.ts index 9a9f0108..316fcdaf 100644 --- a/packages/easy-ast/src/ast-internal-util.ts +++ b/packages/easy-ast/src/ast-internal-util.ts @@ -86,8 +86,8 @@ export function resolvePropertyName(name?: ts.PropertyName): string | undefined return name === undefined ? undefined : ts.isComputedPropertyName(name) - ? 'UNSUPPORTED_IDENTIFIER_TYPE' - : name.getText(); + ? 'UNSUPPORTED_IDENTIFIER_TYPE' + : name.getText(); } /** @internal */ diff --git a/packages/easy-ast/src/easy-ast.ts b/packages/easy-ast/src/easy-ast.ts index 1266ec9a..a8f6be26 100644 --- a/packages/easy-ast/src/easy-ast.ts +++ b/packages/easy-ast/src/easy-ast.ts @@ -72,7 +72,10 @@ class LightweightDefinitionBuilder { readonly typeChecker: ts.TypeChecker; - constructor(sourcePath: string | string[], readonly includeComments: boolean) { + constructor( + sourcePath: string | string[], + readonly includeComments: boolean, + ) { const rootNames = Array.isArray(sourcePath) ? sourcePath : expandPathToFilesSync(path.resolve(sourcePath), it => it.endsWith('.ts')); diff --git a/packages/logger/src/common.ts b/packages/logger/src/common.ts index ad222724..aa5ec0d6 100644 --- a/packages/logger/src/common.ts +++ b/packages/logger/src/common.ts @@ -23,8 +23,8 @@ export type RecursivePartial = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends object - ? RecursivePartial - : T[P]; + ? RecursivePartial + : T[P]; }; /** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d81b92f4..f58fc83b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -203,7 +203,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -220,8 +220,8 @@ importers: specifier: 1.3.5 version: 1.3.5 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 sinon: specifier: 15.0.4 version: 15.0.4 @@ -335,7 +335,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -346,8 +346,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 sinon: specifier: 15.0.4 version: 15.0.4 @@ -389,13 +389,13 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 configuration/eslint-config: dependencies: @@ -413,7 +413,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -432,10 +432,10 @@ importers: version: 5.1.6 configuration/prettier-config: - dependencies: + devDependencies: prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 configuration/projectmanagement: dependencies: @@ -520,7 +520,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -531,8 +531,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -613,7 +613,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -627,8 +627,8 @@ importers: specifier: 13.3.1 version: 13.3.1 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -700,13 +700,13 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 tsup: specifier: 6.7.0 version: 6.7.0(ts-node@10.9.1)(typescript@5.1.6) @@ -878,9 +878,6 @@ importers: opening_hours: specifier: 3.8.0 version: 3.8.0 - prettier: - specifier: 2.8.6 - version: 2.8.6 rxjs: specifier: 7.8.1 version: 7.8.1 @@ -1022,7 +1019,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1071,6 +1068,9 @@ importers: license-checker: specifier: 25.0.1 version: 25.0.1 + prettier: + specifier: 3.1.0 + version: 3.1.0 stylelint: specifier: 15.10.1 version: 15.10.1(typescript@5.1.6) @@ -1178,7 +1178,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1189,8 +1189,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 traverse: specifier: 0.6.7 version: 0.6.7 @@ -1304,8 +1304,8 @@ importers: specifier: 13.3.1 version: 13.3.1 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -1408,7 +1408,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1422,8 +1422,8 @@ importers: specifier: 13.3.1 version: 13.3.1 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -1480,7 +1480,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1491,8 +1491,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -1589,7 +1589,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1600,8 +1600,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 source-map-support: specifier: 0.5.21 version: 0.5.21 @@ -1737,7 +1737,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1751,8 +1751,8 @@ importers: specifier: 13.3.1 version: 13.3.1 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -1822,7 +1822,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1833,8 +1833,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -1910,7 +1910,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -1924,8 +1924,8 @@ importers: specifier: 13.3.1 version: 13.3.1 prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 rimraf: specifier: 5.0.0 version: 5.0.0 @@ -1974,13 +1974,13 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -2062,7 +2062,7 @@ importers: version: 46.4.2(eslint@8.43.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0) eslint-plugin-unicorn: specifier: 47.0.0 version: 47.0.0(eslint@8.43.0) @@ -2073,8 +2073,8 @@ importers: specifier: 2.2.0 version: 2.2.0(mocha@10.2.0) prettier: - specifier: 2.8.6 - version: 2.8.6 + specifier: 3.1.0 + version: 3.1.0 ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@18.15.3)(typescript@5.1.6) @@ -6546,7 +6546,7 @@ packages: resolution: {integrity: sha512-UWRmygBsyj4bVXvDiqSccwT1kmsorcwQwaIy30yVh8T+Gspx4OlC0shX1y+ZuwXZvgnafmpRYKks0bAu9urJew==} dependencies: '@xml-tools/parser': 1.0.11 - prettier: 2.8.6 + prettier: 3.1.0 dev: true /@schematics/angular@12.2.18: @@ -11172,7 +11172,7 @@ packages: transitivePeerDependencies: - supports-color - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@2.8.6): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.43.0)(prettier@3.1.0): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -11185,7 +11185,7 @@ packages: dependencies: eslint: 8.43.0 eslint-config-prettier: 8.8.0(eslint@8.43.0) - prettier: 2.8.6 + prettier: 3.1.0 prettier-linter-helpers: 1.0.0 /eslint-plugin-unicorn@47.0.0(eslint@8.43.0): @@ -16117,6 +16117,12 @@ packages: resolution: {integrity: sha512-mtuzdiBbHwPEgl7NxWlqOkithPyp4VN93V7VeHVWBF+ad3I5avc0RVDT4oImXQy9H/AqxA2NSQH8pSxHW6FYbQ==} engines: {node: '>=10.13.0'} hasBin: true + dev: true + + /prettier@3.1.0: + resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + engines: {node: '>=14'} + hasBin: true /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} diff --git a/prettier.config.cjs b/prettier.config.cjs deleted file mode 100644 index c060491a..00000000 --- a/prettier.config.cjs +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('./configuration/prettier-config/index.json'), -} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..12139697 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1 @@ +export default from './configuration/prettier-config/index.js';