From dfab6b1b8d87fbe6de3749d571ed2e666735d879 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 20 Mar 2025 15:44:06 +0900 Subject: [PATCH] lint(frontend): force window prefix --- packages/frontend/eslint.config.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/frontend/eslint.config.js b/packages/frontend/eslint.config.js index 30ee1e651e..226c00af03 100644 --- a/packages/frontend/eslint.config.js +++ b/packages/frontend/eslint.config.js @@ -57,6 +57,29 @@ export default [ // fetch ... window.fetchと衝突 or 紛らわしい // location ... window.locationと衝突 or 紛らわしい 'id-denylist': ['warn', 'window', 'e', 'close', 'open', 'fetch', 'location'], + 'no-restricted-globals': [ + 'error', + { + 'name': 'open', + 'message': 'Use `window.open`.', + }, + { + 'name': 'close', + 'message': 'Use `window.close`.', + }, + { + 'name': 'fetch', + 'message': 'Use `window.fetch`.', + }, + { + 'name': 'location', + 'message': 'Use `window.location`.', + }, + { + 'name': 'history', + 'message': 'Use `window.history`.', + }, + ], 'no-shadow': ['warn'], 'vue/attributes-order': ['error', { alphabetical: false,