Browse Source

Fix eslint

pull/1284/head
Sebastian Stehle 10 hours ago
parent
commit
a50ec4d6fa
  1. 166
      frontend/.eslintrc.js
  2. 159
      frontend/eslint.config.js
  3. 1775
      frontend/package-lock.json
  4. 58
      frontend/package.json
  5. 2
      frontend/src/app/features/content/shared/forms/iframe-editor.component.ts
  6. 2
      frontend/src/app/features/settings/pages/roles/roles-page.component.ts
  7. 4
      frontend/src/app/features/teams/services/team-contributors.service.ts
  8. 4
      frontend/src/app/features/teams/services/team-plans.service.ts
  9. 2
      frontend/src/app/features/teams/state/team-auth.forms.ts
  10. 2
      frontend/src/app/features/teams/state/team-auth.state.spec.ts
  11. 4
      frontend/src/app/features/teams/state/team-auth.state.ts
  12. 1
      frontend/src/app/features/teams/state/team-contributors.forms.ts
  13. 2
      frontend/src/app/features/teams/state/team-contributors.state.spec.ts
  14. 4
      frontend/src/app/features/teams/state/team-contributors.state.ts
  15. 2
      frontend/src/app/features/teams/state/team-plans.state.spec.ts
  16. 4
      frontend/src/app/features/teams/state/team-plans.state.ts
  17. 96
      frontend/src/app/framework/angular/animations.ts
  18. 1
      frontend/src/app/framework/angular/forms/confirm-click.directive.ts
  19. 3
      frontend/src/app/framework/angular/forms/copy-global.directive.ts
  20. 3
      frontend/src/app/framework/angular/forms/copy.directive.ts
  21. 2
      frontend/src/app/framework/angular/forms/editors/code-editor.component.ts
  22. 2
      frontend/src/app/framework/angular/forms/editors/date-time-editor.component.ts
  23. 4
      frontend/src/app/framework/angular/forms/file-drop.directive.ts
  24. 4
      frontend/src/app/framework/angular/forms/focus-on-init.directive.spec.ts
  25. 2
      frontend/src/app/framework/angular/forms/templated-form-array.spec.ts
  26. 2
      frontend/src/app/framework/angular/forms/templated-form-group.spec.ts
  27. 2
      frontend/src/app/framework/angular/forms/validators.ts
  28. 4
      frontend/src/app/framework/angular/http/http-extensions.ts
  29. 2
      frontend/src/app/framework/angular/layout-container.directive.ts
  30. 2
      frontend/src/app/framework/angular/loader.component.ts
  31. 2
      frontend/src/app/framework/angular/modals/modal.directive.ts
  32. 3
      frontend/src/app/framework/angular/modals/tooltip.directive.ts
  33. 1
      frontend/src/app/framework/angular/pipes/numbers.pipes.ts
  34. 2
      frontend/src/app/framework/angular/stateful.component.ts
  35. 2
      frontend/src/app/framework/services/dialog.service.ts
  36. 6
      frontend/src/app/framework/services/loading.service.spec.ts
  37. 6
      frontend/src/app/framework/services/local-store.service.ts
  38. 2
      frontend/src/app/framework/utils/interpolator.spec.ts
  39. 2
      frontend/src/app/framework/utils/keys.ts
  40. 5
      frontend/src/app/framework/utils/math-helper.ts
  41. 10
      frontend/src/app/framework/utils/slug.spec.ts
  42. 1
      frontend/src/app/framework/utils/tag-values.spec.ts
  43. 2
      frontend/src/app/framework/utils/types.ts
  44. 4
      frontend/src/app/shared/components/tour-hint.directive.ts
  45. 2
      frontend/src/app/shared/interceptors/auth.interceptor.spec.ts
  46. 2
      frontend/src/app/shared/model/custom.ts
  47. 4
      frontend/src/app/shared/model/generated.ts
  48. 2
      frontend/src/app/shared/services/help.service.spec.ts
  49. 2
      frontend/src/app/shared/services/query.ts
  50. 2
      frontend/src/app/shared/services/schemas.spec.ts
  51. 2
      frontend/src/app/shared/services/stock-photo.service.spec.ts
  52. 2
      frontend/src/app/shared/services/ui.service.spec.ts
  53. 2
      frontend/src/app/shared/services/workflows.service.spec.ts
  54. 2
      frontend/src/app/shared/state/apps.forms.ts
  55. 4
      frontend/src/app/shared/state/asset-scripts.state.spec.ts
  56. 2
      frontend/src/app/shared/state/asset-uploader.state.spec.ts
  57. 2
      frontend/src/app/shared/state/assets.forms.ts
  58. 2
      frontend/src/app/shared/state/assets.state.spec.ts
  59. 2
      frontend/src/app/shared/state/backups.forms.ts
  60. 2
      frontend/src/app/shared/state/clients.forms.ts
  61. 2
      frontend/src/app/shared/state/clients.state.spec.ts
  62. 2
      frontend/src/app/shared/state/contents.form-rules.ts
  63. 5
      frontend/src/app/shared/state/contents.forms-helpers.ts
  64. 7
      frontend/src/app/shared/state/contents.forms.spec.ts
  65. 2
      frontend/src/app/shared/state/contents.forms.visitors.spec.ts
  66. 2
      frontend/src/app/shared/state/contents.forms.visitors.ts
  67. 2
      frontend/src/app/shared/state/contents.state.ts
  68. 2
      frontend/src/app/shared/state/contributors.forms.ts
  69. 2
      frontend/src/app/shared/state/contributors.state.spec.ts
  70. 2
      frontend/src/app/shared/state/indexes.state.spec.ts
  71. 2
      frontend/src/app/shared/state/jobs.state.spec.ts
  72. 2
      frontend/src/app/shared/state/languages.state.spec.ts
  73. 2
      frontend/src/app/shared/state/plans.state.spec.ts
  74. 4
      frontend/src/app/shared/state/resolvers.spec.ts
  75. 2
      frontend/src/app/shared/state/roles.state.spec.ts
  76. 2
      frontend/src/app/shared/state/rule-events.state.spec.ts
  77. 2
      frontend/src/app/shared/state/rule-simulator.state.spec.ts
  78. 8
      frontend/src/app/shared/state/rules.state.spec.ts
  79. 2
      frontend/src/app/shared/state/schemas.forms.ts
  80. 2
      frontend/src/app/shared/state/schemas.state.spec.ts
  81. 2
      frontend/src/app/shared/state/table-settings.spec.ts
  82. 2
      frontend/src/app/shared/state/teams.forms.ts
  83. 2
      frontend/src/app/shared/state/tour.state.ts
  84. 2
      frontend/src/app/shared/state/ui.state.spec.ts
  85. 2
      frontend/src/app/shared/utils/editor-utils.spec.ts
  86. 4
      frontend/src/main.ts

