diff --git a/.eslintrc b/.eslintrc index 5209bd9cfb7284febd24237ebe8a47124fc1622d..ae9f2234fbda6b8765a969d6a1f80dbd26b6857e 100755 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,7 @@ { "parser": "babel-eslint", "extends": "airbnb", + "plugins": ["compat"], "env": { "browser": true, "node": true, @@ -43,11 +44,15 @@ "object-curly-newline": [0], "function-paren-newline": [0], "no-restricted-globals": [0], - "require-yield": [1] + "require-yield": [1], + "compat/compat": "error" }, "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true } + }, + "settings": { + "polyfills": ["fetch"] } } diff --git a/package.json b/package.json index 2632343ed6d5eda5e4ee78e1110ba2bb96013653..1a728320cfe63b96d7f193369f8021cc77879459 100755 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "eslint": "^4.8.0", "eslint-config-airbnb": "^16.0.0", "eslint-plugin-babel": "^4.0.0", + "eslint-plugin-compat": "^2.1.0", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^6.0.0", "eslint-plugin-markdown": "^1.0.0-beta.6", @@ -107,5 +108,10 @@ "lint-staged": { "**/*.{js,jsx}": "lint-staged:js", "**/*.less": "stylelint --syntax less" - } + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ] }