update dependencies and prettierrc

This commit is contained in:
Sean Engelhardt 2018-11-14 14:09:43 +01:00
parent 734c7c872b
commit d67e39b994
11 changed files with 36 additions and 31 deletions

View File

@ -1,8 +1,11 @@
{ {
"printWidth": 120, "printWidth": 120,
"tabWidth": 4,
"singleQuote": true, "singleQuote": true,
"useTabs": false, "useTabs": false,
"tabWidth": 4, "bracketSpacing": true,
"htmlWhitespaceSensitivity": "strict",
"semi": true, "semi": true,
"bracketSpacing": true "trailingComma": "es5",
"arrowParens": "avoid"
} }

View File

@ -70,7 +70,7 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json", "tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js", "karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.css"], "styles": ["src/styles.scss"],
"scripts": [], "scripts": [],
"assets": ["src/favicon.ico", "src/assets"] "assets": ["src/favicon.ico", "src/assets"]
} }

View File

@ -3,32 +3,33 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0 --aot", "start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0",
"build": "ng build", "build": "ng build --prod --aot",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"compodoc": "./node_modules/.bin/compodoc --hideGenerator -p src/tsconfig.app.json -n 'OpenSlides Documentation' -d ../Compodoc -s -w -t -o --port", "compodoc": "./node_modules/.bin/compodoc --hideGenerator -p src/tsconfig.app.json -n 'OpenSlides Documentation' -d ../Compodoc -s -w -t -o --port",
"extract": "ngx-translate-extract -i ./src -o ./src/assets/i18n/template-en.pot -clean --sort --format pot -m _", "extract": "ngx-translate-extract -i ./src -o ./src/assets/i18n/template-en.pot -clean --sort --format pot -m _",
"po2json": "./node_modules/.bin/po2json -f mf src/assets/i18n/de.po src/assets/i18n/de.json && ./node_modules/.bin/po2json -f mf src/assets/i18n/cs.po src/assets/i18n/cs.json", "po2json": "./node_modules/.bin/po2json -f mf src/assets/i18n/de.po src/assets/i18n/de.json && ./node_modules/.bin/po2json -f mf src/assets/i18n/cs.po src/assets/i18n/cs.json",
"prettify": "pretty-quick" "prettify-changes": "pretty-quick --staged",
"prettify-all": "pretty-quick"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^7.0.0", "@angular/animations": "^7.0.0",
"@angular/cdk": "^7.0.0", "@angular/cdk": "^7.0.4",
"@angular/common": "^7.0.0", "@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0", "@angular/compiler": "^7.0.0",
"@angular/core": "^7.0.0", "@angular/core": "^7.0.0",
"@angular/forms": "^7.0.0", "@angular/forms": "^7.0.0",
"@angular/http": "^7.0.0", "@angular/http": "^7.0.0",
"@angular/material": "^7.0.0", "@angular/material": "^7.0.4",
"@angular/platform-browser": "^7.0.0", "@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0", "@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0", "@angular/router": "^7.0.0",
"@ngx-pwa/local-storage": "^6.2.0", "@ngx-pwa/local-storage": "^7.0.0",
"@ngx-translate/core": "^10.0.2", "@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^3.0.1", "@ngx-translate/http-loader": "^4.0.0",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"file-saver": "^2.0.0-rc.3", "file-saver": "^2.0.0-rc.3",
"material-design-icons": "^3.0.1", "material-design-icons": "^3.0.1",
@ -40,18 +41,18 @@
"zone.js": "^0.8.26" "zone.js": "^0.8.26"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.7.0", "@angular-devkit/build-angular": "^0.10.5",
"@angular/cli": "^7.0.2", "@angular/cli": "^7.0.5",
"@angular/compiler-cli": "^7.0.0", "@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0", "@angular/language-service": "^7.0.0",
"@biesbjerg/ngx-translate-extract": "^2.3.4", "@biesbjerg/ngx-translate-extract": "^2.3.4",
"@compodoc/compodoc": "^1.1.5", "@compodoc/compodoc": "^1.1.5",
"@types/jasmine": "^2.8.9", "@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5", "@types/jasminewd2": "^2.0.5",
"@types/node": "~8.9.4", "@types/node": "~10.12.7",
"@types/yargs": "^12.0.1", "@types/yargs": "^12.0.1",
"codelyzer": "~4.2.1", "codelyzer": "~4.5.0",
"husky": "^0.14.3", "husky": "^1.1.4",
"jasmine-core": "~2.99.1", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "^3.0.0", "karma": "^3.0.0",
@ -60,12 +61,13 @@
"karma-jasmine": "~1.1.1", "karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.3",
"prettier": "^1.14.3", "prettier": "^1.15.2",
"pretty-quick": "^1.8.0", "pretty-quick": "^1.8.0",
"protractor": "^5.4.1", "protractor": "^5.4.1",
"ts-node": "~5.0.1", "ts-node": "~7.0.1",
"tslint": "~5.9.1", "tslint": "~5.11.0",
"tsutils": "^3.1.0", "tsutils": "^3.5.0",
"typescript": "^3.1.3" "typescript": "^3.1.3",
"webpack-bundle-analyzer": "^3.0.3"
} }
} }

