Skip to content

chore: update to typescript-eslint v8 #6442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ packages/charts/dist
# build results for cli package
packages/cli/dist

# build results for compat package
packages/compat/dist

# build results for main package
packages/main/dist
packages/main/wrappers
Expand Down
8 changes: 6 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ overrides:
- '*.ts'
- '*.tsx'
parserOptions:
EXPERIMENTAL_useProjectService:
projectService:
# TODO https://github.com/typescript-eslint/typescript-eslint/issues/9450
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 1000
plugins:
Expand Down Expand Up @@ -88,6 +88,8 @@ overrides:
'@typescript-eslint/no-unused-vars':
- 'error'
- varsIgnorePattern: '^_'
argsIgnorePattern: '^_'
caughtErrorsIgnorePattern: '^_'

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

# disable prop types check for Analytical Table Defaults (TODO might change for react-table v8)
- files:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/use-sync-external-store": "^0.0.6",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@typescript-eslint/eslint-plugin": "8",
"@typescript-eslint/parser": "8",
"@ui5/webcomponents-tools": "2.3.0",
"@vitejs/plugin-react": "^4.2.0",
"chromatic": "^11.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/base/src/Device/Media.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ describe('Device - Media', () => {
it('Attach and Detach Event', () => {
const callback = cy.spy();
attachMediaHandler(callback);
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(MediaEventProvider.isHandlerAttached('media', callback)).to.be.true;
detachMediaHandler(callback);
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(MediaEventProvider.isHandlerAttached('media', callback)).to.be.false;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/utils/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Cancelable {
* function is triggered. The end of a sequence is defined by the `wait`
* parameter.
*/
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
const debounce = <T extends Function>(func: T, wait: number): T & Cancelable => {
let timeout;
let previous;
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/utils/throttle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Options {
* but if you'd like to disable the execution on the leading edge, pass
* `{leading: false}`. To disable execution on the trailing edge, ditto.
*/
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
const throttle = <T extends Function>(
func: T,
wait: number,
Expand Down
4 changes: 3 additions & 1 deletion packages/cypress-commands/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"extends": "./tsconfig.json"
"extends": "./tsconfig.json",
"include": ["src"],
"exclude": ["test"]
}
2 changes: 1 addition & 1 deletion packages/cypress-commands/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"strict": true,
"skipLibCheck": true
},
"include": ["src"]
"include": ["src", "test"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,9 @@ describe('AnalyticalTable', () => {
<Button
design="Transparent"
onClick={() => {
getChildren && getChildren(parentId, currentChildrenCount);
if (typeof getChildren === 'function') {
void getChildren(parentId, currentChildrenCount);
}
}}
>
Load more for {parentNode.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getBy(obj, path, def) {
val = pathObj.reduce((cursor, pathPart) => {
return cursor[pathPart];
}, obj);
} catch (e) {
} catch (_e) {
// continue regardless of error
}
return typeof val !== 'undefined' ? val : def;
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/types/Ui5DomRef.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface Ui5DomRef extends HTMLElement {
export interface Ui5DomRef extends Omit<HTMLElement, 'focus'> {
/**
* Attach a callback that will be executed whenever the component is invalidated
*
Expand Down
144 changes: 71 additions & 73 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5803,6 +5803,29 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:8":
version: 8.8.0
resolution: "@typescript-eslint/eslint-plugin@npm:8.8.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:8.8.0"
"@typescript-eslint/type-utils": "npm:8.8.0"
"@typescript-eslint/utils": "npm:8.8.0"
"@typescript-eslint/visitor-keys": "npm:8.8.0"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/98ac37587eda02a713710f0a62ca979833482024968f1d1735881718abe102a6b49707db4f1dac0d7c731d1cbf8111d829c5125348d4829ab6fad7a7b3b344e4
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^6.9.0":
version: 6.21.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0"
Expand All @@ -5828,26 +5851,21 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^7.0.0":
version: 7.18.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
"@typescript-eslint/parser@npm:8":
version: 8.8.0
resolution: "@typescript-eslint/parser@npm:8.8.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/type-utils": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
ts-api-utils: "npm:^1.3.0"
"@typescript-eslint/scope-manager": "npm:8.8.0"
"@typescript-eslint/types": "npm:8.8.0"
"@typescript-eslint/typescript-estree": "npm:8.8.0"
"@typescript-eslint/visitor-keys": "npm:8.8.0"
debug: "npm:^4.3.4"
peerDependencies:
"@typescript-eslint/parser": ^7.0.0
eslint: ^8.56.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3
checksum: 10c0/cf72a644b89c62cd55b09fa1d22b51a2c726714aac344a797f0c2ad80bfbabcb7567000fadd4ea8188aa1d923675bebdca06acc1d28ac1b8360bf28a36b46f3a
languageName: node
linkType: hard

Expand All @@ -5869,24 +5887,6 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^7.0.0":
version: 7.18.0
resolution: "@typescript-eslint/parser@npm:7.18.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:5.62.0":
version: 5.62.0
resolution: "@typescript-eslint/scope-manager@npm:5.62.0"
Expand All @@ -5907,13 +5907,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/scope-manager@npm:7.18.0"
"@typescript-eslint/scope-manager@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/scope-manager@npm:8.8.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e
"@typescript-eslint/types": "npm:8.8.0"
"@typescript-eslint/visitor-keys": "npm:8.8.0"
checksum: 10c0/29ddf589ff0e465dbbf3eb87b79a29face4ec5a6cb617bbaafbac6ae8340d376b5b405bca762ee1c7a40cbdf7912a32734f9119f6864df048c7a0b2de21bdd3d
languageName: node
linkType: hard

Expand All @@ -5934,20 +5934,18 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/type-utils@npm:7.18.0"
"@typescript-eslint/type-utils@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/type-utils@npm:8.8.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:8.8.0"
"@typescript-eslint/utils": "npm:8.8.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/ad92a38007be620f3f7036f10e234abdc2fdc518787b5a7227e55fd12896dacf56e8b34578723fbf9bea8128df2510ba8eb6739439a3879eda9519476d5783fd
checksum: 10c0/d6ee11f4686fb54daea1f436f73b96eb31a95f6e535abc0534abf5794e7597669a92d12300969c8afee0fc1912dbc1591664f7e37f0da5935016cc981b2921a8
languageName: node
linkType: hard

Expand All @@ -5965,10 +5963,10 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/types@npm:7.18.0"
checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054
"@typescript-eslint/types@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/types@npm:8.8.0"
checksum: 10c0/cd168fafcaf77641b023c4405ea3a8c30fbad1737abb5aec9fce67fe2ae20224b624b5a2e3e84900ba81dc7dd33343add3653763703a225326cc81356b182d09
languageName: node
linkType: hard

Expand Down Expand Up @@ -6009,22 +6007,22 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
"@typescript-eslint/typescript-estree@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/typescript-estree@npm:8.8.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/types": "npm:8.8.0"
"@typescript-eslint/visitor-keys": "npm:8.8.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
fast-glob: "npm:^3.3.2"
is-glob: "npm:^4.0.3"
minimatch: "npm:^9.0.4"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81
checksum: 10c0/9b9e849f6b2d4e250840ef8e05f55a97d6598adaf48c1e6df83084b94c30feca6a3e7916ee1c235178188d0db6364a877cbf8fe218c36d5f8d5acb50767f3273
languageName: node
linkType: hard

Expand All @@ -6045,17 +6043,17 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/utils@npm:7.18.0"
"@typescript-eslint/utils@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/utils@npm:8.8.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.8.0"
"@typescript-eslint/types": "npm:8.8.0"
"@typescript-eslint/typescript-estree": "npm:8.8.0"
peerDependencies:
eslint: ^8.56.0
checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e
eslint: ^8.57.0 || ^9.0.0
checksum: 10c0/fcf2dfd4a2d9491aa096a29c2c1fdd891ca3c13933d20cfea44e51b3d10a397e7ed9a9cd71ac9a29e8c4706264ae00c25a29394e2a6bda3291be298062901f2c
languageName: node
linkType: hard

Expand Down Expand Up @@ -6097,13 +6095,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/visitor-keys@npm:7.18.0"
"@typescript-eslint/visitor-keys@npm:8.8.0":
version: 8.8.0
resolution: "@typescript-eslint/visitor-keys@npm:8.8.0"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/types": "npm:8.8.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0
checksum: 10c0/580ce74c9b09b9e6a6f3f0ac2d2f0c6a6b983a78ce3b2544822ee08107c57142858d674897f61ff32a9a5e8fca00c916545c159bb75d134f4380884642542d38
languageName: node
linkType: hard

Expand Down Expand Up @@ -21427,8 +21425,8 @@ __metadata:
"@types/react": "npm:^18.3.4"
"@types/react-dom": "npm:^18.3.0"
"@types/use-sync-external-store": "npm:^0.0.6"
"@typescript-eslint/eslint-plugin": "npm:^7.0.0"
"@typescript-eslint/parser": "npm:^7.0.0"
"@typescript-eslint/eslint-plugin": "npm:8"
"@typescript-eslint/parser": "npm:8"
"@ui5/webcomponents": "npm:2.3.0"
"@ui5/webcomponents-compat": "npm:2.3.0"
"@ui5/webcomponents-fiori": "npm:2.3.0"
Expand Down
Loading