From 4a0e410f52487afb31d76816e1a96af2565a153d Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Wed, 24 Jul 2024 18:55:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Add=20missing=20config=20to=20es?= =?UTF-8?q?lintrc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - env.browser: Linter recognizes browser elements, like `HTMLElement` - globals.jQuery: Library is present on all pages --- .eslintrc | 6 +++++- modules/ppcp-applepay/resources/js/ApplepayButton.js | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index 7a97d815d..947e3acbe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,11 @@ { "extends": [ "plugin:@wordpress/eslint-plugin/recommended" ], + "env": { + "browser": true + }, "globals": { - "wc": true + "wc": true, + "jQuery": "readonly" }, "rules": { "no-console": ["error", { "allow": ["warn", "error"] }] diff --git a/modules/ppcp-applepay/resources/js/ApplepayButton.js b/modules/ppcp-applepay/resources/js/ApplepayButton.js index 28ab2e990..3c9f0acf7 100644 --- a/modules/ppcp-applepay/resources/js/ApplepayButton.js +++ b/modules/ppcp-applepay/resources/js/ApplepayButton.js @@ -1,6 +1,3 @@ -/* eslint-env browser */ -/* global jQuery */ - /* global ApplePaySession */ /* global PayPalCommerceGateway */