Skip to content

Commit 1f23aa6

Browse files
nicolethoenclaude
andcommitted
chore: cleanup lint config, add node engine, improve SerialConsoleActions styles
- Target md files directly in lint:md command instead of ignoring non-md - Add .eslintcache to eslint ignores - Add engines.node >= 22 to package.json - Use gap instead of per-button marginRight in SerialConsoleActions - Update snapshots Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e1e89e commit 1f23aa6

8 files changed

Lines changed: 21 additions & 24 deletions

File tree

eslint-md.config.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ export default [
99
'**/.cache/**',
1010
'**/node_modules/**',
1111
'**/generated/**',
12-
'**/CHANGELOG.md',
13-
'**/*.js',
14-
'**/*.jsx',
15-
'**/*.ts',
16-
'**/*.tsx'
12+
'**/CHANGELOG.md'
1713
]
1814
},
1915
{

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default [
1818
'**/.changelog/**',
1919
'**/coverage/**',
2020
'**/.tmp/**',
21-
'**/generated/**'
21+
'**/generated/**',
22+
'**/.eslintcache'
2223
]
2324
},
2425
js.configs.recommended,

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"workspaces": [
88
"packages/*"
99
],
10+
"engines": {
11+
"node": ">=22"
12+
},
1013
"scripts": {
1114
"build": "yarn workspace @patternfly/react-console build",
1215
"build:watch": "npm run build:watch -w @patternfly/react-console",
@@ -15,7 +18,7 @@
1518
"serve:docs": "yarn workspace @patternfly/react-console docs:serve",
1619
"clean": "yarn workspace @patternfly/react-console clean",
1720
"lint:js": "node --max-old-space-size=4096 node_modules/.bin/eslint packages --cache",
18-
"lint:md": "yarn eslint packages --config eslint-md.config.mjs --cache",
21+
"lint:md": "yarn eslint \"packages/**/*.md\" --config eslint-md.config.mjs --cache",
1922
"lint": "yarn lint:js && yarn lint:md",
2023
"test": "TZ=EST jest packages",
2124
"test:a11y": "yarn workspace @patternfly/react-console test:a11y",

packages/module/src/components/AccessConsoles/__snapshots__/AccessConsoles.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`AccessConsoles Empty 1`] = `
44
<DocumentFragment>

packages/module/src/components/SerialConsole/SerialConsoleActions.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ export const SerialConsoleActions: React.FunctionComponent<SerialConsoleActionsP
1414
}: SerialConsoleActionsProps) => (
1515
<div
1616
className="console-actions-serial"
17-
style={{ gridArea: 'actions-extra', display: 'flex', justifyContent: 'flex-end' }}
17+
style={{
18+
gridArea: 'actions-extra',
19+
display: 'flex',
20+
justifyContent: 'flex-end',
21+
gap: 'var(--pf-t--global--spacer--sm)'
22+
}}
1823
>
19-
<Button variant="secondary" onClick={props.onDisconnect} style={{ marginRight: 'var(--pf-t--global--spacer--sm)' }}>
24+
<Button variant="secondary" onClick={props.onDisconnect}>
2025
{textDisconnect}
2126
</Button>
22-
<Button variant="secondary" onClick={props.onReset} style={{ marginRight: 'var(--pf-t--global--spacer--sm)' }}>
27+
<Button variant="secondary" onClick={props.onReset}>
2328
{textReset}
2429
</Button>
2530
</div>

packages/module/src/components/SerialConsole/__snapshots__/SerialConsole.test.tsx.snap

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,13 @@ exports[`SerialConsole in the LOADING state 1`] = `
5252
<DocumentFragment>
5353
<div
5454
class="console-actions-serial"
55-
style="grid-area: actions-extra; display: flex; justify-content: flex-end;"
55+
style="grid-area: actions-extra; display: flex; justify-content: flex-end; gap: var(--pf-t--global--spacer--sm);"
5656
>
5757
<button
5858
class="pf-v6-c-button pf-m-secondary"
5959
data-ouia-component-id="OUIA-Generated-Button-secondary-1"
6060
data-ouia-component-type="PF6/Button"
6161
data-ouia-safe="true"
62-
style="margin-right: var(--pf-t--global--spacer--sm);"
6362
type="button"
6463
>
6564
<span
@@ -73,7 +72,6 @@ exports[`SerialConsole in the LOADING state 1`] = `
7372
data-ouia-component-id="OUIA-Generated-Button-secondary-2"
7473
data-ouia-component-type="PF6/Button"
7574
data-ouia-safe="true"
76-
style="margin-right: var(--pf-t--global--spacer--sm);"
7775
type="button"
7876
>
7977
<span
@@ -136,14 +134,13 @@ exports[`SerialConsole with CONNECTED state renders 1`] = `
136134
<DocumentFragment>
137135
<div
138136
class="console-actions-serial"
139-
style="grid-area: actions-extra; display: flex; justify-content: flex-end;"
137+
style="grid-area: actions-extra; display: flex; justify-content: flex-end; gap: var(--pf-t--global--spacer--sm);"
140138
>
141139
<button
142140
class="pf-v6-c-button pf-m-secondary"
143141
data-ouia-component-id="OUIA-Generated-Button-secondary-3"
144142
data-ouia-component-type="PF6/Button"
145143
data-ouia-safe="true"
146-
style="margin-right: var(--pf-t--global--spacer--sm);"
147144
type="button"
148145
>
149146
<span
@@ -157,7 +154,6 @@ exports[`SerialConsole with CONNECTED state renders 1`] = `
157154
data-ouia-component-id="OUIA-Generated-Button-secondary-4"
158155
data-ouia-component-type="PF6/Button"
159156
data-ouia-safe="true"
160-
style="margin-right: var(--pf-t--global--spacer--sm);"
161157
type="button"
162158
>
163159
<span

packages/module/src/components/SerialConsole/__snapshots__/SerialConsoleActions.test.tsx.snap

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ exports[`Render SerialConsoleActions 1`] = `
44
<DocumentFragment>
55
<div
66
class="console-actions-serial"
7-
style="grid-area: actions-extra; display: flex; justify-content: flex-end;"
7+
style="grid-area: actions-extra; display: flex; justify-content: flex-end; gap: var(--pf-t--global--spacer--sm);"
88
>
99
<button
1010
class="pf-v6-c-button pf-m-secondary"
1111
data-ouia-component-id="OUIA-Generated-Button-secondary-1"
1212
data-ouia-component-type="PF6/Button"
1313
data-ouia-safe="true"
14-
style="margin-right: var(--pf-t--global--spacer--sm);"
1514
type="button"
1615
>
1716
<span
@@ -25,7 +24,6 @@ exports[`Render SerialConsoleActions 1`] = `
2524
data-ouia-component-id="OUIA-Generated-Button-secondary-2"
2625
data-ouia-component-type="PF6/Button"
2726
data-ouia-safe="true"
28-
style="margin-right: var(--pf-t--global--spacer--sm);"
2927
type="button"
3028
>
3129
<span
@@ -42,14 +40,13 @@ exports[`Render SerialConsoleActions with custom texts 1`] = `
4240
<DocumentFragment>
4341
<div
4442
class="console-actions-serial"
45-
style="grid-area: actions-extra; display: flex; justify-content: flex-end;"
43+
style="grid-area: actions-extra; display: flex; justify-content: flex-end; gap: var(--pf-t--global--spacer--sm);"
4644
>
4745
<button
4846
class="pf-v6-c-button pf-m-secondary"
4947
data-ouia-component-id="OUIA-Generated-Button-secondary-3"
5048
data-ouia-component-type="PF6/Button"
5149
data-ouia-safe="true"
52-
style="margin-right: var(--pf-t--global--spacer--sm);"
5350
type="button"
5451
>
5552
<span
@@ -63,7 +60,6 @@ exports[`Render SerialConsoleActions with custom texts 1`] = `
6360
data-ouia-component-id="OUIA-Generated-Button-secondary-4"
6461
data-ouia-component-type="PF6/Button"
6562
data-ouia-safe="true"
66-
style="margin-right: var(--pf-t--global--spacer--sm);"
6763
type="button"
6864
>
6965
<span

packages/module/src/components/VncConsole/__snapshots__/VncConsole.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`placeholder render test 1`] = `
44
<DocumentFragment>

0 commit comments

Comments
 (0)