diff --git a/eslint.config.mjs b/eslint.config.mjs index f3b298a2..a6e0e212 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,6 +4,8 @@ /* eslint-env node */ +import url from 'node:url'; +import path from 'node:path'; import js from '@eslint/js'; import globals from 'globals'; import babel from '@babel/eslint-plugin'; @@ -19,9 +21,11 @@ import react from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; import testingLibrary from 'eslint-plugin-testing-library'; +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); + const ecmaVersion = 'latest'; const impliedStrict = true; -const tsconfigRootDir = import.meta.dirname; +const tsconfigRootDir = __dirname; // // Plugins diff --git a/package.json b/package.json index e8d3d638..a2f21272 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,6 @@ "name": "focus-trap-react", "version": "11.0.2", "description": "A React component that traps focus.", - "engines": { - "node": "^20.11.0 || >=21.2.0" - }, "main": "dist/focus-trap-react.js", "types": "index.d.ts", "files": [