Skip to content

Commit

Permalink
test: fix outdated snapshot tests (#3953)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Sep 17, 2024
1 parent eff4295 commit 7e6de58
Show file tree
Hide file tree
Showing 23 changed files with 219 additions and 810 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,6 @@ expression: invalidCustomInputComponents.jsx
```

# Diagnostics
```
invalidCustomInputComponents.options:7:5 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Found an unknown key `noLabelWithoutControl`.
5 │ "rules": {
6 │ "nursery": {
> 7 │ "noLabelWithoutControl": {
│ ^^^^^^^^^^^^^^^^^^^^^^^
8 │ "level": "error",
9 │ "options": {
i Known keys:
- recommended
- all
- noCommonJs
- noDuplicateCustomProperties
- noDuplicateElseIf
- noDuplicatedFields
- noDynamicNamespaceImportAccess
- noEnum
- noExportedImports
- noIrregularWhitespace
- noProcessEnv
- noRestrictedImports
- noRestrictedTypes
- noSecrets
- noStaticElementInteractions
- noSubstr
- noUnknownPseudoClass
- noUnknownPseudoElement
- noUselessEscapeInRegex
- noValueAtRule
- useAdjacentOverloadSignatures
- useAriaPropsSupportedByRole
- useConsistentCurlyBraces
- useConsistentMemberAccessibility
- useDeprecatedReason
- useImportRestrictions
- useSortedClasses
- useStrictMode
- useTrimStartEnd
- useValidAutocomplete
```

```
invalidCustomInputComponents.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand All @@ -68,7 +20,5 @@ invalidCustomInputComponents.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━
i Consider adding an accessible text content to the label element.
i Consider adding a `for` or `htmlFor` attribute to the label element or moving the input element to inside the label element.
```
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"nursery": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": ["CustomInput"],
"labelAttributes": [],
"labelComponents": []
}
}
}
}
}
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"a11y": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": [
"CustomInput"
],
"labelAttributes": [],
"labelComponents": []
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,6 @@ expression: invalidCustomLabelAttributes.jsx
```

# Diagnostics
```
invalidCustomLabelAttributes.options:7:5 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Found an unknown key `noLabelWithoutControl`.
5 │ "rules": {
6 │ "nursery": {
> 7 │ "noLabelWithoutControl": {
│ ^^^^^^^^^^^^^^^^^^^^^^^
8 │ "level": "error",
9 │ "options": {
i Known keys:
- recommended
- all
- noCommonJs
- noDuplicateCustomProperties
- noDuplicateElseIf
- noDuplicatedFields
- noDynamicNamespaceImportAccess
- noEnum
- noExportedImports
- noIrregularWhitespace
- noProcessEnv
- noRestrictedImports
- noRestrictedTypes
- noSecrets
- noStaticElementInteractions
- noSubstr
- noUnknownPseudoClass
- noUnknownPseudoElement
- noUselessEscapeInRegex
- noValueAtRule
- useAdjacentOverloadSignatures
- useAriaPropsSupportedByRole
- useConsistentCurlyBraces
- useConsistentMemberAccessibility
- useDeprecatedReason
- useImportRestrictions
- useSortedClasses
- useStrictMode
- useTrimStartEnd
- useValidAutocomplete
```

```
invalidCustomLabelAttributes.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand All @@ -66,8 +18,6 @@ invalidCustomLabelAttributes.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
2 │
i Consider adding an accessible text content to the label element.
i Consider adding a `for` or `htmlFor` attribute to the label element or moving the input element to inside the label element.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"nursery": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": [],
"labelAttributes": ["label"],
"labelComponents": []
}
}
}
}
}
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"a11y": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": [],
"labelAttributes": [
"label"
],
"labelComponents": []
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,15 @@ expression: invalidCustomLabelComponents.jsx

# Diagnostics
```
invalidCustomLabelComponents.options:7:5 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalidCustomLabelComponents.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Found an unknown key `noLabelWithoutControl`.
! A form label must be associated with an input.
5 │ "rules": {
6 │ "nursery": {
> 7 │ "noLabelWithoutControl": {
│ ^^^^^^^^^^^^^^^^^^^^^^^
8 │ "level": "error",
9 │ "options": {
> 1 │ <CustomLabel aria-label="A label" />;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │
i Known keys:
- recommended
- all
- noCommonJs
- noDuplicateCustomProperties
- noDuplicateElseIf
- noDuplicatedFields
- noDynamicNamespaceImportAccess
- noEnum
- noExportedImports
- noIrregularWhitespace
- noProcessEnv
- noRestrictedImports
- noRestrictedTypes
- noSecrets
- noStaticElementInteractions
- noSubstr
- noUnknownPseudoClass
- noUnknownPseudoElement
- noUselessEscapeInRegex
- noValueAtRule
- useAdjacentOverloadSignatures
- useAriaPropsSupportedByRole
- useConsistentCurlyBraces
- useConsistentMemberAccessibility
- useDeprecatedReason
- useImportRestrictions
- useSortedClasses
- useStrictMode
- useTrimStartEnd
- useValidAutocomplete
i Consider adding a `for` or `htmlFor` attribute to the label element or moving the input element to inside the label element.
```
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"nursery": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": [],
"labelAttributes": [],
"labelComponents": ["CustomLabel"]
}
}
}
}
}
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"a11y": {
"noLabelWithoutControl": {
"level": "error",
"options": {
"inputComponents": [],
"labelAttributes": [],
"labelComponents": [
"CustomLabel"
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,31 @@ expression: invalidCustomOptions.jsx

# Diagnostics
```
invalidCustomOptions.options:7:5 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalidCustomOptions.jsx:1:1 lint/a11y/noLabelWithoutControl ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Found an unknown key `noLabelWithoutControl`.
! A form label must be associated with an input.
5 │ "rules": {
6 │ "nursery": {
> 7 │ "noLabelWithoutControl": {
│ ^^^^^^^^^^^^^^^^^^^^^^^
8 │ "level": "error",
9 │ "options": {
> 1 │ <CustomLabel><span><CustomInput /></span></CustomLabel>;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │ <CustomLabel aria-label="A label" />;
3 │
i Known keys:
i Consider adding an accessible text content to the label element.
- recommended
- all
- noCommonJs
- noDuplicateCustomProperties
- noDuplicateElseIf
- noDuplicatedFields
- noDynamicNamespaceImportAccess
- noEnum
- noExportedImports
- noIrregularWhitespace
- noProcessEnv
- noRestrictedImports
- noRestrictedTypes
- noSecrets
- noStaticElementInteractions
- noSubstr
- noUnknownPseudoClass
- noUnknownPseudoElement
- noUselessEscapeInRegex
- noValueAtRule
- useAdjacentOverloadSignatures
- useAriaPropsSupportedByRole
- useConsistentCurlyBraces
- useConsistentMemberAccessibility
- useDeprecatedReason
- useImportRestrictions
- useSortedClasses
- useStrictMode
- useTrimStartEnd
- useValidAutocomplete
```

```
invalidCustomOptions.jsx:2:1 lint/a11y/noLabelWithoutControl ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! A form label must be associated with an input.
1 │ <CustomLabel><span><CustomInput /></span></CustomLabel>;
> 2 │ <CustomLabel aria-label="A label" />;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │
i Consider adding a `for` or `htmlFor` attribute to the label element or moving the input element to inside the label element.
```
Loading

0 comments on commit 7e6de58

Please sign in to comment.