Skip to content

Commit 6e8ea73

Browse files
chore: update to typescript-eslint v8 (#6442)
1 parent a401366 commit 6e8ea73

File tree

12 files changed

+95
-84
lines changed

12 files changed

+95
-84
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ packages/charts/dist
88
# build results for cli package
99
packages/cli/dist
1010

11+
# build results for compat package
12+
packages/compat/dist
13+
1114
# build results for main package
1215
packages/main/dist
1316
packages/main/wrappers

.eslintrc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ overrides:
4848
- '*.ts'
4949
- '*.tsx'
5050
parserOptions:
51-
EXPERIMENTAL_useProjectService:
51+
projectService:
5252
# TODO https://github.com/typescript-eslint/typescript-eslint/issues/9450
5353
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 1000
5454
plugins:
@@ -88,6 +88,8 @@ overrides:
8888
'@typescript-eslint/no-unused-vars':
8989
- 'error'
9090
- varsIgnorePattern: '^_'
91+
argsIgnorePattern: '^_'
92+
caughtErrorsIgnorePattern: '^_'
9193

9294
# Performance Improvements: https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting#eslint-plugin-import
9395
'import/named': 'off'
@@ -98,8 +100,10 @@ overrides:
98100
# Generated Web Component Wrappers might contain empty interfaces
99101
- files:
100102
- 'packages/main/src/webComponents/*/index.tsx'
103+
- 'packages/compat/src/components/TableCell/index.tsx'
104+
- 'packages/compat/src/components/TableGroupRow/index.tsx'
101105
rules:
102-
'@typescript-eslint/no-empty-interface': 'off'
106+
'@typescript-eslint/no-empty-object-type': 'off'
103107

104108
# disable prop types check for Analytical Table Defaults (TODO might change for react-table v8)
105109
- files:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"@types/react": "^18.3.4",
6363
"@types/react-dom": "^18.3.0",
6464
"@types/use-sync-external-store": "^0.0.6",
65-
"@typescript-eslint/eslint-plugin": "^7.0.0",
66-
"@typescript-eslint/parser": "^7.0.0",
65+
"@typescript-eslint/eslint-plugin": "8",
66+
"@typescript-eslint/parser": "8",
6767
"@ui5/webcomponents-tools": "2.3.0",
6868
"@vitejs/plugin-react": "^4.2.0",
6969
"chromatic": "^11.0.0",

packages/base/src/Device/Media.cy.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ describe('Device - Media', () => {
2323
it('Attach and Detach Event', () => {
2424
const callback = cy.spy();
2525
attachMediaHandler(callback);
26+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
2627
expect(MediaEventProvider.isHandlerAttached('media', callback)).to.be.true;
2728
detachMediaHandler(callback);
29+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
2830
expect(MediaEventProvider.isHandlerAttached('media', callback)).to.be.false;
2931
});
3032

packages/base/src/utils/debounce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Cancelable {
1111
* function is triggered. The end of a sequence is defined by the `wait`
1212
* parameter.
1313
*/
14-
// eslint-disable-next-line @typescript-eslint/ban-types
14+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
1515
const debounce = <T extends Function>(func: T, wait: number): T & Cancelable => {
1616
let timeout;
1717
let previous;

packages/base/src/utils/throttle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface Options {
1818
* but if you'd like to disable the execution on the leading edge, pass
1919
* `{leading: false}`. To disable execution on the trailing edge, ditto.
2020
*/
21-
// eslint-disable-next-line @typescript-eslint/ban-types
21+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2222
const throttle = <T extends Function>(
2323
func: T,
2424
wait: number,
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"extends": "./tsconfig.json"
2+
"extends": "./tsconfig.json",
3+
"include": ["src"],
4+
"exclude": ["test"]
35
}

packages/cypress-commands/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"strict": true,
99
"skipLibCheck": true
1010
},
11-
"include": ["src"]
11+
"include": ["src", "test"]
1212
}

packages/main/src/components/AnalyticalTable/AnalyticalTable.cy.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3111,7 +3111,9 @@ describe('AnalyticalTable', () => {
31113111
<Button
31123112
design="Transparent"
31133113
onClick={() => {
3114-
getChildren && getChildren(parentId, currentChildrenCount);
3114+
if (typeof getChildren === 'function') {
3115+
void getChildren(parentId, currentChildrenCount);
3116+
}
31153117
}}
31163118
>
31173119
Load more for {parentNode.name}

packages/main/src/components/AnalyticalTable/util/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function getBy(obj, path, def) {
5353
val = pathObj.reduce((cursor, pathPart) => {
5454
return cursor[pathPart];
5555
}, obj);
56-
} catch (e) {
56+
} catch (_e) {
5757
// continue regardless of error
5858
}
5959
return typeof val !== 'undefined' ? val : def;

packages/main/src/types/Ui5DomRef.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface Ui5DomRef extends HTMLElement {
1+
export interface Ui5DomRef extends Omit<HTMLElement, 'focus'> {
22
/**
33
* Attach a callback that will be executed whenever the component is invalidated
44
*

yarn.lock

Lines changed: 71 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5803,6 +5803,29 @@ __metadata:
58035803
languageName: node
58045804
linkType: hard
58055805

5806+
"@typescript-eslint/eslint-plugin@npm:8":
5807+
version: 8.8.0
5808+
resolution: "@typescript-eslint/eslint-plugin@npm:8.8.0"
5809+
dependencies:
5810+
"@eslint-community/regexpp": "npm:^4.10.0"
5811+
"@typescript-eslint/scope-manager": "npm:8.8.0"
5812+
"@typescript-eslint/type-utils": "npm:8.8.0"
5813+
"@typescript-eslint/utils": "npm:8.8.0"
5814+
"@typescript-eslint/visitor-keys": "npm:8.8.0"
5815+
graphemer: "npm:^1.4.0"
5816+
ignore: "npm:^5.3.1"
5817+
natural-compare: "npm:^1.4.0"
5818+
ts-api-utils: "npm:^1.3.0"
5819+
peerDependencies:
5820+
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
5821+
eslint: ^8.57.0 || ^9.0.0
5822+
peerDependenciesMeta:
5823+
typescript:
5824+
optional: true
5825+
checksum: 10c0/98ac37587eda02a713710f0a62ca979833482024968f1d1735881718abe102a6b49707db4f1dac0d7c731d1cbf8111d829c5125348d4829ab6fad7a7b3b344e4
5826+
languageName: node
5827+
linkType: hard
5828+
58065829
"@typescript-eslint/eslint-plugin@npm:^6.9.0":
58075830
version: 6.21.0
58085831
resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0"
@@ -5828,26 +5851,21 @@ __metadata:
58285851
languageName: node
58295852
linkType: hard
58305853

5831-
"@typescript-eslint/eslint-plugin@npm:^7.0.0":
5832-
version: 7.18.0
5833-
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
5854+
"@typescript-eslint/parser@npm:8":
5855+
version: 8.8.0
5856+
resolution: "@typescript-eslint/parser@npm:8.8.0"
58345857
dependencies:
5835-
"@eslint-community/regexpp": "npm:^4.10.0"
5836-
"@typescript-eslint/scope-manager": "npm:7.18.0"
5837-
"@typescript-eslint/type-utils": "npm:7.18.0"
5838-
"@typescript-eslint/utils": "npm:7.18.0"
5839-
"@typescript-eslint/visitor-keys": "npm:7.18.0"
5840-
graphemer: "npm:^1.4.0"
5841-
ignore: "npm:^5.3.1"
5842-
natural-compare: "npm:^1.4.0"
5843-
ts-api-utils: "npm:^1.3.0"
5858+
"@typescript-eslint/scope-manager": "npm:8.8.0"
5859+
"@typescript-eslint/types": "npm:8.8.0"
5860+
"@typescript-eslint/typescript-estree": "npm:8.8.0"
5861+
"@typescript-eslint/visitor-keys": "npm:8.8.0"
5862+
debug: "npm:^4.3.4"
58445863
peerDependencies:
5845-
"@typescript-eslint/parser": ^7.0.0
5846-
eslint: ^8.56.0
5864+
eslint: ^8.57.0 || ^9.0.0
58475865
peerDependenciesMeta:
58485866
typescript:
58495867
optional: true
5850-
checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3
5868+
checksum: 10c0/cf72a644b89c62cd55b09fa1d22b51a2c726714aac344a797f0c2ad80bfbabcb7567000fadd4ea8188aa1d923675bebdca06acc1d28ac1b8360bf28a36b46f3a
58515869
languageName: node
58525870
linkType: hard
58535871

@@ -5869,24 +5887,6 @@ __metadata:
58695887
languageName: node
58705888
linkType: hard
58715889

5872-
"@typescript-eslint/parser@npm:^7.0.0":
5873-
version: 7.18.0
5874-
resolution: "@typescript-eslint/parser@npm:7.18.0"
5875-
dependencies:
5876-
"@typescript-eslint/scope-manager": "npm:7.18.0"
5877-
"@typescript-eslint/types": "npm:7.18.0"
5878-
"@typescript-eslint/typescript-estree": "npm:7.18.0"
5879-
"@typescript-eslint/visitor-keys": "npm:7.18.0"
5880-
debug: "npm:^4.3.4"
5881-
peerDependencies:
5882-
eslint: ^8.56.0
5883-
peerDependenciesMeta:
5884-
typescript:
5885-
optional: true
5886-
checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059
5887-
languageName: node
5888-
linkType: hard
5889-
58905890
"@typescript-eslint/scope-manager@npm:5.62.0":
58915891
version: 5.62.0
58925892
resolution: "@typescript-eslint/scope-manager@npm:5.62.0"
@@ -5907,13 +5907,13 @@ __metadata:
59075907
languageName: node
59085908
linkType: hard
59095909

5910-
"@typescript-eslint/scope-manager@npm:7.18.0":
5911-
version: 7.18.0
5912-
resolution: "@typescript-eslint/scope-manager@npm:7.18.0"
5910+
"@typescript-eslint/scope-manager@npm:8.8.0":
5911+
version: 8.8.0
5912+
resolution: "@typescript-eslint/scope-manager@npm:8.8.0"
59135913
dependencies:
5914-
"@typescript-eslint/types": "npm:7.18.0"
5915-
"@typescript-eslint/visitor-keys": "npm:7.18.0"
5916-
checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e
5914+
"@typescript-eslint/types": "npm:8.8.0"
5915+
"@typescript-eslint/visitor-keys": "npm:8.8.0"
5916+
checksum: 10c0/29ddf589ff0e465dbbf3eb87b79a29face4ec5a6cb617bbaafbac6ae8340d376b5b405bca762ee1c7a40cbdf7912a32734f9119f6864df048c7a0b2de21bdd3d
59175917
languageName: node
59185918
linkType: hard
59195919

@@ -5934,20 +5934,18 @@ __metadata:
59345934
languageName: node
59355935
linkType: hard
59365936

5937-
"@typescript-eslint/type-utils@npm:7.18.0":
5938-
version: 7.18.0
5939-
resolution: "@typescript-eslint/type-utils@npm:7.18.0"
5937+
"@typescript-eslint/type-utils@npm:8.8.0":
5938+
version: 8.8.0
5939+
resolution: "@typescript-eslint/type-utils@npm:8.8.0"
59405940
dependencies:
5941-
"@typescript-eslint/typescript-estree": "npm:7.18.0"
5942-
"@typescript-eslint/utils": "npm:7.18.0"
5941+
"@typescript-eslint/typescript-estree": "npm:8.8.0"
5942+
"@typescript-eslint/utils": "npm:8.8.0"
59435943
debug: "npm:^4.3.4"
59445944
ts-api-utils: "npm:^1.3.0"
5945-
peerDependencies:
5946-
eslint: ^8.56.0
59475945
peerDependenciesMeta:
59485946
typescript:
59495947
optional: true
5950-
checksum: 10c0/ad92a38007be620f3f7036f10e234abdc2fdc518787b5a7227e55fd12896dacf56e8b34578723fbf9bea8128df2510ba8eb6739439a3879eda9519476d5783fd
5948+
checksum: 10c0/d6ee11f4686fb54daea1f436f73b96eb31a95f6e535abc0534abf5794e7597669a92d12300969c8afee0fc1912dbc1591664f7e37f0da5935016cc981b2921a8
59515949
languageName: node
59525950
linkType: hard
59535951

@@ -5965,10 +5963,10 @@ __metadata:
59655963
languageName: node
59665964
linkType: hard
59675965

5968-
"@typescript-eslint/types@npm:7.18.0":
5969-
version: 7.18.0
5970-
resolution: "@typescript-eslint/types@npm:7.18.0"
5971-
checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054
5966+
"@typescript-eslint/types@npm:8.8.0":
5967+
version: 8.8.0
5968+
resolution: "@typescript-eslint/types@npm:8.8.0"
5969+
checksum: 10c0/cd168fafcaf77641b023c4405ea3a8c30fbad1737abb5aec9fce67fe2ae20224b624b5a2e3e84900ba81dc7dd33343add3653763703a225326cc81356b182d09
59725970
languageName: node
59735971
linkType: hard
59745972

@@ -6009,22 +6007,22 @@ __metadata:
60096007
languageName: node
60106008
linkType: hard
60116009

6012-
"@typescript-eslint/typescript-estree@npm:7.18.0":
6013-
version: 7.18.0
6014-
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
6010+
"@typescript-eslint/typescript-estree@npm:8.8.0":
6011+
version: 8.8.0
6012+
resolution: "@typescript-eslint/typescript-estree@npm:8.8.0"
60156013
dependencies:
6016-
"@typescript-eslint/types": "npm:7.18.0"
6017-
"@typescript-eslint/visitor-keys": "npm:7.18.0"
6014+
"@typescript-eslint/types": "npm:8.8.0"
6015+
"@typescript-eslint/visitor-keys": "npm:8.8.0"
60186016
debug: "npm:^4.3.4"
6019-
globby: "npm:^11.1.0"
6017+
fast-glob: "npm:^3.3.2"
60206018
is-glob: "npm:^4.0.3"
60216019
minimatch: "npm:^9.0.4"
60226020
semver: "npm:^7.6.0"
60236021
ts-api-utils: "npm:^1.3.0"
60246022
peerDependenciesMeta:
60256023
typescript:
60266024
optional: true
6027-
checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81
6025+
checksum: 10c0/9b9e849f6b2d4e250840ef8e05f55a97d6598adaf48c1e6df83084b94c30feca6a3e7916ee1c235178188d0db6364a877cbf8fe218c36d5f8d5acb50767f3273
60286026
languageName: node
60296027
linkType: hard
60306028

@@ -6045,17 +6043,17 @@ __metadata:
60456043
languageName: node
60466044
linkType: hard
60476045

6048-
"@typescript-eslint/utils@npm:7.18.0":
6049-
version: 7.18.0
6050-
resolution: "@typescript-eslint/utils@npm:7.18.0"
6046+
"@typescript-eslint/utils@npm:8.8.0":
6047+
version: 8.8.0
6048+
resolution: "@typescript-eslint/utils@npm:8.8.0"
60516049
dependencies:
60526050
"@eslint-community/eslint-utils": "npm:^4.4.0"
6053-
"@typescript-eslint/scope-manager": "npm:7.18.0"
6054-
"@typescript-eslint/types": "npm:7.18.0"
6055-
"@typescript-eslint/typescript-estree": "npm:7.18.0"
6051+
"@typescript-eslint/scope-manager": "npm:8.8.0"
6052+
"@typescript-eslint/types": "npm:8.8.0"
6053+
"@typescript-eslint/typescript-estree": "npm:8.8.0"
60566054
peerDependencies:
6057-
eslint: ^8.56.0
6058-
checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e
6055+
eslint: ^8.57.0 || ^9.0.0
6056+
checksum: 10c0/fcf2dfd4a2d9491aa096a29c2c1fdd891ca3c13933d20cfea44e51b3d10a397e7ed9a9cd71ac9a29e8c4706264ae00c25a29394e2a6bda3291be298062901f2c
60596057
languageName: node
60606058
linkType: hard
60616059

@@ -6097,13 +6095,13 @@ __metadata:
60976095
languageName: node
60986096
linkType: hard
60996097

6100-
"@typescript-eslint/visitor-keys@npm:7.18.0":
6101-
version: 7.18.0
6102-
resolution: "@typescript-eslint/visitor-keys@npm:7.18.0"
6098+
"@typescript-eslint/visitor-keys@npm:8.8.0":
6099+
version: 8.8.0
6100+
resolution: "@typescript-eslint/visitor-keys@npm:8.8.0"
61036101
dependencies:
6104-
"@typescript-eslint/types": "npm:7.18.0"
6102+
"@typescript-eslint/types": "npm:8.8.0"
61056103
eslint-visitor-keys: "npm:^3.4.3"
6106-
checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0
6104+
checksum: 10c0/580ce74c9b09b9e6a6f3f0ac2d2f0c6a6b983a78ce3b2544822ee08107c57142858d674897f61ff32a9a5e8fca00c916545c159bb75d134f4380884642542d38
61076105
languageName: node
61086106
linkType: hard
61096107

@@ -21427,8 +21425,8 @@ __metadata:
2142721425
"@types/react": "npm:^18.3.4"
2142821426
"@types/react-dom": "npm:^18.3.0"
2142921427
"@types/use-sync-external-store": "npm:^0.0.6"
21430-
"@typescript-eslint/eslint-plugin": "npm:^7.0.0"
21431-
"@typescript-eslint/parser": "npm:^7.0.0"
21428+
"@typescript-eslint/eslint-plugin": "npm:8"
21429+
"@typescript-eslint/parser": "npm:8"
2143221430
"@ui5/webcomponents": "npm:2.3.0"
2143321431
"@ui5/webcomponents-compat": "npm:2.3.0"
2143421432
"@ui5/webcomponents-fiori": "npm:2.3.0"

0 commit comments

Comments
 (0)