Skip to content

Commit

Permalink
Breaking: Use browserslist defaults
Browse files Browse the repository at this point in the history
Use browserslist defaults instead of our own when none are specified.
Update the documentation related to this property as well as the tests
of rules that use it.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #452

Close #453
Close #451
  • Loading branch information
Anton Molleda authored and alrra committed Aug 24, 2017
1 parent e283f8e commit c030799
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 943 deletions.
18 changes: 15 additions & 3 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ your `.sonarrc` file.
## Browser configuration

`sonar` allows you to define your browser support matrix by adding
the property `browserlist` to your `.sonarrc` file. This property
follows the same convention as [`browserlist`][browserslist]:
the property `browserslist` to your `.sonarrc` file. This property
follows the same convention as [`browserslist`][browserslist]:

```json
{
Expand All @@ -217,6 +217,17 @@ versions of IE prior IE10, or tell you to remove that tag or header
it you only need IE11+ because document modes were removed at that
version.

If no value is defined, [`browserslist`'s defaults][browserslist defaults] will
be used:

```js
browserslist.defaults = [
'> 1%',
'last 2 versions',
'Firefox ESR'
];
```

## Connectors

A `connector` is the interface between the `rule`s and the website
Expand Down Expand Up @@ -262,7 +273,8 @@ to know more.

<!-- Link labels: -->

[browserlist]: https://github.com/ai/browserslist
[browserslist]: https://github.com/ai/browserslist
[browserslist defaults]: https://github.com/ai/browserslist/blob/3b8e4abfbfe36d01859a0e70292106be0fe70c8f/index.js#L303
[homebrew]: https://brew.sh/
[nodejs]: https://nodejs.org/en/download/current/
[npm change default directory]: https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory
Expand Down

0 comments on commit c030799

Please sign in to comment.