diff --git a/index.mjs b/index.mjs index e4c47a0..ee3d965 100644 --- a/index.mjs +++ b/index.mjs @@ -1,6 +1,7 @@ import eslint from '@eslint/js' import tseslint from 'typescript-eslint' import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' +import globals from 'globals' export default tseslint.config( eslint.configs.recommended, @@ -22,5 +23,10 @@ export default tseslint.config( { ignoreDeclarationSort: true }, ], }, + languageOptions: { + globals: { + ...globals.browser, + }, + }, } ) diff --git a/package.json b/package.json index bd9c3a7..8c62493 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "devDependencies": { "eslint": "^9.0.0", + "globals": "^15.9.0", "typescript": "^5.0.0" }, "prettier": { diff --git a/yarn.lock b/yarn.lock index 85f010d..1c1dccb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -475,6 +475,11 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== +globals@^15.9.0: + version "15.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.9.0.tgz#e9de01771091ffbc37db5714dab484f9f69ff399" + integrity sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA== + globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"