166
frontend/.eslintrc.js

@ -1,166 +0,0 @@
/* eslint-disable */
module.exports = {
"env": {
"browser": true,
"node": true
},
"extends": [
"airbnb-typescript/base",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": [
"deprecation",
"eslint-plugin-import",
"@typescript-eslint"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "sqx",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "sqx",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/prefer-inject": [
"off"
],
"@angular-eslint/use-lifecycle-interface": [
"off"
],
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
],
"leadingUnderscore": "allow",
"selector": "variable",
"trailingUnderscore": "allow"
},
{
"format": [
"PascalCase"
],
"selector": "typeLike"
}
],
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/quotes": [
"error",
"single"
],
"@typescript-eslint/return-await": "off",
"@typescript-eslint/semi": [
"error",
"always"
],
"arrow-body-style": "off",
"arrow-parens": "off",
"class-methods-use-this": "off",
"default-case": "off",
"deprecation/deprecation": "warn",
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/no-useless-path-segments": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
},
"pathGroups": [
{
"group": "external",
"pattern": "@app/**",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": [
"builtin"
]
}
],
"import/prefer-default-export": "off",
"linebreak-style": "off",
"max-classes-per-file": "off",
"max-len": "off",
"newline-per-chained-call": "off",
"no-else-return": "off",
"no-mixed-operators": "off",
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
"no-restricted-syntax": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"object-curly-newline": [
"error",
{
"ExportDeclaration": "never",
"ImportDeclaration": "never",
"ObjectExpression": {
"consistent": true
},
"ObjectPattern": {
"consistent": true
}
}
],
"operator-linebreak": "off",
"prefer-destructuring": "off",
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true
}
]
}
};

159
frontend/eslint.config.js

@ -0,0 +1,159 @@
const {
defineConfig,
} = require("eslint/config");
const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const deprecation = require("eslint-plugin-deprecation");
const importPlugin = require("eslint-plugin-import");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");
const {
FlatCompat,
} = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parser: tsParser,
parserOptions: {
"project": ["tsconfig.app.json", "tsconfig.spec.json"],
"createDefaultProgram": true,
},
},
extends: compat.extends(
"eslint:recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
),
plugins: {
deprecation,
import: importPlugin,
"@typescript-eslint": typescriptEslint,
},
},
{
files: ['src/**/*.ts', '**/*.ts'],
rules: {
"@angular-eslint/component-selector": ["error", {
"prefix": "sqx",
"style": "kebab-case",
"type": "element",
}],
"@angular-eslint/directive-selector": ["error", {
"prefix": "sqx",
"style": "camelCase",
"type": "attribute",
}],
"@angular-eslint/prefer-inject": ["off"],
"@angular-eslint/use-lifecycle-interface": ["off"],
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/naming-convention": ["error", {
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"selector": "variable",
"trailingUnderscore": "allow",
}, {
"format": ["PascalCase"],
"selector": "typeLike",
}],
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
}],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/return-await": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
"class-methods-use-this": "off",
"default-case": "off",
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/no-useless-path-segments": "off",
"import/order": ["error", {
"alphabetize": {
"order": "asc",
},
"pathGroups": [{
"group": "external",
"pattern": "@app/**",
"position": "after",
}],
"pathGroupsExcludedImportTypes": ["builtin"],
}],
"import/prefer-default-export": "off",
"linebreak-style": "off",
"max-classes-per-file": "off",
"max-len": "off",
"newline-per-chained-call": "off",
"no-else-return": "off",
"no-extra-boolean-cast": "off",
"no-mixed-operators": "off",
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
"no-restricted-syntax": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-useless-escape": "off",
"no-useless-return": "warn",
"object-curly-newline": ["error", {
"ExportDeclaration": "never",
"ImportDeclaration": "never",
"ObjectExpression": {
"consistent": true,
},
"ObjectPattern": {
"consistent": true,
},
}],
"operator-linebreak": "off",
"prefer-destructuring": "off",
"sort-imports": ["error", {
"ignoreCase": true,
"ignoreDeclarationSort": true,
}],
},
}]);

1775
frontend/package-lock.json

File diff suppressed because it is too large

58
frontend/package.json

