From 300cd7fb30ef80aa55f3ebfe1ab153752440659b Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 3 Jul 2023 10:59:11 +0800 Subject: [PATCH] Drop `array.prototype.flat` --- package.json | 1 - src/rules/group-exports.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index bfaefdcf2..538f5cb7d 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" }, "dependencies": { - "array.prototype.flat": "^1.3.1", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.7", diff --git a/src/rules/group-exports.js b/src/rules/group-exports.js index c293c1cbd..0c35ee154 100644 --- a/src/rules/group-exports.js +++ b/src/rules/group-exports.js @@ -1,7 +1,7 @@ import docsUrl from '../docsUrl'; -import flat from 'array.prototype.flat'; const { values } = Object; +const flat = Function.bind.bind(Function.prototype.call)(Array.prototype.flat); const meta = { type: 'suggestion',