mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-01 04:12:25 +00:00
feat: upgrade prettier to v3
This commit is contained in:
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
pnpm-lock.yaml
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
15
configuration/prettier-config/index.js
Normal file
15
configuration/prettier-config/index.js
Normal file
@@ -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;
|
||||
@@ -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"
|
||||
}
|
||||
@@ -9,16 +9,19 @@
|
||||
"contributors": [
|
||||
"Rainer Killinger <mail-openstapps@killinger.co>"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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;
|
||||
@@ -49,7 +49,10 @@ export class SharedAxisChoreographer<T> {
|
||||
*/
|
||||
currentValue: T;
|
||||
|
||||
constructor(initialValue: T, readonly pages?: T[]) {
|
||||
constructor(
|
||||
initialValue: T,
|
||||
readonly pages?: T[],
|
||||
) {
|
||||
this.currentValue = initialValue;
|
||||
this.expectedValue = initialValue;
|
||||
}
|
||||
|
||||
@@ -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('/');
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
@@ -134,9 +134,9 @@ export class ScheduleSyncService {
|
||||
private formatChanges(changes: ChangesOf<SCDateSeries, DateSeriesRelevantData>): string[] {
|
||||
return changes.changes.map(
|
||||
change =>
|
||||
`${
|
||||
this.translator.translator.translatedPropertyNames<SCDateSeries>(SCThingType.DateSeries)?.[change]
|
||||
}: ${formatRelevantKeys[change](
|
||||
`${this.translator.translator.translatedPropertyNames<SCDateSeries>(SCThingType.DateSeries)?.[
|
||||
change
|
||||
]}: ${formatRelevantKeys[change](
|
||||
changes.new[change] as never,
|
||||
this.dateFormatPipe,
|
||||
this.durationFormatPipe,
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<ion-label>
|
||||
{{
|
||||
nextEvent
|
||||
? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm')
|
||||
? (nextEvent!.dates | nextDateInList | amDateFormat: 'll, HH:mm')
|
||||
: ('dashboard.schedule.noEvent' | translate)
|
||||
}}
|
||||
</ion-label>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<ng-container *ngIf="items | async as items">
|
||||
<ng-container *ngIf="items.length !== 0; else nothingSelected">
|
||||
<ng-container *ngFor="let item of items">
|
||||
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate : item">
|
||||
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate: item">
|
||||
<ion-button slot="button-end" fill="clear" color="medium" (click)="favoritesService.delete(item)">
|
||||
<ion-icon slot="icon-only" name="delete" size="24"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,7 +44,10 @@ export class TreeNode<T extends TreeNode<any> | SelectionValue> {
|
||||
*/
|
||||
parent?: TreeNode<TreeNode<T>>;
|
||||
|
||||
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<T extends TreeNode<any> | 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);
|
||||
|
||||
@@ -29,10 +29,13 @@ async function delay(ms: number): Promise<void> {
|
||||
* ['a', 'b', 'c'] => {0: 'a', 1: 'b', 2: 'c'}
|
||||
*/
|
||||
export function arrayToIndexMap<T>(array: T[]): Record<number, T> {
|
||||
return array.reduce((previous, current, index) => {
|
||||
previous[index] = current;
|
||||
return previous;
|
||||
}, {} as Record<number, T>);
|
||||
return array.reduce(
|
||||
(previous, current, index) => {
|
||||
previous[index] = current;
|
||||
return previous;
|
||||
},
|
||||
{} as Record<number, T>,
|
||||
);
|
||||
}
|
||||
|
||||
interface OngoingQuery {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<ion-card-title>
|
||||
<h1>
|
||||
<ng-container *ngIf="$any(item).honorificPrefix">{{
|
||||
'honorificPrefix' | thingTranslate : item
|
||||
'honorificPrefix' | thingTranslate: item
|
||||
}}</ng-container>
|
||||
{{ 'name' | thingTranslate : item }}
|
||||
{{ 'name' | thingTranslate: item }}
|
||||
<ng-container *ngIf="$any(item).honorificSuffix">{{
|
||||
'honorificSuffix' | thingTranslate : item
|
||||
'honorificSuffix' | thingTranslate: item
|
||||
}}</ng-container>
|
||||
</h1>
|
||||
</ion-card-title>
|
||||
@@ -33,7 +33,7 @@
|
||||
<!-- TODO obviously this is bad style. Tbd where to put the differentiation. Job Postings always have a description, but it's going to be shown in `stapps-job-posting-detail-content` anyways, no need to repeat here. For this view, I would use other fields of the schema.org JobPosting like the `ThingWithCategory.category` -->
|
||||
<div *ngIf="item.description && item.type !== 'job posting'" class="description">
|
||||
<div class="text-accordion" [style.-webkit-line-clamp]="descriptionLinesToDisplay" #accordionTextArea>
|
||||
{{ 'description' | thingTranslate : item }}
|
||||
{{ 'description' | thingTranslate: item }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO see above -->
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<SCISO8601Date, SCISO8601Date>),
|
||||
.reduce(
|
||||
(accumulator, item) => {
|
||||
accumulator[item] = item;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<SCISO8601Date, SCISO8601Date>,
|
||||
),
|
||||
date => ({
|
||||
filter: {
|
||||
arguments: {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'],
|
||||
})
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
@@ -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<SCSetting[]> {
|
||||
const settings: SCSetting[] = [];
|
||||
|
||||
@@ -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'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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<number, true>),
|
||||
series.dates.reduce(
|
||||
(accumulator, date) => {
|
||||
accumulator[moment(date).weekday()] = true;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<number, true>,
|
||||
),
|
||||
);
|
||||
|
||||
for (const day of weekDays) {
|
||||
|
||||
@@ -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<SettingValuesContainer>(
|
||||
STORAGE_KEY_SETTING_VALUES,
|
||||
);
|
||||
const valuesContainer: SettingValuesContainer =
|
||||
await this.storage.get<SettingValuesContainer>(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<void> {
|
||||
if (await this.storage.has(STORAGE_KEY_SETTING_VALUES)) {
|
||||
const savedSettingsValues: SettingValuesContainer = await this.storage.get<SettingValuesContainer>(
|
||||
STORAGE_KEY_SETTING_VALUES,
|
||||
);
|
||||
const savedSettingsValues: SettingValuesContainer =
|
||||
await this.storage.get<SettingValuesContainer>(STORAGE_KEY_SETTING_VALUES);
|
||||
const cacheSettingsValues = this.getSettingValuesFromCache();
|
||||
const mergedSettingValues = deepMerge(savedSettingsValues, cacheSettingsValues);
|
||||
await this.storage.put<SettingValuesContainer>(STORAGE_KEY_SETTING_VALUES, mergedSettingValues);
|
||||
|
||||
@@ -101,7 +101,10 @@ export class InternetConnectionService {
|
||||
|
||||
private readonly errors = new Set<unknown>();
|
||||
|
||||
constructor(private readonly logger: NGXLogger, private readonly router: Router) {}
|
||||
constructor(
|
||||
private readonly logger: NGXLogger,
|
||||
private readonly router: Router,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Retry all failed http requests
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -39,8 +39,8 @@ export type RecursivePartial<T> = {
|
||||
[P in keyof T]?: T[P] extends Array<infer U>
|
||||
? Array<RecursivePartial<U>>
|
||||
: T[P] extends object
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
};
|
||||
|
||||
chai.should();
|
||||
|
||||
@@ -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(/\/$/, '');
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ export type RecursivePartial<T> = {
|
||||
[P in keyof T]?: T[P] extends Array<infer U>
|
||||
? Array<RecursivePartial<U>>
|
||||
: T[P] extends object
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
};
|
||||
|
||||
async function invokeIndexRoute(): Promise<RecursivePartial<HttpClientResponse<SCIndexResponse>>> {
|
||||
|
||||
@@ -20,8 +20,11 @@
|
||||
* iteratee is invoked with one argument: (value).
|
||||
*/
|
||||
export function keyBy<T>(collection: T[], key: (item: T) => string | number): Record<string, T> {
|
||||
return collection.reduce((accumulator, item) => {
|
||||
accumulator[key(item)] = item;
|
||||
return accumulator;
|
||||
}, {} as Record<string | number, T>);
|
||||
return collection.reduce(
|
||||
(accumulator, item) => {
|
||||
accumulator[key(item)] = item;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<string | number, T>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,12 +17,15 @@
|
||||
* Pick a set of properties from an object
|
||||
*/
|
||||
export function pick<T extends object, U extends keyof T>(object: T, keys: U[]): Pick<T, U> {
|
||||
return keys.reduce((accumulator, key) => {
|
||||
if (object.hasOwnProperty(key)) {
|
||||
accumulator[key] = object[key];
|
||||
}
|
||||
return accumulator;
|
||||
}, {} as Pick<T, U>);
|
||||
return keys.reduce(
|
||||
(accumulator, key) => {
|
||||
if (object.hasOwnProperty(key)) {
|
||||
accumulator[key] = object[key];
|
||||
}
|
||||
return accumulator;
|
||||
},
|
||||
{} as Pick<T, U>,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,10 +35,13 @@ export function pickBy<T extends object, U extends keyof T>(
|
||||
object: T,
|
||||
predicate: (value: T[U], key: U) => boolean,
|
||||
): Pick<T, U> {
|
||||
return (Object.keys(object) as U[]).reduce((accumulator, key) => {
|
||||
if (predicate(object[key], key)) {
|
||||
accumulator[key] = object[key];
|
||||
}
|
||||
return accumulator;
|
||||
}, {} as Pick<T, U>);
|
||||
return (Object.keys(object) as U[]).reduce(
|
||||
(accumulator, key) => {
|
||||
if (predicate(object[key], key)) {
|
||||
accumulator[key] = object[key];
|
||||
}
|
||||
return accumulator;
|
||||
},
|
||||
{} as Pick<T, U>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,9 +18,12 @@
|
||||
*/
|
||||
export function uniqBy<T>(array: T[], transform: (item: T) => string | number): T[] {
|
||||
return Object.values(
|
||||
array.reduce((accumulator, current) => {
|
||||
accumulator[transform(current)] = current;
|
||||
return accumulator;
|
||||
}, {} as Record<string | number, T>),
|
||||
array.reduce(
|
||||
(accumulator, current) => {
|
||||
accumulator[transform(current)] = current;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<string | number, T>,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>OpenStApps API</title>
|
||||
|
||||
@@ -691,8 +691,8 @@ type RecursivePartial<T> = {
|
||||
[P in keyof T]-?: T[P] extends Array<infer U>
|
||||
? Array<RecursivePartial<U>>
|
||||
: T[P] extends object
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,66 +148,66 @@ export type SCThingsField = keyof SCThings | string;
|
||||
export type SCAssociatedThingWithoutReferences<THING extends SCThings> = 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 extends SCThings> = THING e
|
||||
export type SCAssociatedThing<THING extends SCThings> = 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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -193,24 +193,24 @@ export type SCResponses =
|
||||
export type SCAssociatedResponse<REQUEST> = 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> = REQUEST extends SCBookAvailabilityRe
|
||||
export type SCAssociatedRequest<RESPONSE> = 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> = RESPONSE extends SCBookAvailabilityR
|
||||
export type SCAssignedRequest<ROUTE extends SCAbstractRoute> = 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 SCAbstractRoute> = ROUTE extends SCB
|
||||
export type SCAssignedResponse<ROUTE extends SCAbstractRoute> = 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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -23,8 +23,8 @@ export type RecursivePartial<T> = {
|
||||
[P in keyof T]?: T[P] extends Array<infer U>
|
||||
? Array<RecursivePartial<U>>
|
||||
: T[P] extends object
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
? RecursivePartial<T[P]>
|
||||
: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
122
pnpm-lock.yaml
generated
122
pnpm-lock.yaml
generated
@@ -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==}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
...require('./configuration/prettier-config/index.json'),
|
||||
}
|
||||
1
prettier.config.js
Normal file
1
prettier.config.js
Normal file
@@ -0,0 +1 @@
|
||||
export default from './configuration/prettier-config/index.js';
|
||||
Reference in New Issue
Block a user