Skip to content

Commit 975424b

Browse files
dependabot[bot]matifaliBrunoQuaresma
authored
chore: bump the eslint group in /site with 5 updates (coder#8636)
* chore: bump the eslint group in /site with 5 updates Bumps the eslint group in /site with 5 updates: | Package | Update | | --- | --- | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | 5.62.0 to 6.1.0 | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | 5.62.0 to 6.1.0 | | [eslint](https://github.com/eslint/eslint) | 8.44.0 to 8.45.0 | | [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | 7.31.1 to 7.33.0 | | [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) | 47.0.0 to 48.0.0 | Updates `@typescript-eslint/eslint-plugin` from 5.62.0 to 6.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.1.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 5.62.0 to 6.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.1.0/packages/parser) Updates `eslint` from 8.44.0 to 8.45.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.44.0...v8.45.0) Updates `eslint-plugin-react` from 7.31.1 to 7.33.0 - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.31.1...v7.33.0) Updates `eslint-plugin-unicorn` from 47.0.0 to 48.0.0 - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](sindresorhus/eslint-plugin-unicorn@v47.0.0...v48.0.0) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-major dependency-group: eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-major dependency-group: eslint - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-major dependency-group: eslint ... Signed-off-by: dependabot[bot] <support@github.com> * ignore no-redundant-type-constituents * Fix minor lint errors * Discard changes to site/.eslintrc.yaml * Fix redudant types --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Atif Ali <atif@coder.com> Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com> Co-authored-by: Muhammad Atif Ali <matifali@live.com>
1 parent 92798e9 commit 975424b

Some content is hidden

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

42 files changed

+213
-164
lines changed

site/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,22 @@
129129
"@types/react-window": "1.8.5",
130130
"@types/ua-parser-js": "0.7.36",
131131
"@types/uuid": "9.0.2",
132-
"@typescript-eslint/eslint-plugin": "5.62.0",
133-
"@typescript-eslint/parser": "5.62.0",
132+
"@typescript-eslint/eslint-plugin": "6.1.0",
133+
"@typescript-eslint/parser": "6.1.0",
134134
"@xstate/cli": "0.5.2",
135135
"chromatic": "6.20.0",
136-
"eslint": "8.44.0",
136+
"eslint": "8.45.0",
137137
"eslint-config-prettier": "8.8.0",
138138
"eslint-import-resolver-typescript": "3.5.5",
139139
"eslint-plugin-compat": "4.1.4",
140140
"eslint-plugin-eslint-comments": "3.2.0",
141141
"eslint-plugin-import": "2.27.5",
142142
"eslint-plugin-jest": "27.2.2",
143143
"eslint-plugin-jsx-a11y": "6.7.1",
144-
"eslint-plugin-react": "7.31.1",
144+
"eslint-plugin-react": "7.33.0",
145145
"eslint-plugin-react-hooks": "4.6.0",
146146
"eslint-plugin-storybook": "0.6.12",
147-
"eslint-plugin-unicorn": "47.0.0",
147+
"eslint-plugin-unicorn": "48.0.0",
148148
"jest": "29.5.0",
149149
"jest-canvas-mock": "2.4.0",
150150
"jest-fetch-mock": "3.0.3",

site/src/api/errors.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const mapApiErrorToFieldErrors = (
5959
* @returns error's message if ApiError or Error, else defaultMessage
6060
*/
6161
export const getErrorMessage = (
62-
error: Error | ApiError | unknown,
62+
error: unknown,
6363
defaultMessage: string,
6464
): string =>
6565
isApiError(error)
@@ -74,19 +74,15 @@ export const getErrorMessage = (
7474
* @returns a combined validation error message if the error is an ApiError
7575
* and contains validation messages for different form fields.
7676
*/
77-
export const getValidationErrorMessage = (
78-
error: Error | ApiError | unknown,
79-
): string => {
77+
export const getValidationErrorMessage = (error: unknown): string => {
8078
const validationErrors =
8179
isApiError(error) && error.response.data.validations
8280
? error.response.data.validations
8381
: []
8482
return validationErrors.map((error) => error.detail).join("\n")
8583
}
8684

87-
export const getErrorDetail = (
88-
error: Error | ApiError | unknown,
89-
): string | undefined | null =>
85+
export const getErrorDetail = (error: unknown): string | undefined | null =>
9086
isApiError(error)
9187
? error.response.data.detail
9288
: error instanceof Error

site/src/components/AuditLogRow/AuditLogDiff/AuditLogDiff.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getDiffValue = (value: unknown): string => {
1919
return "null"
2020
}
2121

22-
return value.toString()
22+
return String(value)
2323
}
2424

2525
export const AuditLogDiff: FC<{ diff: AuditLog["diff"] }> = ({ diff }) => {

site/src/components/DeploySettingsLayout/Option.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { makeStyles } from "@mui/styles"
2-
import { PropsWithChildren, FC, ReactNode } from "react"
2+
import { PropsWithChildren, FC } from "react"
33
import { MONOSPACE_FONT_FAMILY } from "theme/constants"
44
import { DisabledBadge, EnabledBadge } from "./Badges"
55

@@ -19,9 +19,7 @@ const NotSet: FC = () => {
1919
return <span className={styles.optionValue}>Not set</span>
2020
}
2121

22-
export const OptionValue: FC<{ children?: ReactNode | unknown }> = ({
23-
children,
24-
}) => {
22+
export const OptionValue: FC<{ children?: unknown }> = ({ children }) => {
2523
const styles = useStyles()
2624

2725
if (typeof children === "boolean") {

site/src/components/DeploySettingsLayout/Options.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const defaultOption: DeploymentOption = {
1313
describe("optionValue", () => {
1414
it.each<{
1515
option: DeploymentOption
16-
expected: string | string[] | unknown
16+
expected: unknown
1717
}>([
1818
{
1919
option: {

site/src/components/DeploySettingsLayout/OptionsTable.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ const OptionsTable: FC<{
6262
}
6363

6464
// optionValue is a helper function to format the value of a specific deployment options
65-
export function optionValue(
66-
option: DeploymentOption,
67-
): string[] | string | unknown {
65+
export function optionValue(option: DeploymentOption) {
6866
switch (option.name) {
6967
case "Max Token Lifetime":
7068
case "Session Duration":

site/src/components/Icons/VSCodeIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const VSCodeIcon = (props: SvgIconProps) => (
55
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
66
<mask
77
id="vscode_mask0"
8-
mask-type="alpha"
8+
style={{ maskType: "alpha" }}
99
maskUnits="userSpaceOnUse"
1010
x="0"
1111
y="0"

site/src/components/Icons/VSCodeInsidersIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const VSCodeInsidersIcon = (props: SvgIconProps) => (
1111
>
1212
<mask
1313
id="mask0"
14-
mask-type="alpha"
14+
style={{ maskType: "alpha" }}
1515
maskUnits="userSpaceOnUse"
1616
x="0"
1717
y="0"

site/src/components/LicenseBanner/LicenseBannerView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const LicenseBannerView: React.FC<LicenseBannerViewProps> = ({
6565
<Expander expanded={showDetails} setExpanded={setShowDetails}>
6666
<ul className={styles.list}>
6767
{messages.map((message) => (
68-
<li className={styles.listItem} key={`${message}`}>
68+
<li className={styles.listItem} key={message}>
6969
{message}
7070
</li>
7171
))}

site/src/components/ServiceBanner/ServiceBannerView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const ServiceBannerView: React.FC<ServiceBannerViewProps> = ({
3131
]
3232
return (
3333
<div
34-
className={`${styles.container}`}
34+
className={styles.container}
3535
style={{ backgroundColor: backgroundColor }}
3636
>
3737
{preview && <Pill text="Preview" type="info" lightBorder />}

0 commit comments

Comments
 (0)