Skip to content

Commit

Permalink
add caniuse Object.values support (#171)
Browse files Browse the repository at this point in the history
* add caniuse Object.values support

* update CHANGELOG and remove appveyor support
  • Loading branch information
amilajack committed Feb 8, 2019
1 parent e1fbbc2 commit 78b19c3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
language: node_js

os:
- linux
- windows

node_js:
- node
- 8

cache: yarn

matrix:
allow_failures:
- os: windows
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## v2.6.2
### Fixed
- Bumped deps
## v2.7.0
### Added
- `Object.values()` support

## v2.6.1
### Fixed
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
eslint-plugin-compat
=====================
[![Build Status](https://travis-ci.org/amilajack/eslint-plugin-compat.svg?branch=master)](https://travis-ci.org/amilajack/eslint-plugin-compat)
[![Build status](https://ci.appveyor.com/api/projects/status/at71r1stbghsgcja/branch/master?svg=true)](https://ci.appveyor.com/project/amilajack/eslint-plugin-compat/branch/master)
[![NPM version](https://badge.fury.io/js/eslint-plugin-compat.svg)](http://badge.fury.io/js/eslint-plugin-compat)
[![Dependency Status](https://img.shields.io/david/amilajack/eslint-plugin-compat.svg)](https://david-dm.org/amilajack/eslint-plugin-compat)
[![npm](https://img.shields.io/npm/dm/eslint-plugin-compat.svg)](https://npm-stat.com/charts.html?package=eslint-plugin-compat)
Expand Down
6 changes: 6 additions & 0 deletions src/providers/CanIUseProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ const CanIUseProvider: Array<Node> = [
ASTNodeType: 'MemberExpression',
object: 'performance',
property: 'now'
},
{
id: 'object-values',
ASTNodeType: 'MemberExpression',
object: 'Object',
property: 'values'
}
].map(rule =>
Object.assign({}, rule, {
Expand Down
10 changes: 10 additions & 0 deletions test/e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ ruleTester.run('compat', rule, {
// type: 'MemberExpression'
// }]
// },
{
code: 'Object.values({})',
settings: { browsers: ['safari 9'] },
errors: [
{
message: 'Object.values() is not supported in Safari 9',
type: 'MemberExpression'
}
]
},
{
code: 'new ServiceWorker()',
settings: { browsers: ['chrome 31'] },
Expand Down

0 comments on commit 78b19c3

Please sign in to comment.