Upgrade @angular-eslint & get rid of warning in tests

This commit is contained in:
Yury Bondarenko
2024-04-25 12:50:38 +02:00
parent 348dcc47fd
commit 3a0c964a49
3 changed files with 7 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
* http://www.dspace.org/license/ * http://www.dspace.org/license/
*/ */
import { TmplAstElement } from '@angular-eslint/bundled-angular-compiler'; import { TmplAstElement } from '@angular-eslint/bundled-angular-compiler';
import { getTemplateParserServices } from '@angular-eslint/utils'; import { TemplateParserServices } from '@angular-eslint/utils';
import { import {
ESLintUtils, ESLintUtils,
TSESLint, TSESLint,
@@ -21,7 +21,10 @@ import {
DISALLOWED_THEME_SELECTORS, DISALLOWED_THEME_SELECTORS,
fixSelectors, fixSelectors,
} from '../../util/theme-support'; } from '../../util/theme-support';
import { getFilename } from '../../util/typescript'; import {
getFilename,
getSourceCode,
} from '../../util/typescript';
export enum Message { export enum Message {
WRONG_SELECTOR = 'mustUseThemedWrapperSelector', WRONG_SELECTOR = 'mustUseThemedWrapperSelector',
@@ -55,7 +58,7 @@ export const rule = ESLintUtils.RuleCreator.withoutDocs({
return {}; return {};
} }
const parserServices = getTemplateParserServices(context as any); const parserServices = getSourceCode(context).parserServices as TemplateParserServices;
return { return {
[`Element$1[name = /^${DISALLOWED_THEME_SELECTORS}/]`](node: TmplAstElement) { [`Element$1[name = /^${DISALLOWED_THEME_SELECTORS}/]`](node: TmplAstElement) {

View File

@@ -142,7 +142,7 @@
"@angular-builders/custom-webpack": "~17.0.1", "@angular-builders/custom-webpack": "~17.0.1",
"@angular-devkit/build-angular": "^17.3.0", "@angular-devkit/build-angular": "^17.3.0",
"@angular-eslint/builder": "17.2.1", "@angular-eslint/builder": "17.2.1",
"@angular-eslint/bundled-angular-compiler": "16.3.1", "@angular-eslint/bundled-angular-compiler": "17.2.1",
"@angular-eslint/eslint-plugin": "17.2.1", "@angular-eslint/eslint-plugin": "17.2.1",
"@angular-eslint/eslint-plugin-template": "17.2.1", "@angular-eslint/eslint-plugin-template": "17.2.1",
"@angular-eslint/schematics": "17.2.1", "@angular-eslint/schematics": "17.2.1",

View File

@@ -183,11 +183,6 @@
"@nx/devkit" "17.2.8" "@nx/devkit" "17.2.8"
nx "17.2.8" nx "17.2.8"
"@angular-eslint/bundled-angular-compiler@16.3.1":
version "16.3.1"
resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-16.3.1.tgz#c4e9828020e26be17abb87197118a7faaa8a97c5"
integrity sha512-m4WP1xwS9XLcC/3n6lIcG5HZoai/5eb5W3xm48GVcv//0qE2p7S96RSgKPgGHvif5pF8O9xAqEWs3gDEG45+7A==
"@angular-eslint/bundled-angular-compiler@17.2.1": "@angular-eslint/bundled-angular-compiler@17.2.1":
version "17.2.1" version "17.2.1"
resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.2.1.tgz#d849b0845371b41856b9f598af81ce5bf799bca0" resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.2.1.tgz#d849b0845371b41856b9f598af81ce5bf799bca0"