Skip to content

Commit

Permalink
Chore: Apply lint suggestions to compat api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bruiztorres committed Jan 4, 2019
1 parent e687f10 commit 8f0f05c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
32 changes: 19 additions & 13 deletions packages/hint-compat-api/docs/compat-api-html-next.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ supported in the [targeted browsers][browser-context].

## Why is this important?

New HTML elements and attributes are being implemented all the time. It's tricky knowing when an element or attribute has become standard among all browsers. This hint will check if you are using elements or attributes that are not supported by your targeted browsers.
New HTML elements and attributes are being implemented all the time.
It's tricky knowing when an element or attribute has become standard
among all browsers. This hint will check if you are using elements or
attributes that are not supported by your targeted browsers.

### Examples that **trigger** the hint

Expand All @@ -26,24 +29,25 @@ Internet Explorer browsers of any version will trigger the hint.
<img srcset="foo.jpg, bar.jpg">
```

The [video][video] element and its `autoplay` attribute was added for versions of
Internet Explorer 9 and onwards. Targeting versions of Internet Explorer
The [video][video] element and its `autoplay` attribute was added for versions
of Internet Explorer 9 and onwards. Targeting versions of Internet Explorer
below version 9 will trigger the hint for the element and its attribute.

```html
<video autoplay></video>
```

The [input type][input-type] [`color`][input-type-color] was not added for any version of Internet Explorer. Targeting any version of Internet Explorer
The [input type][input-type] [`color`][input-type-color] was not added for any
version of Internet Explorer. Targeting any version of Internet Explorer
will trigger the hint for this input type.

```html
<input type="color">
```
The [global attribute][global-attr] `class` was added for versions of Firefox 32 and onwards.
Targeting versions of Firefox below version 32 till trigger the hint for
the attribute.

The [global attribute][global-attr] `class` was added for versions of Firefox
32 and onwards. Targeting versions of Firefox below version 32 till trigger
the hint for the attribute.

```html
<div class="foobar"></div>
Expand All @@ -59,7 +63,8 @@ It will pass the hint regardless of whatever the targeted browsers are.
<div></div>
```

The [global attribute][global-attr] `class` has been added for all versions of all browsers except Firefox and Firefox Android. Targeted browsers that are not
The [global attribute][global-attr] `class` has been added for all versions of
all browsers except Firefox and Firefox Android. Targeted browsers that are not
Firefox will pass the hint regardless of their version.

```html
Expand All @@ -68,15 +73,16 @@ Firefox will pass the hint regardless of their version.
```

The `alt` attribute of the [img][img] element has been added for all versions
of all browsers. It will pass the hint regardless of whatever the targeted browsers are.
of all browsers. It will pass the hint regardless of whatever the targeted
browsers are.

```html
<img alt="mountains">
```

The [video][video] element and its `autoplay` attribute was added for versions of
Internet Explorer 9 and onwards. Versions of Internet Explorer
from version 9 onwards will pass the hint.
The [video][video] element and its `autoplay` attribute was added for versions
of Internet Explorer 9 and onwards. Versions of Internet Explorer from version
9 onwards will pass the hint.

```html
<video autoplay></video>
Expand Down
16 changes: 8 additions & 8 deletions packages/hint-compat-api/docs/compat-api-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## What does the hint check?

`compat-api-html` checks if the HTML elements and attributes used are deprecated in the
[targeted browsers][browser-context].
`compat-api-html` checks if the HTML elements and attributes used are
deprecated in the [targeted browsers][browser-context].

## Why is this important?

Expand All @@ -23,26 +23,26 @@ Targeting Firefox browsers of versions 22 and up will trigger the hint.
```

The `scoped` attribute of the [style][style] element is deprecated
and was removed in Firefox 55. Targeting Firefox browsers of versions
55 and up will trigger the hint.
and was removed in Firefox 55. Targeting Firefox versions 55 and up
will trigger the hint.

```html
<style scoped>
h1 {color:red;}
</style>
```

The global attribute [contextmenu][contextmenu] was removed
from Firefox Android 56. Targeting Firefox Android browsers
of versions 56 and up will trigger the hint.
The global attribute [contextmenu][contextmenu] was removed from Firefox 56
for Android. Targeting Firefox for Android browsers of versions 56 and up
will trigger the hint.

```html
<body contextmenu="share"></body>
```

### Examples that **pass** the hint

The [div][div] element was never removed for any browser.
The [div][div] element was never removed by any browser.
It should always pass the hint.

```html
Expand Down

0 comments on commit 8f0f05c

Please sign in to comment.