Skip to content

Commit a3b4437

Browse files
committed
lint: make js code block standalone-parseable + fix test property order
- docs/rules/template-require-iframe-title.md: wrap the config example in `module.exports = {...}` so eslint can parse it as a standalone module (bare object literals are parsed as block statements, which trips 'missing semicolon' on the inner object). - tests/lib/rules/template-require-iframe-title.js: move `output` before `options` on the allowWhitespaceOnlyTitle test case to match eslint-plugin/test-case-property-ordering's [code, output, options, errors] sequence. - Prettier reflow of the config example (single-line rule array) applied via `prettier --write`.
1 parent 1e7f1f0 commit a3b4437

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

docs/rules/template-require-iframe-title.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
`<iframe>` elements must have a unique title property so assistive
1010
technology can convey their content to the user. The normative
1111
requirement is [WCAG SC 4.1.2 (Name, Role, Value)](https://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html);
12-
the `title` attribute is *one sufficient technique* for meeting it
12+
the `title` attribute is _one sufficient technique_ for meeting it
1313
(sufficient technique [H64](https://www.w3.org/WAI/WCAG21/Techniques/html/H64)).
1414

1515
## Examples
@@ -50,14 +50,11 @@ true` if your codebase needs it.
5050
still flagged.
5151

5252
```js
53-
{
53+
module.exports = {
5454
rules: {
55-
'ember/template-require-iframe-title': [
56-
'error',
57-
{ allowWhitespaceOnlyTitle: true },
58-
],
55+
'ember/template-require-iframe-title': ['error', { allowWhitespaceOnlyTitle: true }],
5956
},
60-
}
57+
};
6158
```
6259

6360
## References

tests/lib/rules/template-require-iframe-title.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ ruleTester.run('template-require-iframe-title', rule, {
152152
// (an empty string is not a whitespace string).
153153
{
154154
code: '<template><iframe title="" /></template>',
155-
options: [{ allowWhitespaceOnlyTitle: true }],
156155
output: null,
156+
options: [{ allowWhitespaceOnlyTitle: true }],
157157
errors: [{ messageId: 'emptyTitle' }],
158158
},
159159
],

0 commit comments

Comments
 (0)