AAE-48934 Eslint v9 migration (#12110)

* update

* update

* update

* working

* cr

* cr

* update

* use nx boundaries

* fixes

* fixes

* fixes

* cr

* cr

* update

* update

* update

* cr

* fix null

* cr

* cr

* cr

* cr

* cr

* update

* update

* update

* update

* update

* remove some duplications

* fix units
This commit is contained in:
Bartosz Sekula
2026-08-03 12:12:48 +02:00
committed by GitHub
parent 4123a89814
commit 3f232e75bc
325 changed files with 2327 additions and 1767 deletions
-2
View File
@@ -1,2 +0,0 @@
.storybook
coverage
-77
View File
@@ -1,77 +0,0 @@
{
"extends": ["../../.eslintrc.js"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nx/angular"],
"parserOptions": {
"project": ["lib/extensions/tsconfig.lib.json", "lib/extensions/tsconfig.spec.json"],
"createDefaultProgram": true
},
"rules": {
"no-underscore-dangle": [
"error",
{
"allowAfterThis": true
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": ["adf", "app"],
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": ["element", "attribute"],
"prefix": ["adf", "app"],
"style": "kebab-case"
}
],
"@angular-eslint/no-input-prefix": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "error",
"comma-dangle": "error",
"default-case": "error",
"import/order": "off",
"max-len": [
"error",
{
"code": 240
}
],
"no-bitwise": "off",
"no-duplicate-imports": "error",
"no-multiple-empty-lines": "error",
"no-return-await": "error",
"rxjs/no-create": "error",
"rxjs/no-subject-unsubscribe": "error",
"rxjs/no-subject-value": "error",
"rxjs/no-unsafe-takeuntil": "error",
"unicorn/filename-case": "error",
"@angular-eslint/prefer-standalone": "off"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-positive-tabindex": "error"
}
}
]
}
+53
View File
@@ -0,0 +1,53 @@
/*!
* @license
* Copyright © 2005-2026 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import rootConfig from '../../eslint.config.mjs';
export default [
...rootConfig,
{
files: ['**/*.ts'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [],
depConstraints: [
{
sourceTag: 'scope:extensions',
onlyDependOnLibsWithTags: ['scope:js-api']
}
]
}
],
'no-underscore-dangle': [
'error',
{
allowAfterThis: true
}
],
}
},
{
files: ['**/*.html'],
rules: {
'@angular-eslint/template/no-autofocus': 'error',
'@angular-eslint/template/no-positive-tabindex': 'error'
}
}
];
+1
View File
@@ -4,6 +4,7 @@
"sourceRoot": "lib/extensions/src",
"projectType": "library",
"prefix": "adf",
"tags": ["scope:extensions", "type:library"],
"targets": {
"build": {
"executor": "@angular/build:ng-packagr",
@@ -95,7 +95,6 @@ export class DynamicExtensionComponent implements OnChanges, OnDestroy, AfterVie
private proxy(lifecycleMethod: string, ...args: any[]) {
if (this.componentCreated() && this.lifecycleHookIsImplemented(lifecycleMethod)) {
// eslint-disable-next-line prefer-spread
this.componentRef.instance[lifecycleMethod].apply(this.componentRef.instance, args);
}
}
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable id-blacklist */
import { ExtensionElement } from './extension-element';
export interface DataColumnTypes {
+2
View File
@@ -23,6 +23,7 @@ import { CanActivateFn } from '@angular/router';
/**
* Provides all necessary entries for the app extensibility
*
* @returns list of providers
*/
export function provideAppExtensions(): (Provider | EnvironmentProviders)[] {
@@ -55,6 +56,7 @@ export function provideAppExtensions(): (Provider | EnvironmentProviders)[] {
* });
* ]
* ```
*
* @param params Parameters for the api
* @param params.authGuards Auth guards to register
* @param params.evaluators Rule evaluators to register
@@ -52,6 +52,7 @@ export class AppExtensionService {
/**
* Provides a collection of document list columns for the particular preset.
* The result is filtered by the **disabled** state.
*
* @param key Preset key.
* @returns list of document list presets
*/
@@ -62,6 +63,7 @@ export class AppExtensionService {
/**
* Provides a list of the Viewer content extensions,
* filtered by **disabled** state and **rules**.
*
* @returns list of viewer extension references
*/
getViewerExtensions(): ViewerExtensionRef[] {
@@ -85,6 +85,7 @@ export class ExtensionLoaderService {
* Filters element by **enabled** and **order** attributes.
* Example:
* `getElements<ViewerExtensionRef>(config, 'features.viewer.extensions')`
*
* @param config configuration settings
* @param key element key
* @param fallback fallback array of values
@@ -30,6 +30,7 @@ import { CanActivateFn } from '@angular/router';
/**
* The default extensions factory
*
* @returns the list of extension json files
*/
export function extensionJsonsFactory() {
@@ -48,6 +49,7 @@ export const EXTENSION_JSON_VALUES = new InjectionToken<string[][]>('extension-j
/**
* Provides the extension json values for the angular modules
*
* @param jsons files to provide
* @returns a provider section
*/
@@ -61,6 +63,7 @@ export function provideExtensionConfig(jsons: string[]) {
/**
* Provides the extension json raw values for the angular modules
*
* @param extensionConfigValue config value
* @returns a provider section
*/
@@ -101,6 +104,7 @@ export class ExtensionService {
/**
* Loads and registers an extension config file and plugins (specified by path properties).
*
* @returns The loaded config data
*/
async load(): Promise<ExtensionConfig> {
@@ -112,6 +116,7 @@ export class ExtensionService {
/**
* Registers extensions from a config object.
*
* @param config Object with config data
*/
setup(config: ExtensionConfig) {
@@ -138,6 +143,7 @@ export class ExtensionService {
/**
* Gets features by key.
*
* @param key Key string using dot notation or array of strings
* @param defaultValue Default value returned if feature is not found, default is empty array
* @returns Feature found by key
@@ -153,6 +159,7 @@ export class ExtensionService {
/**
* Adds one or more new rule evaluators to the existing set.
*
* @param values The new evaluators to add
*/
setEvaluators(values: Record<string, RuleEvaluator>) {
@@ -161,6 +168,7 @@ export class ExtensionService {
/**
* Adds one or more new auth guards to the existing set.
*
* @param values The new auth guards to add
*/
setAuthGuards(values: Record<string, CanActivateFn>) {
@@ -171,6 +179,7 @@ export class ExtensionService {
/**
* Adds one or more new components to the existing set.
*
* @param values The new components to add
*/
setComponents(values: Record<string, Type<any>>) {
@@ -179,6 +188,7 @@ export class ExtensionService {
/**
* Retrieves a route using its ID value.
*
* @param id The ID value to look for
* @returns The route or null if not found
*/
@@ -188,6 +198,7 @@ export class ExtensionService {
/**
* Retrieves one or more auth guards using an array of ID values.
*
* @param ids Array of ID value to look for
* @returns Array of auth guards or empty array if none were found
*/
@@ -197,6 +208,7 @@ export class ExtensionService {
/**
* Retrieves an action using its ID value.
*
* @param id The ID value to look for
* @returns Action or null if not found
*/
@@ -206,6 +218,7 @@ export class ExtensionService {
/**
* Retrieves a RuleEvaluator function using its key name.
*
* @param key Key name to look for
* @returns RuleEvaluator or null if not found
*/
@@ -215,6 +228,7 @@ export class ExtensionService {
/**
* Evaluates a rule.
*
* @param ruleId ID of the rule to evaluate
* @param context Custom rule execution context.
* @returns True if the rule passed, false otherwise
@@ -225,6 +239,7 @@ export class ExtensionService {
/**
* Retrieves a registered extension component using its ID value.
*
* @param id The ID value to look for
* @returns The component or null if not found
*/
@@ -234,6 +249,7 @@ export class ExtensionService {
/**
* Retrieves a rule using its ID value.
*
* @param id The ID value to look for
* @returns The rule or null if not found
*/
@@ -243,6 +259,7 @@ export class ExtensionService {
/**
* Runs a lightweight expression stored in a string.
*
* @param value String containing the expression or literal value
* @param context Parameter object for the expression with details of app state
* @returns Result of evaluated expression, if found, or the literal value otherwise
@@ -36,6 +36,7 @@ export class RuleService {
/**
* Adds one or more new rule evaluators to the existing set.
*
* @param values The new evaluators to add
*/
setEvaluators(values: Record<string, RuleEvaluator>) {
@@ -46,6 +47,7 @@ export class RuleService {
/**
* Retrieves a rule using its ID value.
*
* @param id The ID value to look for
* @returns The rule or null if not found
*/
@@ -55,6 +57,7 @@ export class RuleService {
/**
* Retrieves a RuleEvaluator function using its key name.
*
* @param key Key name to look for
* @returns RuleEvaluator or null if not found
*/
@@ -68,6 +71,7 @@ export class RuleService {
/**
* Evaluates a rule.
*
* @param ruleId ID of the rule to evaluate
* @param context Custom rule execution context.
* @returns True if the rule passed, false otherwise