Skip to content

Commit 0b48e69

Browse files
committed
Sync with ember-template-lint
1 parent c6b00b7 commit 0b48e69

2 files changed

Lines changed: 14 additions & 15 deletions

File tree

docs/rules/template-no-quoteless-attributes.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ In HTML, all attribute values are considered strings, regardless of whether they
88

99
The following two examples are _identical_ from the perspective of the browser:
1010

11-
```gjs
12-
<template>
13-
<div data-foo=asdf></div>
14-
<div data-foo="asdf"></div>
15-
</template>
11+
<!-- prettier-ignore -->
12+
```html
13+
<div data-foo=asdf></div>
14+
<div data-foo="asdf"></div>
1615
```
1716

1817
This fact makes the following HTML very confusing:
1918

20-
```gjs
21-
<template><input disabled="false" /></template>
19+
<!-- prettier-ignore -->
20+
```html
21+
<input disabled=false>
2222
```
2323

2424
In this case, the simple _presence_ of the `disabled` attribute means that the `<input>` is disabled and setting the value to `false` doesn't do the obvious thing.
@@ -31,18 +31,19 @@ This rule attempts to make this situation _slightly_ better by at least ensuring
3131

3232
This rule **forbids** the following (note that `someValue` could have been intended either as a string or expression):
3333

34-
```gjs
35-
<template><div data-foo=someValue></div></template>
34+
<!-- prettier-ignore -->
35+
```html
36+
<div data-foo=someValue></div>
3637
```
3738

3839
This rule **allows** the following:
3940

40-
```gjs
41-
<template><div data-foo="someValue"></div></template>
41+
```html
42+
<div data-foo="someValue"></div>
4243
```
4344

44-
```gjs
45-
<template><div data-foo={{someValue}}></div></template>
45+
```hbs
46+
<div data-foo={{someValue}}></div>
4647
```
4748

4849
## References

lib/rules/template-no-quoteless-attributes.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ module.exports = {
55
docs: {
66
description: 'require quotes on all attribute values',
77
category: 'Style',
8-
recommendedGjs: false,
9-
recommendedGts: false,
108
url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/template-no-quoteless-attributes.md',
119
templateMode: 'both',
1210
},

0 commit comments

Comments
 (0)