Skip to content

Commit ad98370

Browse files
committed
chore: clean up lint errors
1 parent 4907e80 commit ad98370

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,14 @@ const config = defineConfig([
385385
'primer-react/no-unnecessary-components': 'off',
386386
},
387387
},
388+
{
389+
files: ['packages/styled-react/**/*.test.{ts,tsx}'],
390+
rules: {
391+
'github/a11y-aria-label-is-well-formatted': 'off',
392+
'github/a11y-svg-has-accessible-name': 'off',
393+
'primer-react/direct-slot-children': 'off',
394+
},
395+
},
388396
])
389397

390398
export default tseslint.config(config)

packages/styled-react/src/__tests__/primer-react.browser.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,11 @@ describe('@primer/react', () => {
320320
})
321321

322322
test('RadioGroup supports `sx` prop', () => {
323-
const {container} = render(<RadioGroup data-testid="component" name="test" sx={{background: 'red'}} />)
323+
const {container} = render(
324+
<RadioGroup data-testid="component" name="test" sx={{background: 'red'}}>
325+
<RadioGroup.Label>test</RadioGroup.Label>
326+
</RadioGroup>,
327+
)
324328
expect(window.getComputedStyle(container.firstElementChild!.firstElementChild!).backgroundColor).toBe(
325329
'rgb(255, 0, 0)',
326330
)
@@ -381,7 +385,7 @@ describe('@primer/react', () => {
381385
})
382386

383387
test('TextInput.Action supports `sx` prop', () => {
384-
render(<TextInput.Action sx={{background: 'red'}} />)
388+
render(<TextInput.Action aria-label="test" sx={{background: 'red'}} />)
385389
expect(window.getComputedStyle(screen.getByRole('button')).backgroundColor).toBe('rgb(255, 0, 0)')
386390
})
387391

packages/styled-react/vitest.config.browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import path from 'node:path'
21
import react from '@vitejs/plugin-react'
32
import {defineConfig} from 'vitest/config'
43

0 commit comments

Comments
 (0)