Skip to content

Commit 5f922c0

Browse files
Remove webpack@5.90.3 since it causes issues with the tests
This automatically removed some old eslint dependencies, which caused some conflicts in the custom linting plugin
1 parent 7dea5f7 commit 5f922c0

8 files changed

Lines changed: 38 additions & 84 deletions

File tree

lint/src/rules/html/themed-component-usages.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
*/
88
import { TmplAstElement } from '@angular-eslint/bundled-angular-compiler';
99
import { TemplateParserServices } from '@angular-eslint/utils';
10-
import {
11-
ESLintUtils,
12-
TSESLint,
13-
} from '@typescript-eslint/utils';
10+
import { ESLintUtils } from '@typescript-eslint/utils';
11+
import { RuleContext } from '@typescript-eslint/utils/ts-eslint';
1412

1513
import { fixture } from '../../../test/fixture';
1614
import {
@@ -52,7 +50,7 @@ The only exception to this rule are unit tests, where we may want to use the bas
5250

5351
export const rule = ESLintUtils.RuleCreator.withoutDocs({
5452
...info,
55-
create(context: TSESLint.RuleContext<Message, unknown[]>) {
53+
create(context: RuleContext<Message, unknown[]>) {
5654
if (getFilename(context).includes('.spec.ts')) {
5755
// skip inline templates in unit tests
5856
return {};

lint/src/rules/ts/themed-component-classes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
import {
99
ESLintUtils,
10-
TSESLint,
1110
TSESTree,
1211
} from '@typescript-eslint/utils';
12+
import { RuleContext } from '@typescript-eslint/utils/ts-eslint';
1313

1414
import { fixture } from '../../../test/fixture';
1515
import {
@@ -57,7 +57,7 @@ export const info = {
5757

5858
export const rule = ESLintUtils.RuleCreator.withoutDocs({
5959
...info,
60-
create(context: TSESLint.RuleContext<Message, unknown[]>) {
60+
create(context: RuleContext<Message, unknown[]>) {
6161
const filename = getFilename(context);
6262

6363
if (filename.endsWith('.spec.ts')) {

lint/src/rules/ts/themed-component-selectors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
import {
99
ESLintUtils,
10-
TSESLint,
1110
TSESTree,
1211
} from '@typescript-eslint/utils';
12+
import { RuleContext } from '@typescript-eslint/utils/ts-eslint';
1313

1414
import { fixture } from '../../../test/fixture';
1515
import { getComponentSelectorNode } from '../../util/angular';
@@ -58,7 +58,7 @@ Unit tests are exempt from this rule, because they may redefine components using
5858

5959
export const rule = ESLintUtils.RuleCreator.withoutDocs({
6060
...info,
61-
create(context: TSESLint.RuleContext<Message, unknown[]>) {
61+
create(context: RuleContext<Message, unknown[]>) {
6262
const filename = getFilename(context);
6363

6464
if (filename.endsWith('.spec.ts')) {

lint/src/rules/ts/themed-component-usages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
import {
99
ESLintUtils,
10-
TSESLint,
1110
TSESTree,
1211
} from '@typescript-eslint/utils';
12+
import { RuleContext } from '@typescript-eslint/utils/ts-eslint';
1313

1414
import { fixture } from '../../../test/fixture';
1515
import {
@@ -68,7 +68,7 @@ There are a few exceptions where the base class can still be used:
6868

6969
export const rule = ESLintUtils.RuleCreator.withoutDocs({
7070
...info,
71-
create(context: TSESLint.RuleContext<Message, unknown[]>) {
71+
create(context: RuleContext<Message, unknown[]>) {
7272
const filename = getFilename(context);
7373

7474
function handleUnthemedUsagesInTypescript(node: TSESTree.Identifier) {

lint/src/util/structure.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
*
66
* http://www.dspace.org/license/
77
*/
8-
import { TSESLint } from '@typescript-eslint/utils';
9-
import { RuleTester } from 'eslint';
8+
import {
9+
InvalidTestCase,
10+
RuleMetaData,
11+
RuleModule,
12+
ValidTestCase,
13+
} from '@typescript-eslint/utils/ts-eslint';
1014
import { EnumType } from 'typescript';
1115

12-
export type Meta = TSESLint.RuleMetaData<string>;
13-
export type Valid = TSESLint.ValidTestCase<unknown[]> | RuleTester.ValidTestCase;
14-
export type Invalid = TSESLint.InvalidTestCase<string, unknown[]> | RuleTester.InvalidTestCase;
16+
export type Meta = RuleMetaData<string>;
17+
export type Valid = ValidTestCase<unknown[]>;
18+
export type Invalid = InvalidTestCase<string, unknown[]>;
1519

1620
export interface DSpaceESLintRuleInfo {
1721
name: string;
@@ -28,7 +32,7 @@ export interface NamedTests {
2832
export interface RuleExports {
2933
Message: EnumType,
3034
info: DSpaceESLintRuleInfo,
31-
rule: TSESLint.RuleModule<string>,
35+
rule: RuleModule<string>,
3236
tests: NamedTests,
3337
default: unknown,
3438
}

lint/src/util/typescript.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
*
66
* http://www.dspace.org/license/
77
*/
8+
import { TSESTree } from '@typescript-eslint/utils';
89
import {
9-
TSESLint,
10-
TSESTree,
11-
} from '@typescript-eslint/utils';
10+
RuleContext,
11+
SourceCode,
12+
} from '@typescript-eslint/utils/ts-eslint';
1213

1314
import {
1415
match,
1516
toUnixStylePath,
1617
} from './misc';
1718

18-
export type AnyRuleContext = TSESLint.RuleContext<string, unknown[]>;
19+
export type AnyRuleContext = RuleContext<string, unknown[]>;
1920

2021
/**
2122
* Return the current filename based on the ESLint rule context as a Unix-style path.
@@ -27,7 +28,7 @@ export function getFilename(context: AnyRuleContext): string {
2728
return toUnixStylePath(context.getFilename());
2829
}
2930

30-
export function getSourceCode(context: AnyRuleContext): TSESLint.SourceCode {
31+
export function getSourceCode(context: AnyRuleContext): SourceCode {
3132
// TSESLint claims this is deprecated, but the suggested alternative is undefined (could be a version mismatch between ESLint and TSESlint?)
3233
// eslint-disable-next-line deprecation/deprecation
3334
return context.getSourceCode();

lint/test/testing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { RuleTester as TypeScriptRuleTester } from '@typescript-eslint/rule-tester';
10-
import { RuleTester } from 'eslint';
10+
import { RuleTester } from '@typescript-eslint/utils/ts-eslint';
1111

1212
import { themeableComponents } from '../src/util/theme-support';
1313
import {

yarn.lock

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
undici "6.7.1"
124124
vite "5.1.5"
125125
watchpack "2.4.0"
126-
webpack "5.90.3"
126+
webpack "5.94.0"
127127
webpack-dev-middleware "6.1.1"
128128
webpack-dev-server "4.15.1"
129129
webpack-merge "5.10.0"
@@ -194,7 +194,7 @@
194194
undici "6.11.1"
195195
vite "5.1.7"
196196
watchpack "2.4.0"
197-
webpack "5.90.3"
197+
webpack "5.94.0"
198198
webpack-dev-middleware "6.1.2"
199199
webpack-dev-server "4.15.1"
200200
webpack-merge "5.10.0"
@@ -2726,23 +2726,7 @@
27262726
resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.5.tgz#49d738257cc73bafe45c13cb8ff240683b4d5117"
27272727
integrity sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==
27282728

2729-
"@types/eslint-scope@^3.7.3":
2730-
version "3.7.7"
2731-
resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5"
2732-
integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==
2733-
dependencies:
2734-
"@types/eslint" "*"
2735-
"@types/estree" "*"
2736-
2737-
"@types/eslint@*":
2738-
version "8.56.5"
2739-
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.5.tgz#94b88cab77588fcecdd0771a6d576fa1c0af9d02"
2740-
integrity sha512-u5/YPJHo1tvkSF2CE0USEkxon82Z5DBy2xR+qfyYNszpX9qcs4sT6uq2kBbj4BXY1+DBGDPnrhMZV3pKWGNukw==
2741-
dependencies:
2742-
"@types/estree" "*"
2743-
"@types/json-schema" "*"
2744-
2745-
"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.5":
2729+
"@types/estree@1.0.5", "@types/estree@^1.0.5":
27462730
version "1.0.5"
27472731
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
27482732
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
@@ -2802,7 +2786,7 @@
28022786
resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.6.tgz#f1a1cb35aff47bc5cfb05cb0c441ca91e914c26f"
28032787
integrity sha512-+oY0FDTO2GYKEV0YPvSshGq9t7YozVkgvXLty7zogQNuCxBhT9/3INX9Q7H1aRZ4SUDRXAKlJuA4EA5nTt7SNw==
28042788

2805-
"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
2789+
"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
28062790
version "7.0.15"
28072791
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
28082792
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
@@ -3307,7 +3291,7 @@
33073291
resolved "https://registry.yarnpkg.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz#8b840305a6b48e8764803435ec0c716fa27d3802"
33083292
integrity sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==
33093293

3310-
"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.11.5", "@webassemblyjs/ast@^1.12.1":
3294+
"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1":
33113295
version "1.12.1"
33123296
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb"
33133297
integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==
@@ -3373,7 +3357,7 @@
33733357
resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a"
33743358
integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==
33753359

3376-
"@webassemblyjs/wasm-edit@^1.11.5", "@webassemblyjs/wasm-edit@^1.12.1":
3360+
"@webassemblyjs/wasm-edit@^1.12.1":
33773361
version "1.12.1"
33783362
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b"
33793363
integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==
@@ -3408,7 +3392,7 @@
34083392
"@webassemblyjs/wasm-gen" "1.12.1"
34093393
"@webassemblyjs/wasm-parser" "1.12.1"
34103394

3411-
"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.11.5", "@webassemblyjs/wasm-parser@^1.12.1":
3395+
"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1":
34123396
version "1.12.1"
34133397
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937"
34143398
integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==
@@ -3491,11 +3475,6 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8:
34913475
mime-types "~2.1.34"
34923476
negotiator "0.6.3"
34933477

3494-
acorn-import-assertions@^1.9.0:
3495-
version "1.9.0"
3496-
resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac"
3497-
integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==
3498-
34993478
acorn-import-attributes@^1.9.5:
35003479
version "1.9.5"
35013480
resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef"
@@ -5353,7 +5332,7 @@ engine.io@~6.5.2:
53535332
engine.io-parser "~5.2.1"
53545333
ws "~8.11.0"
53555334

5356-
enhanced-resolve@^5.15.0, enhanced-resolve@^5.17.1:
5335+
enhanced-resolve@^5.17.1:
53575336
version "5.17.1"
53585337
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15"
53595338
integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==
@@ -5652,9 +5631,11 @@ eslint-plugin-deprecation@^1.4.1:
56525631

56535632
"eslint-plugin-dspace-angular-html@link:./lint/dist/src/rules/html":
56545633
version "0.0.0"
5634+
uid ""
56555635

56565636
"eslint-plugin-dspace-angular-ts@link:./lint/dist/src/rules/ts":
56575637
version "0.0.0"
5638+
uid ""
56585639

56595640
eslint-plugin-import-newlines@^1.3.1:
56605641
version "1.4.0"
@@ -6550,7 +6531,7 @@ gopd@^1.0.1:
65506531
dependencies:
65516532
get-intrinsic "^1.1.3"
65526533

6553-
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
6534+
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6:
65546535
version "4.2.11"
65556536
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
65566537
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
@@ -11868,7 +11849,7 @@ watchpack@2.4.0:
1186811849
glob-to-regexp "^0.4.1"
1186911850
graceful-fs "^4.1.2"
1187011851

11871-
watchpack@^2.4.0, watchpack@^2.4.1:
11852+
watchpack@^2.4.1:
1187211853
version "2.4.2"
1187311854
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da"
1187411855
integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==
@@ -12100,36 +12081,6 @@ webpack-subresource-integrity@5.1.0:
1210012081
dependencies:
1210112082
typed-assert "^1.0.8"
1210212083

12103-
webpack@5.90.3:
12104-
version "5.90.3"
12105-
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.3.tgz#37b8f74d3ded061ba789bb22b31e82eed75bd9ac"
12106-
integrity sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==
12107-
dependencies:
12108-
"@types/eslint-scope" "^3.7.3"
12109-
"@types/estree" "^1.0.5"
12110-
"@webassemblyjs/ast" "^1.11.5"
12111-
"@webassemblyjs/wasm-edit" "^1.11.5"
12112-
"@webassemblyjs/wasm-parser" "^1.11.5"
12113-
acorn "^8.7.1"
12114-
acorn-import-assertions "^1.9.0"
12115-
browserslist "^4.21.10"
12116-
chrome-trace-event "^1.0.2"
12117-
enhanced-resolve "^5.15.0"
12118-
es-module-lexer "^1.2.1"
12119-
eslint-scope "5.1.1"
12120-
events "^3.2.0"
12121-
glob-to-regexp "^0.4.1"
12122-
graceful-fs "^4.2.9"
12123-
json-parse-even-better-errors "^2.3.1"
12124-
loader-runner "^4.2.0"
12125-
mime-types "^2.1.27"
12126-
neo-async "^2.6.2"
12127-
schema-utils "^3.2.0"
12128-
tapable "^2.1.1"
12129-
terser-webpack-plugin "^5.3.10"
12130-
watchpack "^2.4.0"
12131-
webpack-sources "^3.2.3"
12132-
1213312084
webpack@5.94.0:
1213412085
version "5.94.0"
1213512086
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f"

0 commit comments

Comments
 (0)