mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
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:
@@ -1,2 +0,0 @@
|
||||
.storybook
|
||||
coverage
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.js"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
"@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-empty-lifecycle-method": "off",
|
||||
"@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/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"@angular-eslint/template/no-autofocus": "error",
|
||||
"@angular-eslint/template/no-positive-tabindex": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*!
|
||||
* @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:insights',
|
||||
onlyDependOnLibsWithTags: ['scope:core', 'scope:content-services', 'scope:js-api']
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
'no-underscore-dangle': [
|
||||
'error',
|
||||
{
|
||||
allowAfterThis: true
|
||||
}
|
||||
],
|
||||
'@angular-eslint/no-empty-lifecycle-method': 'off',
|
||||
'no-redeclare': 'error',
|
||||
'@angular-eslint/prefer-standalone': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.html'],
|
||||
rules: {
|
||||
'@angular-eslint/template/no-autofocus': 'error',
|
||||
'@angular-eslint/template/no-positive-tabindex': 'error'
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -4,6 +4,7 @@
|
||||
"sourceRoot": "lib/insights/src",
|
||||
"projectType": "library",
|
||||
"prefix": "adf",
|
||||
"tags": ["scope:insights", "type:library"],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular/build:ng-packagr",
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { ReportQuery } from '../../diagram/models/report/report-query.model';
|
||||
import * as analyticMock from '../../mock';
|
||||
import { AnalyticsGeneratorComponent } from '../components/analytics-generator.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { AnalyticsService } from '@alfresco/adf-insights';
|
||||
import { AnalyticsService } from '../services/analytics.service';
|
||||
|
||||
describe('AnalyticsGeneratorComponent', () => {
|
||||
let component: AnalyticsGeneratorComponent;
|
||||
|
||||
@@ -86,6 +86,7 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Reload the component
|
||||
*
|
||||
* @param reportId report id
|
||||
*/
|
||||
reload(reportId?: number) {
|
||||
@@ -95,6 +96,7 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Get the report list
|
||||
*
|
||||
* @param appId application id
|
||||
* @param reportId report id
|
||||
*/
|
||||
@@ -138,6 +140,7 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Check if the report list is empty
|
||||
*
|
||||
* @returns `true` if report list is empty, otherwise `false`
|
||||
*/
|
||||
isReportsEmpty(): boolean {
|
||||
@@ -146,6 +149,7 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Select the current report
|
||||
*
|
||||
* @param report report model
|
||||
*/
|
||||
selectReport(report: ReportParametersModel) {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
-2
@@ -15,8 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/no-input-rename */
|
||||
|
||||
import { ADF_DATE_FORMATS, AdfDateFnsAdapter } from '@alfresco/adf-core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, inject } from '@angular/core';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ReactiveFormsModule, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormsModule, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ReactiveFormsModule, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
import { EventEmitter, Input, OnChanges, Output, SimpleChanges, Directive } from '@angular/core';
|
||||
|
||||
@Directive()
|
||||
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
||||
export class WidgetComponent implements OnChanges {
|
||||
/** field. */
|
||||
@Input()
|
||||
|
||||
@@ -44,6 +44,7 @@ export class AnalyticsService {
|
||||
|
||||
/**
|
||||
* Retrieve all the Deployed app
|
||||
*
|
||||
* @param appId application id
|
||||
* @returns list or report parameter models
|
||||
*/
|
||||
@@ -64,6 +65,7 @@ export class AnalyticsService {
|
||||
|
||||
/**
|
||||
* Retrieve Report by name
|
||||
*
|
||||
* @param reportName - The name of report
|
||||
* @returns report model
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,8 @@ import * as diagramsActivitiesMock from '../../mock/diagram/diagram-activities.m
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelMultilineTextDirective, RaphaelRectDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelMultilineTextDirective } from './raphael/raphael-multiline-text.component';
|
||||
import { RaphaelRectDirective } from './raphael/raphael-rect.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import * as boundaryEventMock from '../../mock/diagram/diagram-boundary.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelCircleDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelCircleDirective } from './raphael/raphael-circle.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import * as intermediateCatchingMock from '../../mock/diagram/diagram-intermedia
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelCircleDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelCircleDirective } from './raphael/raphael-circle.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import * as diagramsEventsMock from '../../mock/diagram/diagram-events.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelCircleDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelCircleDirective } from './raphael/raphael-circle.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import * as diagramsGatewaysMock from '../../mock/diagram/diagram-gateways.mock'
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelRhombusDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelRhombusDirective } from './raphael/raphael-rhombus.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import * as structuralMock from '../../mock/diagram/diagram-structural.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelRectDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelRectDirective } from './raphael/raphael-rect.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import * as swimLanesMock from '../../mock/diagram/diagram-swimlanes.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelTextDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelTextDirective } from './raphael/raphael-text.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import * as throwEventMock from '../../mock/diagram/diagram-throw.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { RaphaelCircleDirective } from '@alfresco/adf-insights';
|
||||
import { RaphaelCircleDirective } from './raphael/raphael-circle.component';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Polyline } from './polyline';
|
||||
import { RaphaelBase } from './raphael-base';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
declare let Raphael: any;
|
||||
|
||||
const ARROW_WIDTH = 4;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
import { Injectable, OnDestroy } from '@angular/core';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
declare let Raphael: any;
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
|
||||
@@ -97,6 +97,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
|
||||
|
||||
/**
|
||||
* Calculates the tooltip position and displays it
|
||||
*
|
||||
* @param event mouseenter/touchend event
|
||||
*/
|
||||
private handleMouseEnter(event): void {
|
||||
|
||||
Reference in New Issue
Block a user