From 1112cf99a78398c124b10ef305826b86cbfeda94 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 22 Oct 2019 20:27:11 +0200 Subject: [PATCH] fix: Remove Symbol usage for older environments --- .babelrc | 10 +++++----- .eslintrc | 8 ++++++++ package.json | 27 ++++++++++++++++----------- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/.babelrc b/.babelrc index bede9352..de1795f6 100644 --- a/.babelrc +++ b/.babelrc @@ -1,7 +1,7 @@ { - "presets": ["es2015"], - "plugins": [ - "transform-object-rest-spread", - "transform-flow-strip-types", - ] + "presets": [ + ["@babel/preset-env", { "useBuiltIns": false }], + "@babel/preset-flow" + ], + "plugins": [["@babel/plugin-transform-runtime", { "corejs": 3 }]] } diff --git a/.eslintrc b/.eslintrc index 137efbee..1d9deae6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,6 +3,14 @@ "plugin:flowtype/recommended" ], parser: "babel-eslint", + // https://github.com/eslint/eslint/issues/4344#issuecomment-197344872 + parserOptions: { + ecmaVersion: 6, + sourceType: "module", + ecmaFeatures: { + modules: true + } + }, plugins: [ "flowtype" ], diff --git a/package.json b/package.json index 1432a363..82cbd0c5 100644 --- a/package.json +++ b/package.json @@ -32,25 +32,24 @@ }, "homepage": "https://github.com/A11yance/aria-query#readme", "devDependencies": { - "babel-cli": "^6.18.0", - "babel-core": "^6.21.0", - "babel-eslint": "^7.1.1", - "babel-jest": "^18.0.0", - "babel-plugin-transform-flow-strip-types": "^6.21.0", - "babel-plugin-transform-object-rest-spread": "^6.20.2", - "babel-polyfill": "^6.20.0", - "babel-preset-es2015": "^6.18.0", + "@babel/cli": "^7.6.4", + "@babel/core": "^7.6.4", + "@babel/plugin-transform-runtime": "^7.6.2", + "@babel/preset-env": "^7.6.3", + "@babel/preset-flow": "^7.0.0", + "babel-eslint": "^8.2.6", "coveralls": "^2.11.15", "eslint": "^3.13.1", "eslint-plugin-flowtype": "^2.30.0", "eslint-plugin-import": "^2.2.0", "expect": "^1.20.2", "flow-bin": "^0.40.0", - "jest": "^18.1.0", + "jest": "^24.9.0", "minimist": "^1.2.0", "rimraf": "^2.5.4" }, "dependencies": { + "@babel/runtime-corejs3": "^7.6.3", "ast-types-flow": "0.0.7", "commander": "^2.11.0" }, @@ -59,8 +58,14 @@ "lcov" ], "coverageDirectory": "reports", - "testPathDirs": [ + "roots": [ "/__tests__" ] - } + }, + "browserslist": [ + ">0.2%", + "not dead", + "not op_mini all", + "ie 11" + ] }