From fbdb24c929b7140d0f66d04778fec63ba4efb038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Sat, 31 Mar 2018 09:11:32 +0000 Subject: [PATCH] fix: be compatible with node 6 --- .eslintrc.js | 2 +- react.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index c3e0bf9..c1927db 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ['./index.js'], + extends: ['./index.js', './react.js'], } diff --git a/react.js b/react.js index 776b397..5e90340 100644 --- a/react.js +++ b/react.js @@ -2,9 +2,7 @@ const baseRules = require('./index').rules module.exports = { extends: ['airbnb', 'prettier', 'prettier/react'], - rules: { - ...baseRules, - + rules: Object.assign(baseRules, { 'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], 'react/prop-types': 'off', 'react/sort-comp': 'off', @@ -15,5 +13,5 @@ module.exports = { 'jsx-a11y/anchor-is-valid': 'off', 'jsx-a11y/anchor-has-content': 'off', - }, + }), }