Skip to content

Commit

Permalink
chore: Fix linter issues
Browse files Browse the repository at this point in the history
- move `@angular-eslint/prefer-standalone` to global eslint rules
- add missing `OnDestroy` implementation in cds library
- remove `@angular-eslint/no-host-metadata-property` from the config as it is no longer part of the package
 for more, see: angular-eslint/angular-eslint#2113
  • Loading branch information
pawelfras committed Dec 17, 2024
1 parent 1126c06 commit e3e935d
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 62 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"no-fallthrough": "off",
"prefer-const": "off",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/prefer-standalone": "off",
"@stylistic/ts/quotes": "off",
"@stylistic/ts/member-delimiter-style": [
"error",
Expand Down
5 changes: 1 addition & 4 deletions feature-libs/asm/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/cart/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/customer-ticketing/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/estimated-delivery-date/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/organization/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/pdf-invoices/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/pickup-in-store/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/product-configurator/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/qualtrics/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/quote/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/requested-delivery-date/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/smartedit/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
5 changes: 1 addition & 4 deletions feature-libs/storefinder/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { HttpClient } from '@angular/common/http';
import { inject, Injectable } from '@angular/core';
import { inject, Injectable, OnDestroy } from '@angular/core';
import { BaseSiteService, WindowRef } from '@spartacus/core';
import {
catchError,
Expand All @@ -19,7 +19,7 @@ import {
take,
takeUntil,
takeWhile,
timer
timer,
} from 'rxjs';
import { CdsConfig } from '../config';
import { CdsEndpointsService } from '../services';
Expand All @@ -33,7 +33,7 @@ const TRENDING_SEARCHES_ENDPOINT_KEY = 'searchIntelligence';
@Injectable({
providedIn: 'root',
})
export class TrendingSearchesService {
export class TrendingSearchesService implements OnDestroy {
protected baseSiteService = inject(BaseSiteService);
protected cdsConfig = inject(CdsConfig);
protected cdsEndpointsService = inject(CdsEndpointsService);
Expand Down
5 changes: 1 addition & 4 deletions integration-libs/cpq-quote/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"ignorePatterns": ["schematics/**/*.d.ts"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
"files": ["*.ts"]
}
]
}
3 changes: 1 addition & 2 deletions projects/storefrontapp/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
{
"checkDynamicDependenciesExceptions": ["@spartacus/**"]
}
],
"@angular-eslint/prefer-standalone": "off"
]
}
}
]
Expand Down
1 change: 0 additions & 1 deletion tools/eslint-plugins/legacy-ng-cli-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
}
],
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-native": "error",
Expand Down

0 comments on commit e3e935d

Please sign in to comment.