View File

@ -1,7 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { plugins } from '../../../plugins'; import { plugins } from '../../../plugins';
import { CommonAppConfig } from '../../site/common/common.config'; import { CommonAppConfig } from '../../site/common/common.config';
import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model';
import { AppConfig } from '../../site/base/app-config'; import { AppConfig } from '../../site/base/app-config';
import { CollectionStringModelMapperService } from './collectionStringModelMapper.service'; import { CollectionStringModelMapperService } from './collectionStringModelMapper.service';
import { MediafileAppConfig } from '../../site/mediafiles/mediafile.config'; import { MediafileAppConfig } from '../../site/mediafiles/mediafile.config';

View File

@ -32,11 +32,15 @@ export class StorageService {
/** /**
* get a value from the store. You need to subscribe to the request to retrieve the value. * get a value from the store. You need to subscribe to the request to retrieve the value.
*
* TODO: This needs adjustment to ensure safe access.
* Since angular 7 `LocalStorrage.getItem` will return "unknown" instead of any.
* https://github.com/cyrilletuzi/angular-async-local-storage/blob/master/docs/MIGRATION_TO_V7.md
* @param key The key to get the value from * @param key The key to get the value from
* @returns The requested value to the key * @returns The requested value to the key
*/ */
public async get<T>(key: string): Promise<T> { public async get<T>(key: string): Promise<T> {
return await this.localStorage.getItem<T>(key).toPromise(); return await this.localStorage.getUnsafeItem<T>(key).toPromise();
} }
/** /**

View File

@ -178,7 +178,7 @@ export class TopicDetailComponent {
* @param event has the code * @param event has the code
*/ */
public keyDownFunction(event: KeyboardEvent): void { public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) { if (event.key === "Escape") {
this.setEditMode(false); this.setEditMode(false);
} }
} }

View File

@ -8,9 +8,6 @@ import { TranslateService } from '@ngx-translate/core'; // showcase
import { Config } from '../../../../shared/models/core/config'; import { Config } from '../../../../shared/models/core/config';
import { DataStoreService } from '../../../../core/services/data-store.service'; import { DataStoreService } from '../../../../core/services/data-store.service';
// for Drag n Drop Test
import { moveItemInArray, CdkDragDrop } from '@angular/cdk/drag-drop';
@Component({ @Component({
selector: 'os-start', selector: 'os-start',
templateUrl: './start.component.html', templateUrl: './start.component.html',

View File

@ -94,7 +94,7 @@ export class CategoryListComponent extends BaseViewComponent implements OnInit {
* @param viewCategory * @param viewCategory
*/ */
public keyDownFunction(event: KeyboardEvent, viewCategory?: ViewCategory): void { public keyDownFunction(event: KeyboardEvent, viewCategory?: ViewCategory): void {
if (event.keyCode === 13) { if (event.key === "Enter") {
if (viewCategory) { if (viewCategory) {
this.onSaveButton(viewCategory); this.onSaveButton(viewCategory);
} else { } else {

View File

@ -76,7 +76,7 @@ export class MotionCommentSectionListComponent extends BaseViewComponent impleme
* Event on Key Down in update or create form. Do not provide the viewSection for the create form. * Event on Key Down in update or create form. Do not provide the viewSection for the create form.
*/ */
public keyDownFunction(event: KeyboardEvent, viewSection?: ViewMotionCommentSection): void { public keyDownFunction(event: KeyboardEvent, viewSection?: ViewMotionCommentSection): void {
if (event.keyCode === 13) { if (event.key === "Escape") {
if (viewSection) { if (viewSection) {
this.onSaveButton(viewSection); this.onSaveButton(viewSection);
} else { } else {

View File

@ -138,7 +138,7 @@ export class TagListComponent extends ListViewBaseComponent<ViewTag> implements
* @param event * @param event
*/ */
public keyDownFunction(event: KeyboardEvent): void { public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) { if (event.key === "Enter") {
this.cancelEditing(); this.cancelEditing();
} }
} }

View File

@ -198,7 +198,7 @@ export class GroupListComponent extends BaseViewComponent implements OnInit {
* Clicking escape while in #newGroupForm should toggle newGroup. * Clicking escape while in #newGroupForm should toggle newGroup.
*/ */
public keyDownFunction(event: KeyboardEvent): void { public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) { if (event.key === "Escape") {
this.newGroup = false; this.newGroup = false;
} }
} }