@ -16,17 +16,16 @@
},
"private": true,
"dependencies": {
"@angular/animations": "21.1.2",
"@angular/cdk": "21.1.2",
"@angular/cdk-experimental": "21.1.2",
"@angular/common": "21.1.2",
"@angular/core": "21.1.2",
"@angular/forms": "21.1.2",
"@angular/localize": "21.1.2",
"@angular/platform-browser": "21.1.2",
"@angular/platform-browser-dynamic": "21.1.2",
"@angular/platform-server": "21.1.2",
"@angular/router": "21.1.2",
"@angular/cdk": "21.1.3",
"@angular/cdk-experimental": "21.1.3",
"@angular/common": "21.1.3",
"@angular/core": "21.1.3",
"@angular/forms": "21.1.3",
"@angular/localize": "21.1.3",
"@angular/platform-browser": "21.1.3",
"@angular/platform-browser-dynamic": "21.1.3",
"@angular/platform-server": "21.1.3",
"@angular/router": "21.1.3",
"@egjs/hammerjs": "2.0.17",
"@floating-ui/dom": "^1.7.5",
"@graphiql/toolkit": "^0.11.3",
@ -40,8 +39,8 @@
"cropperjs": "1.6.2",
"date-fns": "4.1.0",
"graphiql": "4.1.1",
"graphql": "16.11.0",
"graphql-ws": "^6.0.5",
"graphql": "16.12.0",
"graphql-ws": "^6.0.7",
"image-focus": "1.2.1",
"leaflet": "1.9.4",
"leaflet-control-geocoder": "3.3.1",
@ -62,7 +61,7 @@
"tslib": "2.8.1",
"tui-calendar": "^1.15.3",
"typemoq": "^2.1.0",
"video.js": "8.23.4",
"video.js": "8.23.6",
"vis-data": "8.0.3",
"vis-network": "10.0.2",
"vis-util": "6.0.0",
@ -71,44 +70,43 @@
"zone.js": "0.16.0"
},
"devDependencies": {
"@analogjs/storybook-angular": "^2.2.3",
"@angular-devkit/architect": "^0.2101.2",
"@angular-devkit/build-angular": "^21.1.2",
"@angular-devkit/architect": "^0.2101.3",
"@angular-devkit/build-angular": "^21.1.3",
"@angular-eslint/builder": "21.2.0",
"@angular-eslint/eslint-plugin": "21.2.0",
"@angular-eslint/eslint-plugin-template": "21.2.0",
"@angular-eslint/schematics": "21.2.0",
"@angular-eslint/template-parser": "21.2.0",
"@angular/cli": "^21.1.2",
"@angular/compiler": "^21.1.2",
"@angular/compiler-cli": "^21.1.2",
"@angular/elements": "^21.1.2",
"@angular/cli": "^21.1.3",
"@angular/compiler": "^21.1.3",
"@angular/compiler-cli": "^21.1.3",
"@angular/elements": "^21.1.3",
"@compodoc/compodoc": "^1.2.1",
"@storybook/addon-links": "^10.2.5",
"@storybook/angular": "^10.2.5",
"@storybook/addon-links": "^10.2.7",
"@storybook/angular": "^10.2.7",
"@storybook/testing-library": "^0.2.2",
"@types/ace": "^0.0.52",
"@types/codemirror": "5.60.17",
"@types/core-js": "2.5.8",
"@types/mersenne-twister": "1.1.7",
"@types/mousetrap": "1.6.15",
"@types/node": "25.2.0",
"@types/react": "19.2.11",
"@types/node": "25.2.1",
"@types/react": "19.2.13",
"@types/react-dom": "19.2.3",
"@types/ws": "8.18.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"copy-webpack-plugin": "^13.0.1",
"eslint": "^8.57.1",
"eslint": "^9.39.2",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-storybook": "^10.2.5",
"eslint-plugin-storybook": "^10.2.7",
"jsdom": "^28.0.0",
"prettier": "3.8.1",
"squidex-prettier-plugin-organize-attributes": "^1.0.1",
"storybook": "^10.2.5",
"storybook": "^10.2.7",
"stylelint": "17.1.1",
"stylelint-config-standard": "40.0.0",
"stylelint-config-standard-scss": "^17.0.0",

2
frontend/src/app/features/content/shared/forms/iframe-editor.component.ts

@ -232,7 +232,7 @@ export class IFrameEditorComponent extends StatefulComponent<State> implements O
schemaIds = schemas;
} if (this.schemaIds && this.schemaIds.length > 0) {
schemaIds = this.schemaIds;
}
}
this.contentsQuery = query;
this.contentsCorrelationId = correlationId;

2
frontend/src/app/features/settings/pages/roles/roles-page.component.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-return-assign */
import { AsyncPipe } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';

4
frontend/src/app/features/teams/services/team-contributors.service.ts

