From 706ee3ad5ab47a407f49de626f316af07a5443c2 Mon Sep 17 00:00:00 2001 From: seotts Date: Tue, 10 Nov 2020 16:39:11 -0500 Subject: [PATCH] update eslint, babel-eslint, and eslint-config-scratch --- package.json | 6 +++--- src/.eslintrc.js | 2 ++ src/helper/style-path.js | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d802624c..02cf459d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "autoprefixer": "9.7.4", "babel-cli": "6.26.0", "babel-core": "^6.23.1", - "babel-eslint": "^8.2.1", + "babel-eslint": "^10.1.0", "babel-jest": "^23.0.1", "babel-loader": "^7.1.4", "babel-plugin-react-intl": "3.0.1", @@ -60,9 +60,9 @@ "css-loader": "3.4.0", "enzyme": "^3.6.0", "enzyme-adapter-react-16": "^1.5.0", - "eslint": "^4.4.1", + "eslint": "^7.13.0", "eslint-config-import": "^0.13.0", - "eslint-config-scratch": "^5.0.0", + "eslint-config-scratch": "^6.0.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-react": "7.20.3", "gh-pages": "github:rschamp/gh-pages#publish-branch-to-subfolder", diff --git a/src/.eslintrc.js b/src/.eslintrc.js index e78b8104..a337b4a9 100644 --- a/src/.eslintrc.js +++ b/src/.eslintrc.js @@ -1,4 +1,6 @@ +/* eslint-disable import/no-commonjs */ module.exports = { +/* eslint-enable import/no-commonjs */ root: true, extends: ['scratch', 'scratch/es6', 'scratch/react', 'import'], env: { diff --git a/src/helper/style-path.js b/src/helper/style-path.js index 839a5a07..bf30b43d 100644 --- a/src/helper/style-path.js +++ b/src/helper/style-path.js @@ -634,8 +634,7 @@ const styleShape = function (path, options) { ); } } - - if (options.hasOwnProperty('strokeWidth')) path.strokeWidth = options.strokeWidth; + if (Object.prototype.hasOwnProperty.call(options, 'strokeWidth')) path.strokeWidth = options.strokeWidth; }; export {