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
-1
View File
@@ -1 +0,0 @@
coverage
-99
View File
@@ -1,99 +0,0 @@
{
"extends": ["../../.eslintrc.js"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nx/angular"],
"parserOptions": {
"project": ["lib/process-services/tsconfig.lib.json", "lib/process-services/tsconfig.spec.json"],
"createDefaultProgram": true
},
"rules": {
"jsdoc/tag-lines": [
"error",
"any",
{
"startLines": 1
}
],
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"no-underscore-dangle": [
"error",
{
"allowAfterThis": true
}
],
"no-shadow": "warn",
"quote-props": "off",
"object-shorthand": "warn",
"prefer-const": "warn",
"arrow-body-style": "warn",
"@angular-eslint/no-output-native": "off",
"space-before-function-paren": "off",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "adf",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "adf",
"style": "camelCase"
}
],
"@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-redeclare": "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"],
"parserOptions": {
"project": ["lib/process-services/tsconfig.lib.json", "lib/process-services/tsconfig.spec.json"],
"createDefaultProgram": true
},
"rules": {
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-positive-tabindex": "error"
}
}
]
}
+79
View File
@@ -0,0 +1,79 @@
/*!
* @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:process-services',
onlyDependOnLibsWithTags: ['scope:js-api', 'scope:core', 'scope:content-services']
}
]
}
],
'@typescript-eslint/consistent-type-assertions': 'warn',
'@typescript-eslint/prefer-for-of': 'warn',
'no-underscore-dangle': [
'error',
{
allowAfterThis: true
}
],
'no-shadow': 'warn',
'quote-props': 'off',
'object-shorthand': 'warn',
'prefer-const': 'warn',
'arrow-body-style': 'warn',
'space-before-function-paren': 'off',
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'adf',
style: 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'adf',
style: 'camelCase'
}
],
'no-redeclare': 'error',
'@angular-eslint/prefer-standalone': 'off'
}
},
{
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/process-services",
"projectType": "library",
"prefix": "adf",
"tags": ["scope:process-services", "type:library"],
"targets": {
"build": {
"executor": "@angular/build:ng-packagr",
@@ -60,7 +60,6 @@ describe('FormComponent', () => {
template: '<div></div>',
standalone: false
})
// eslint-disable-next-line @angular-eslint/component-class-suffix
class CustomWidget {
typeId = 'CustomWidget';
}
@@ -28,7 +28,6 @@ import { switchMap } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class AttachFileWidgetDialogService {
private readonly dialog = inject(MatDialog);
private readonly translation = inject(TranslationService);
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { Component, Input, OnInit } from '@angular/core';
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
import { DynamicTableRow } from '../models/dynamic-table-row.model';
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { Component, Input } from '@angular/core';
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
import { DynamicTableRow } from '../models/dynamic-table-row.model';
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { FormService, FormFieldModel } from '@alfresco/adf-core';
import { Component, Input, OnInit, inject } from '@angular/core';
import { DynamicTableColumnOption } from '../models/dynamic-table-column-option.model';
@@ -15,15 +15,11 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { DynamicTableColumn } from './dynamic-table-column.model';
import { DynamicTableRow } from './dynamic-table-row.model';
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
export interface CellValidator {
isSupported(column: DynamicTableColumn): boolean;
validate(row: DynamicTableRow, column: DynamicTableColumn, summary?: DynamicRowValidationSummary): boolean;
}
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { CellValidator } from './cell-validator.model';
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
import { DynamicTableColumn } from './dynamic-table-column.model';
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
// maps to: com.activiti.model.editor.form.OptionRepresentation
export interface DynamicTableColumnOption {
id: string;
@@ -15,13 +15,10 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { DynamicTableColumnOption } from './dynamic-table-column-option.model';
// maps to: com.activiti.model.editor.form.ColumnDefinitionRepresentation
export interface DynamicTableColumn {
id: string;
name: string;
type: string;
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
export interface DynamicTableRow {
isNew: boolean;
selected: boolean;
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { CellValidator } from './cell-validator.model';
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
import { DynamicTableColumn } from './dynamic-table-column.model';
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { CellValidator } from './cell-validator.model';
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
import { DynamicTableColumn } from './dynamic-table-column.model';
@@ -15,8 +15,6 @@
* limitations under the License.
*/
/* eslint-disable @angular-eslint/component-selector */
import { Component, Input, OnInit } from '@angular/core';
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
import { DynamicTableRow } from '../models/dynamic-table-row.model';
@@ -174,12 +174,12 @@ export class ProcessInstanceListComponent extends DataTableSchema implements OnC
rowClick = new EventEmitter<string>();
/** Emitted when the list of process instances has been loaded successfully from the server. */
// eslint-disable-next-line @angular-eslint/no-output-native
@Output()
success = new EventEmitter<ResultListDataRepresentationProcessInstanceRepresentation>();
/** Emitted when an error occurs while loading the list of process instances from the server. */
// eslint-disable-next-line @angular-eslint/no-output-native
@Output()
error = new EventEmitter<any>();