@ -10,9 +10,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig, AssignContributorDto, ContributorsDto, HTTP, mapVersioned, pretifyError, Resource, Versioned, VersionOrTag } from '@app/shared';
@Injectable({
providedIn: 'any',
})
@Injectable()
export class TeamContributorsService {
constructor(
private readonly http: HttpClient,

4
frontend/src/app/features/teams/services/team-plans.service.ts

@ -10,9 +10,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig, ChangePlanDto, HTTP, mapVersioned, PlanChangedDto, PlansDto, pretifyError, Versioned, VersionOrTag } from '@app/shared';
@Injectable({
providedIn: 'any',
})
@Injectable()
export class TeamPlansService {
constructor(
private readonly http: HttpClient,

2
frontend/src/app/features/teams/state/team-auth.forms.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { UntypedFormControl, Validators } from '@angular/forms';
import { map, shareReplay } from 'rxjs/operators';
import { ExtendedFormGroup, Form, value$ } from '@app/framework';

2
frontend/src/app/features/teams/state/team-auth.state.spec.ts

@ -12,7 +12,7 @@ import { AuthSchemeDto, AuthSchemeResponseDto, DialogService, ResourceLinkDto, T
import { TeamAuthState } from '../internal';
describe('TeamAuthState', () => {
const { newVersion, team, teamsState, version, } = TestValues;
const { newVersion, team, teamsState, version } = TestValues;
const scheme = new AuthSchemeDto({
domain: 'squidex.io',

4
frontend/src/app/features/teams/state/team-auth.state.ts

@ -21,9 +21,7 @@ interface Snapshot extends LoadingState {
version: VersionTag;
}
@Injectable({
providedIn: 'any',
})
@Injectable()
export class TeamAuthState extends State<Snapshot> {
public scheme =
this.project(x => x.scheme);

1
frontend/src/app/features/teams/state/team-contributors.forms.ts

@ -77,5 +77,4 @@ function extractEmails(value: string) {
return result;
}
// eslint-disable-next-line no-useless-escape
const EMAIL_REGEX = /(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*/gim;

2
frontend/src/app/features/teams/state/team-contributors.state.spec.ts

@ -14,7 +14,7 @@ import { AssignContributorDto, ContributorDto, ContributorsDto, DialogService, E
import { TeamContributorsService, TeamContributorsState } from '../internal';
describe('TeamContributorsState', () => {
const { team, teamsState, newVersion, version, } = TestValues;
const { team, teamsState, newVersion, version } = TestValues;
const allIds: number[] = [];

4
frontend/src/app/features/teams/state/team-contributors.state.ts

@ -25,9 +25,7 @@ interface Snapshot extends ListState<string> {
canCreate?: boolean;
}
@Injectable({
providedIn: 'any',
})
@Injectable()
export class TeamContributorsState extends State<Snapshot> {
public contributors =
this.project(x => x.contributors);

2
frontend/src/app/features/teams/state/team-plans.state.spec.ts

@ -12,7 +12,7 @@ import { DialogService, PlanChangedDto, PlanDto, PlansDto, versioned } from '@ap
import { TeamPlansService, TeamPlansState } from '../internal';
describe('TeamPlansState', () => {
const { creator, newVersion, team, teamsState, version, } = TestValues;
const { creator, newVersion, team, teamsState, version } = TestValues;
const oldPlans = new PlansDto({
currentPlanId: 'free',

4
frontend/src/app/features/teams/state/team-plans.state.ts

@ -42,9 +42,7 @@ interface Snapshot extends LoadingState {
version: VersionTag;
}
@Injectable({
providedIn: 'any',
})
@Injectable()
export class TeamPlansState extends State<Snapshot> {
public plans =
this.project(x => x.plans);

96
frontend/src/app/framework/angular/animations.ts

@ -1,96 +0,0 @@
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { animate, AnimationTriggerMetadata, keyframes, state, style, transition, trigger } from '@angular/animations';
export function buildSlideRightAnimation(name = 'slideRight', timing = '150ms'): AnimationTriggerMetadata {
return trigger(
name, [
transition(':enter', [
style({ transform: 'translateX(-100%)' }),
animate(timing, style({ transform: 'translateX(0%)' })),
]),
transition(':leave', [
style({ transform: 'translateX(0%)' }),
animate(timing, style({ transform: 'translateX(-100%)' })),
]),
state('true',
style({ transform: 'translateX(0%)' }),
),
state('false',
style({ transform: 'translateX(-100%)' }),
),
transition('1 => 0', animate(timing)),
transition('0 => 1', animate(timing)),
],
);
}
export function buildSlideAnimation(name = 'slide', timing = '400ms'): AnimationTriggerMetadata {
return trigger(
name, [
transition(':enter', [
style({ transform: 'translateX(100%)' }),
animate(timing, style({ transform: 'translateX(0%)' })),
]),
transition(':leave', [
style({ transform: 'translateX(0%)' }),
animate(timing, style({ transform: 'translateX(-100%)' })),
]),
state('true',
style({ transform: 'translateX(0%)' }),
),
state('false',
style({ transform: 'translateX(-100%)' }),
),
transition('1 => 0', animate(timing)),
transition('0 => 1', animate(timing)),
],
);
}
export function buildFadeAnimation(name = 'fade', timing = '150ms'): AnimationTriggerMetadata {
return trigger(
name, [
transition(':enter', [
style({ opacity: 0 }),
animate(timing, style({ opacity: 1 })),
]),
transition(':leave', [
style({ opacity: 1 }),
animate(timing, style({ opacity: 0 })),
]),
state('true',
style({ opacity: 1 }),
),
state('false',
style({ opacity: 0 }),
),
transition('1 => 0', animate(timing)),
transition('0 => 1', animate(timing)),
],
);
}
export function buildBounceAnimation(name = 'bounce', timing = '150ms'): AnimationTriggerMetadata {
return trigger(
name, [
transition('* => true', [
animate(timing, keyframes([
style({ transform: 'translateX(0)' }),
style({ transform: 'translateX(-10px)' }),
style({ transform: 'translateX(0)' }),
])),
]),
],
);
}
export const bounceAnimation = buildBounceAnimation();
export const fadeAnimation = buildFadeAnimation();
export const slideAnimation = buildSlideAnimation();
export const slideRightAnimation = buildSlideRightAnimation();

1
frontend/src/app/framework/angular/forms/confirm-click.directive.ts

@ -43,7 +43,6 @@ export class ConfirmClickDirective {
this.confirmTitle.length > 0 &&
this.confirmText &&
this.confirmText.length > 0) {
// eslint-disable-next-line deprecation/deprecation
const destinations = this.clickConfirmed.observers?.map(x => (x as Subscriber<any>)['destination']) || [];
this.beforeClick.emit();

3
frontend/src/app/framework/angular/forms/copy-global.directive.ts

@ -78,13 +78,12 @@ export class CopyGlobalDirective {
private copy() {
try {
// eslint-disable-next-line deprecation/deprecation
document.execCommand('copy');
this.dialogs.notifyInfo('i18n:common.clipboardAdded');
return true;
} catch (e) {
} catch {
return false;
}
}

3
frontend/src/app/framework/angular/forms/copy.directive.ts

@ -63,13 +63,12 @@ export class CopyDirective {
private copy() {
try {
// eslint-disable-next-line deprecation/deprecation
document.execCommand('copy');
this.dialogs.notifyInfo('i18n:common.clipboardAdded');
return true;
} catch (e) {
} catch {
return false;
}
}

2
frontend/src/app/framework/angular/forms/editors/code-editor.component.ts

@ -241,7 +241,7 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple
if (isValid) {
try {
newValueOut = JSON.parse(newValueText);
} catch (e) {
} catch {
newValueOut = null;
newValueText = '';
}

2
frontend/src/app/framework/angular/forms/editors/date-time-editor.component.ts

@ -112,7 +112,7 @@ export class DateTimeEditorComponent extends StatefulControlComponent<State, str
let value: DateTime | null;
try {
value = DateTime.parseISO(obj, false);
} catch (ex) {
} catch {
value = null;
}

4
frontend/src/app/framework/angular/forms/file-drop.directive.ts

@ -139,7 +139,7 @@ export class FileDropDirective {
const webkitEntry = item.webkitGetAsEntry();
if (webkitEntry && webkitEntry.isDirectory) {
// eslint-disable-next-line no-await-in-loop
await this.traverseWebkitTree(webkitEntry, files);
}
}
@ -163,7 +163,7 @@ export class FileDropDirective {
const entries = await getFilesPromise(item);
for (const entry of entries) {
// eslint-disable-next-line no-await-in-loop
await this.traverseWebkitTree(entry, files);
}
}

4
frontend/src/app/framework/angular/forms/focus-on-init.directive.spec.ts

@ -37,7 +37,7 @@ describe('FocusOnInitDirective', () => {
expect(isFocusCalled).toBeTruthy();
expect(isSelectCalled).toBeFalsy();
;
}, 200);
});
@ -50,7 +50,7 @@ describe('FocusOnInitDirective', () => {
expect(isFocusCalled).toBeTruthy();
expect(isSelectCalled).toBeTruthy();
;
}, 200);
});
});

2
frontend/src/app/framework/angular/forms/templated-form-array.spec.ts

@ -38,7 +38,7 @@ describe('TemplatedFormArray', () => {
type Test = [
(value: any) => void,
string
string,
];
const methods: Test[] = [

2
frontend/src/app/framework/angular/forms/templated-form-group.spec.ts

@ -32,7 +32,7 @@ describe('TemplatedFormGroup', () => {
type Test = [
(value: any) => void,
string
string,
];
const methods: Test[] = [

2
frontend/src/app/framework/angular/forms/validators.ts

@ -66,7 +66,7 @@ export module ValidatorsEx {
if (v) {
try {
DateTime.parseISO(v);
} catch (e) {
} catch {
return { validdatetime: false };
}
}

4
frontend/src/app/framework/angular/http/http-extensions.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-inner-declarations */
import { HttpClient, HttpErrorResponse, HttpEvent, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';
import { catchError, map, Observable, throwError } from 'rxjs';
import { ErrorDto, getActualVersion, Types, Versioned, VersionOrTag, VersionTag } from '@app/framework/internal';
@ -130,7 +128,7 @@ export function parseError(response: HttpErrorResponse, fallback: string) {
} else if (Types.isString(error)) {
try {
parsed = JSON.parse(error);
} catch (e) {
} catch {
parsed = undefined;
}
}

2
frontend/src/app/framework/angular/layout-container.directive.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable import/no-cycle */
import { AfterViewInit, Directive, ElementRef, HostListener, Renderer2 } from '@angular/core';
import { LayoutComponent } from './layout.component';

2
frontend/src/app/framework/angular/loader.component.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable import/no-cycle */
import { ChangeDetectionStrategy, Component, Input, numberAttribute } from '@angular/core';
@Component({

2
frontend/src/app/framework/angular/modals/modal.directive.ts

@ -183,7 +183,7 @@ export class ModalDirective<T = unknown> implements OnDestroy {
}
return false;
} catch (ex) {
} catch {
return false;
}
}

3
frontend/src/app/framework/angular/modals/tooltip.directive.ts

@ -112,9 +112,8 @@ export class TooltipDirective implements OnDestroy {
private unsetAttribute() {
try {
this.renderer.setProperty(this.target, 'title', '');
return true;
} catch (ex) {
} catch {
return false;
}
}

1
frontend/src/app/framework/angular/pipes/numbers.pipes.ts

@ -49,6 +49,5 @@ export function calculateFileSize(value: number, factor = 1024) {
u++;
}
// eslint-disable-next-line prefer-template
return (u ? `${value.toFixed(1)} ` : value) + ' kMGTPEZY'[u] + 'B';
}

2
frontend/src/app/framework/angular/stateful.component.ts

@ -23,7 +23,7 @@ export abstract class StatefulComponent<T extends {} = object> extends State<T>
try {
this.changeDetector.detectChanges();
} catch {
return;
/* NOOP */
}
});
}

2
frontend/src/app/framework/services/dialog.service.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
import { Injectable } from '@angular/core';
import { Observable, ReplaySubject, Subject, throwError } from 'rxjs';
import { ErrorDto } from '../utils/error';

6
frontend/src/app/framework/services/loading.service.spec.ts

@ -75,7 +75,7 @@ describe('LoadingService', () => {
setTimeout(() => {
expect(state).toBeFalsy();
;
}, 400);
});
@ -93,7 +93,7 @@ describe('LoadingService', () => {
setTimeout(() => {
expect(state).toBeFalsy();
;
}, 400);
});
@ -113,7 +113,7 @@ describe('LoadingService', () => {
setTimeout(() => {
expect(state).toBeTruthy();
;
}, 400);
});
});

6
frontend/src/app/framework/services/local-store.service.ts

@ -22,7 +22,7 @@ export class LocalStoreService {
public get(key: string): string | null {
try {
return this.store.getItem(key);
} catch (e) {
} catch {
return this.fallback[key];
}
}
@ -52,7 +52,7 @@ export class LocalStoreService {
public set(key: string, value: string) {
try {
this.store.setItem(key, value);
} catch (e) {
} catch {
this.fallback[key] = value;
}
}
@ -72,7 +72,7 @@ export class LocalStoreService {
public remove(key: string) {
try {
this.store.removeItem(key);
} catch (e) {
} catch {
delete this.fallback[key];
}
}

2
frontend/src/app/framework/utils/interpolator.spec.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-template-curly-in-string */
import { DateTime } from './date-time';
import { interpolate } from './interpolator';

2
frontend/src/app/framework/utils/keys.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
export module Keys {
const ALT = 18;
const CONTROL = 17;

5
frontend/src/app/framework/utils/math-helper.ts

@ -5,9 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
/* eslint-disable no-bitwise */
import { Types } from './types';
interface ColorDefinition {
@ -65,7 +62,7 @@ export module MathHelper {
const CRC32_TABLE: ReadonlyArray<number> = createCrc32Table();
// eslint-disable-next-line no-inner-declarations
function createCrc32Table() {
const crc: number[] = [];

10
frontend/src/app/framework/utils/slug.spec.ts

@ -12,7 +12,7 @@ describe('generateSlug', () => {
const cases: Array<[
string,
string,
string
string,
]> = [
['Hello World', '-', 'hello-world'],
['Hello/World', '-', 'hello-world'],
@ -33,7 +33,7 @@ describe('generateSlug', () => {
describe('Should replace multi-char diacritics', () => {
const cases: Array<[
string,
string
string,
]> = [
['ö', 'oe'],
['ü', 'ue'],
@ -50,7 +50,7 @@ describe('generateSlug', () => {
describe('Should not replace multi-char diacritics', () => {
const cases: Array<[
string,
string
string,
]> = [
['ö', 'o'],
['ü', 'u'],
@ -67,7 +67,7 @@ describe('generateSlug', () => {
describe('Should replace single-char diacritics', () => {
const cases: Array<[
string,
string
string,
]> = [
['Físh', 'fish'],
['źish', 'zish'],
@ -88,7 +88,7 @@ describe('generateSlug', () => {
const cases: Array<[
string,
string,
string
string,
]> = [
['Hello my&World ', '_', 'hello_my&world'],
['Hello my&World-', '_', 'hello_my&world'],

1
frontend/src/app/framework/utils/tag-values.spec.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/object-curly-spacing */
/*
* Squidex Headless CMS
*

2
frontend/src/app/framework/utils/types.ts

@ -124,7 +124,7 @@ export module Types {
}
export function equals(lhs: any, rhs: any, lazyString = false) {
// eslint-disable-next-line no-self-compare
if (lhs === rhs || (lhs !== lhs && rhs !== rhs)) {
return true;
}

4
frontend/src/app/shared/components/tour-hint.directive.ts

@ -39,10 +39,6 @@ export class TourHintDirective implements OnInit {
) {
}
public ngOnDestroy() {
return;
}
public ngOnInit() {
if (!this.anchorId) {
return;

2
frontend/src/app/shared/interceptors/auth.interceptor.spec.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
import { Location } from '@angular/common';
import { HttpErrorResponse, HttpEventType, HttpHeaders, HttpRequest } from '@angular/common/http';

2
frontend/src/app/shared/model/custom.ts

@ -1,5 +1,5 @@
/* eslint-disable sort-imports */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { hasAnyLink, StringHelper, Types, ApiUrlConfig, ErrorDto } from '@app/framework';
import * as generated from './generated';
import { FieldPropertiesVisitor, META_FIELDS, tableField, tableFields } from './schemas';

4
frontend/src/app/shared/model/generated.ts

@ -17702,8 +17702,8 @@ export interface FileResponse {
headers?: { [name: string]: any };
}
/* eslint-disable sort-imports */
// eslint-disable-next-line @typescript-eslint/no-unused-vars

2
frontend/src/app/shared/services/help.service.spec.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';

2
frontend/src/app/shared/services/query.ts

@ -149,7 +149,7 @@ export function deserializeQuery(raw?: string): Query | undefined {
query = { fullText: raw };
}
}
} catch (ex) {
} catch {
query = undefined;
}

2
frontend/src/app/shared/services/schemas.spec.ts

@ -8,7 +8,7 @@
import { createProperties, META_FIELDS, SchemaPropertiesDto } from '@app/shared/internal';
import { TestValues } from '../state/_test-helpers';
const { createField, createSchema, } = TestValues;
const { createField, createSchema } = TestValues;
describe('SchemaDto', () => {
const field1 = createField({ properties: createProperties('Array'), id: 1 });

2
frontend/src/app/shared/services/stock-photo.service.spec.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
import { inject, TestBed } from '@angular/core/testing';

2
frontend/src/app/shared/services/ui.service.spec.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable deprecation/deprecation */
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';

2
frontend/src/app/shared/services/workflows.service.spec.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable object-property-newline */
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
import { inject, TestBed } from '@angular/core/testing';

2
frontend/src/app/shared/state/apps.forms.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { UntypedFormControl, Validators } from '@angular/forms';
import { ExtendedFormGroup, Form, TemplatedFormArray, ValidatorsEx } from '@app/framework';

4
frontend/src/app/shared/state/asset-scripts.state.spec.ts

@ -15,14 +15,14 @@ import { AssetScriptsState } from './asset-scripts.state';
import 'src/spec/matchers';
describe('AssetScriptsState', () => {
const { app, appsState, newVersion, version, } = TestValues;
const { app, appsState, newVersion, version } = TestValues;
const oldScripts = createAssetScripts(1);
let dialogs: IMock<DialogService>;
let appsService: IMock<AppsService>;
let assetScriptsState: AssetScriptsState;
beforeEach(() => {
dialogs = Mock.ofType<DialogService>();

2
frontend/src/app/shared/state/asset-uploader.state.spec.ts

@ -12,7 +12,7 @@ import { createAsset } from '../services/assets.service.spec';
import { TestValues } from './_test-helpers';
describe('AssetUploaderState', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
let assetsService: IMock<AssetsService>;
let dialogs: IMock<DialogService>;

2
frontend/src/app/shared/state/assets.forms.ts

@ -49,7 +49,7 @@ export class AnnotateAssetForm extends Form<ExtendedFormGroup, AnnotateAssetDto,
if (raw) {
try {
parsed = JSON.parse(raw);
} catch (ex) {
} catch {
parsed = raw;
}
}

2
frontend/src/app/shared/state/assets.state.spec.ts

@ -13,7 +13,7 @@ import { createAsset, createAssetFolder } from '../services/assets.service.spec'
import { TestValues } from './_test-helpers';
describe('AssetsState', () => {
const { app, appsState, newVersion, } = TestValues;
const { app, appsState, newVersion } = TestValues;
const asset1 = createAsset(1, ['tag1', 'shared']);
const asset2 = createAsset(2, ['tag2', 'shared']);

2
frontend/src/app/shared/state/backups.forms.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { UntypedFormControl, Validators } from '@angular/forms';
import { ExtendedFormGroup, Form, hasNoValue$, ValidatorsEx } from '@app/framework';
import { RestoreRequestDto } from '../model';

2
frontend/src/app/shared/state/clients.forms.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { UntypedFormControl, Validators } from '@angular/forms';
import { ExtendedFormGroup, Form, hasNoValue$, ValidatorsEx } from '@app/framework';
import { ClientDto, CreateClientDto, UpdateClientDto } from '../model';

2
frontend/src/app/shared/state/clients.state.spec.ts

@ -12,7 +12,7 @@ import { createClients } from '../services/clients.service.spec';
import { TestValues } from './_test-helpers';
describe('ClientsState', () => {
const { app, appsState, newVersion, version, } = TestValues;
const { app, appsState, newVersion, version } = TestValues;
const oldClients = createClients(1, 2);

2
frontend/src/app/shared/state/contents.form-rules.ts

@ -6,7 +6,7 @@
*/
/* eslint-disable @typescript-eslint/no-implied-eval */
/* eslint-disable no-useless-return */
import { Types } from '@app/framework';
import { FieldDto, FieldRuleDto, NestedFieldDto, SchemaDto } from './../model';

5
frontend/src/app/shared/state/contents.forms-helpers.ts

@ -5,9 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable @typescript-eslint/no-implied-eval */
/* eslint-disable no-useless-return */
import { AbstractControl, ValidatorFn } from '@angular/forms';
import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@ -276,7 +273,7 @@ export abstract class AbstractContentForm<T extends AnyFieldDto, TForm extends A
}
protected updateCustomState(_context: RuleContext, _itemData: any, _state: AbstractContentFormState): void {
return;
}
}

7
frontend/src/app/shared/state/contents.forms.spec.ts

@ -14,7 +14,7 @@ import { TestValues } from './_test-helpers';
import { ComponentForm, FieldArrayForm } from './contents.forms';
import { contentsTranslationStatus, contentTranslationStatus, fieldTranslationStatus, PartitionConfig } from './contents.forms-helpers';
const { createField, createNestedField, createSchema, } = TestValues;
const { createField, createNestedField, createSchema } = TestValues;
describe('TranslationStatus', () => {
const languages = [
@ -1026,7 +1026,7 @@ describe('ContentForm', () => {
const component = createSchema({
id: 1,
fields: [
createField({ id: 11, properties: createProperties('String'), partitioning: 'invariant' })
createField({ id: 11, properties: createProperties('String'), partitioning: 'invariant' }),
],
});
@ -1177,8 +1177,7 @@ describe('ContentForm', () => {
expect(valueActual, `Expected ${key} of ${path} to be <${valueExpected}>, but found <${valueActual}>.`).toEqual(valueExpected);
}
}
}
else {
} else {
expect(form, `Expected to find form ${path}, but form not found.`).not.toBeNull();
}
}

2
frontend/src/app/shared/state/contents.forms.visitors.spec.ts

@ -9,7 +9,7 @@ import { DateHelper } from '@app/framework';
import { createProperties, DateTime, FieldDefaultValue, FieldFormatter, FieldsValidators, HtmlValue } from '@app/shared/internal';
import { TestValues } from './_test-helpers';
const { createField, } = TestValues;
const { createField } = TestValues;
const now = DateTime.parseISO('2017-10-12T16:30:10Z');

2
frontend/src/app/shared/state/contents.forms.visitors.ts

@ -177,7 +177,7 @@ export class FieldFormatter implements FieldPropertiesVisitor<FieldValue> {
} else {
return parsed.toStringFormat(properties.format ?? 'Ppp');
}
} catch (ex) {
} catch {
return this.value;
}
}

2
frontend/src/app/shared/state/contents.state.ts

@ -16,8 +16,6 @@ import { AppsState } from './apps.state';
import { SavedQuery } from './queries';
import { SchemasState } from './schemas.state';
/* eslint-disable @typescript-eslint/no-throw-literal */
interface Snapshot extends ListState<Query> {
// The current contents.
contents: ReadonlyArray<ContentDto>;

2
frontend/src/app/shared/state/contributors.forms.ts

@ -82,5 +82,5 @@ function extractEmails(value: string) {
return result;
}
// eslint-disable-next-line no-useless-escape
const EMAIL_REGEX = /(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*/gim;

2
frontend/src/app/shared/state/contributors.state.spec.ts

@ -13,7 +13,7 @@ import { createContributors } from '../services/contributors.service.spec';
import { TestValues } from './_test-helpers';
describe('ContributorsState', () => {
const { app, appsState, newVersion, version, } = TestValues;
const { app, appsState, newVersion, version } = TestValues;
const allIds: number[] = [];

2
frontend/src/app/shared/state/indexes.state.spec.ts

@ -12,7 +12,7 @@ import { createIndex } from '../services/indexes.service.spec';
import { TestValues } from './_test-helpers';
describe('IndexesState', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
const index1 = createIndex(12);
const index2 = createIndex(13);

2
frontend/src/app/shared/state/jobs.state.spec.ts

@ -12,7 +12,7 @@ import { createJob } from '../services/jobs.service.spec';
import { TestValues } from './_test-helpers';
describe('JobsState', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
const job1 = createJob(12);
const job2 = createJob(13);

2
frontend/src/app/shared/state/languages.state.spec.ts

@ -12,7 +12,7 @@ import { createLanguages } from '../services/app-languages.service.spec';
import { TestValues } from './_test-helpers';
describe('LanguagesState', () => {
const { app, appsState, newVersion, version, } = TestValues;
const { app, appsState, newVersion, version } = TestValues;
const languageDE = new LanguageDto({ iso2Code: 'de', englishName: 'German' });
const languageEN = new LanguageDto({ iso2Code: 'en', englishName: 'English' });

2
frontend/src/app/shared/state/plans.state.spec.ts

@ -11,7 +11,7 @@ import { DialogService, PlanChangedDto, PlanDto, PlansDto, PlansService, PlansSt
import { TestValues } from './_test-helpers';
describe('PlansState', () => {
const { app, appsState, creator, newVersion, version, } = TestValues;
const { app, appsState, creator, newVersion, version } = TestValues;
const oldPlans = new PlansDto({
currentPlanId: 'free',

4
frontend/src/app/shared/state/resolvers.spec.ts

@ -15,7 +15,7 @@ import { TestValues } from './_test-helpers';
import { ResolveContents } from './resolvers';
describe('ResolveContents', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
const uiOptions = new UIOptions({
referencesDropdownItemCount: 100,
@ -48,7 +48,7 @@ describe('ResolveContents', () => {
const promise = firstValueFrom(contentsResolver.resolveMany(ids));
const result = await Promise.race([
promise.then(() => 'resolved'),
new Promise(resolve => setTimeout(() => resolve('pending'), 1))
new Promise(resolve => setTimeout(() => resolve('pending'), 1)),
]);
expect(result).toBe('pending');

2
frontend/src/app/shared/state/roles.state.spec.ts

@ -12,7 +12,7 @@ import { createRoles } from '../services/roles.service.spec';
import { TestValues } from './_test-helpers';
describe('RolesState', () => {
const { app, appsState, newVersion, version, } = TestValues;
const { app, appsState, newVersion, version } = TestValues;
const oldRoles = createRoles(1, 2);

2
frontend/src/app/shared/state/rule-events.state.spec.ts

@ -12,7 +12,7 @@ import { createRuleEvent } from '../services/rules.service.spec';
import { TestValues } from './_test-helpers';
describe('RuleEventsState', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
const oldRuleEvents = new RuleEventsDto({
total: 200,

2
frontend/src/app/shared/state/rule-simulator.state.spec.ts

@ -13,7 +13,7 @@ import { TestValues } from './_test-helpers';
import { RuleSimulatorState } from './rule-simulator.state';
describe('RuleSimulatorState', () => {
const { app, appsState, } = TestValues;
const { app, appsState } = TestValues;
const oldSimulatedRuleEvents = new SimulatedRuleEventsDto({
total: 200,

8
frontend/src/app/shared/state/rules.state.spec.ts

@ -13,7 +13,7 @@ import { TestValues } from './_test-helpers';
import { FlowView, RulesState } from './rules.state';
describe('RulesState', () => {
const { app, appsState, newVersion, } = TestValues;
const { app, appsState, newVersion } = TestValues;
const rule1 = createRule(1);
const rule2 = createRule(2);
@ -737,8 +737,7 @@ function cleanup<T>(value: T) {
for (const item of value) {
cleanup(item);
}
}
else {
} else {
for (const [key, nested] of Object.entries(value as any)) {
if (nested === value) {
continue;
@ -754,8 +753,7 @@ function cleanup<T>(value: T) {
if (Types.isNull(nested) || Types.isUndefined(nested)) {
delete (value as any)[key];
}
else {
} else {
cleanup(nested);
}
}

2
frontend/src/app/shared/state/schemas.forms.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { AbstractControl, UntypedFormControl, Validators } from '@angular/forms';
import { map } from 'rxjs/operators';
import { ExtendedFormGroup, Form, TemplatedFormArray, ValidatorsEx, value$ } from '@app/framework';

2
frontend/src/app/shared/state/schemas.state.spec.ts

@ -14,7 +14,7 @@ import { getCategoryTree, SchemasState } from './schemas.state';
import 'src/spec/matchers';
describe('SchemasState', () => {
const { app, appsState, newVersion, } = TestValues;
const { app, appsState, newVersion } = TestValues;
const schema1 = createSchema(1);
const schema2 = createSchema(2);

2
frontend/src/app/shared/state/table-settings.spec.ts

@ -14,7 +14,7 @@ import { TestValues } from './_test-helpers';
describe('TableSettings', () => {
let uiState: IMock<UIState>;
const { createSchema, createField, } = TestValues;
const { createSchema, createField } = TestValues;
const schema = createSchema({
name: 'my-schema',

2
frontend/src/app/shared/state/teams.forms.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-useless-escape */
import { UntypedFormControl, Validators } from '@angular/forms';
import { ExtendedFormGroup, Form } from '@app/framework';
import { CreateTeamDto, TeamDto, UpdateTeamDto } from '../model';

2
frontend/src/app/shared/state/tour.state.ts

@ -75,8 +75,6 @@ export class TourState extends State<Snapshot> {
});
}
});
this.tourService.setDefaults(this.definition.defaults);
}
public complete() {

2
frontend/src/app/shared/state/ui.state.spec.ts

@ -11,7 +11,7 @@ import { IResourceDto, ResourceLinkDto, UIService, UIState, UsersService } from
import { TestValues } from './_test-helpers';
describe('UIState', () => {
const { app, } = TestValues;
const { app } = TestValues;
const common = {
key: 'xx',

2
frontend/src/app/shared/utils/editor-utils.spec.ts

@ -5,8 +5,6 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
/* eslint-disable no-template-curly-in-string */
import { AppSettingsDto, EditorDto } from '../model';
import { computeEditorUrl } from './editor-utils';

4
frontend/src/main.ts

@ -89,6 +89,8 @@ if (environment.production) {
enableProdMode();
}
const TASKS = buildTasks();
bootstrapApplication(AppComponent, {
providers: [
provideCharts(withDefaultRegisterables()),
@ -126,7 +128,7 @@ bootstrapApplication(AppComponent, {
},
{
provide: UI_TOUR_OPTIONS,
useValue: {},
useValue: TASKS.defaults,
},
{
provide: BaseTourService,

Loading…
Cancel
Save