Skip to content

Commit f7dbb00

Browse files
authored
chore: update typescript-eslint packages (#4696)
1 parent 8732881 commit f7dbb00

File tree

125 files changed

+223
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+223
-279
lines changed

.cursorignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
2+
.env
3+
.env.*
4+
.pulumi/*
5+
.idea/*
6+
.webiny/*
7+
.coverage/*

.eslintrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = {
4545
"ts-expect-error": false
4646
}
4747
],
48-
//"@typescript-eslint/no-restricted-types": "error",
48+
"@typescript-eslint/no-restricted-types": "error",
4949
"@typescript-eslint/no-use-before-define": 0,
5050
"@typescript-eslint/no-unused-vars": getNoUnusedVars(),
5151
"@typescript-eslint/no-var-requires": 0,
@@ -71,9 +71,9 @@ module.exports = {
7171
}
7272
]
7373
}
74-
]
75-
// TODO remove eventually in v6.0.0
76-
//"@typescript-eslint/no-require-imports": 0
74+
],
75+
"@typescript-eslint/no-unused-expressions": 0,
76+
"@typescript-eslint/no-require-imports": 0
7777
},
7878
settings: {
7979
react: {

cypress-tests/cypress/support/pageBuilder/reloadUntil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Cypress.Commands.add("reloadUntil", (callback, options = {}) => {
5454
}
5555
}
5656
return cy.log("Condition met, moving on...");
57-
} catch (err) {
57+
} catch {
5858
if (retries > MAX_RETRIES) {
5959
throw new Error(`retried too many times (${--retries})`);
6060
}

cypress-tests/cypress/support/reloadUntil/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Cypress.Commands.add("reloadUntil", (callback, options = {}) => {
4343
}
4444
}
4545
return cy.log("Condition met, moving on...");
46-
} catch (err) {
46+
} catch {
4747
if (retries > MAX_RETRIES) {
4848
throw new Error(`retried too many times (${--retries})`);
4949
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
"@types/prettier": "^2.7.3",
7474
"@types/react": "18.2.79",
7575
"@types/react-dom": "18.2.25",
76-
"@typescript-eslint/eslint-plugin": "^7.18.0",
77-
"@typescript-eslint/parser": "^7.18.0",
76+
"@typescript-eslint/eslint-plugin": "^8.39.1",
77+
"@typescript-eslint/parser": "^8.39.1",
7878
"adio": "^1.0.1",
7979
"axios": "^1.7.9",
8080
"babel-jest": "29.7.0",

packages/admin-ui/src/Tree/components/ItemContent.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { cn, makeDecoratable } from "~/utils";
33

4-
interface ItemContentProps extends React.HTMLAttributes<HTMLDivElement> {}
4+
export type ItemContentProps = React.HTMLAttributes<HTMLDivElement>;
55

66
const BaseItemContent = ({ children, className, ...props }: ItemContentProps) => {
77
return (
@@ -17,6 +17,4 @@ const BaseItemContent = ({ children, className, ...props }: ItemContentProps) =>
1717
);
1818
};
1919

20-
const ItemContent = makeDecoratable("TreeItemContent", BaseItemContent);
21-
22-
export { ItemContent, type ItemContentProps };
20+
export const ItemContent = makeDecoratable("TreeItemContent", BaseItemContent);

packages/admin-ui/src/Tree/presenters/TreePresenter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class TreePresenter<TData = unknown> implements ITreePresenter<TData> {
6969
data: item.data
7070
})
7171
);
72-
} catch (error) {
72+
} catch {
7373
this.nodes = [...oldNodes]; // Revert to old nodes in case of error
7474
}
7575
};

packages/api-apw/src/plugins/hooks/validateComment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const validateComment = ({ apw }: Pick<LifeCycleHookCallbackParams, "apw"
2121
}
2222
);
2323
}
24-
} catch (ex) {
24+
} catch {
2525
throw new WebinyError(
2626
`The"changeRequest" property in input is not properly formatted.`,
2727
"MALFORMED_CHANGE_REQUEST_ID",

packages/api-elasticsearch-tasks/src/tasks/createIndexes/createIndex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const createIndexFactory = (manager: IndexManager) => {
1111
if (exists) {
1212
return;
1313
}
14-
} catch (ex) {
14+
} catch {
1515
return;
1616
}
1717

packages/api-elasticsearch-tasks/src/tasks/dataSynchronization/entities/getElasticsearchEntity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const getElasticsearchEntity = (params: IGetElasticsearchEntityParams) =>
3333
case EntityType.FORM_BUILDER_SUBMISSION:
3434
return getByPredicate(createPredicate("fb", ["es", "form-submission"]));
3535
}
36-
} catch (ex) {}
36+
} catch {}
3737
throw new Error(`Unknown entity type "${type}".`);
3838
};
3939

0 commit comments

Comments
 (0)