From 97a640945fb4bcfbd8e3304738ac4c8bd769d332 Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Wed, 12 Apr 2023 15:23:41 -0700 Subject: [PATCH] Forbid jQuery usage in Vector 2022 Change-Id: I9d07acffa6f8133ec3e44ceba3d1fa5b27b81258 --- .eslintrc.json | 4 ++++ package-lock.json | 3 ++- package.json | 3 ++- resources/skins.vector.legacy.js/.eslintrc.json | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 resources/skins.vector.legacy.js/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index 3a2861118..59e12b850 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,10 @@ { "root": true, + "plugins": [ + "no-jquery" + ], "extends": [ + "plugin:no-jquery/deprecated", "wikimedia/client-es6", "wikimedia/jquery", "wikimedia/mediawiki" diff --git a/package-lock.json b/package-lock.json index d1e456347..0cf9ef77c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,8 +16,9 @@ "@wikimedia/codex-icons": "0.8.0", "@wikimedia/codex-search": "0.8.0", "@wikimedia/mw-node-qunit": "7.0.0", - "@wikimedia/types-wikimedia": "^0.4.0", + "@wikimedia/types-wikimedia": "0.4.0", "eslint-config-wikimedia": "0.24.0", + "eslint-plugin-no-jquery": "2.7.0", "grunt-banana-checker": "0.10.0", "jest": "27.4.7", "jest-fetch-mock": "3.0.3", diff --git a/package.json b/package.json index 800de0b65..a1747b628 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,9 @@ "@wikimedia/codex-icons": "0.8.0", "@wikimedia/codex-search": "0.8.0", "@wikimedia/mw-node-qunit": "7.0.0", - "@wikimedia/types-wikimedia": "^0.4.0", + "@wikimedia/types-wikimedia": "0.4.0", "eslint-config-wikimedia": "0.24.0", + "eslint-plugin-no-jquery": "2.7.0", "grunt-banana-checker": "0.10.0", "jest": "27.4.7", "jest-fetch-mock": "3.0.3", diff --git a/resources/skins.vector.legacy.js/.eslintrc.json b/resources/skins.vector.legacy.js/.eslintrc.json new file mode 100644 index 000000000..366814240 --- /dev/null +++ b/resources/skins.vector.legacy.js/.eslintrc.json @@ -0,0 +1,15 @@ +{ + "rules": { + "jquery/no-class": "off", + "jquery/no-extend": "off", + "jquery/no-animate": "off", + "jquery/no-find": "off", + "jquery/no-attr": "off", + "jquery/no-trigger": "off", + "jquery/no-hide": "off", + "jquery/no-each": "off", + "jquery/no-css": "off", + "jquery/no-data": "off", + "jquery/no-parent": "off" + } +}