Disallow jQuery functions with native equivalents. This is the Wikimedia-maintained fork of this project.
You'll first need to install ESLint:
$ npm install eslint --save-dev
$ npm install eslint-plugin-jquery --save-dev
Note: If you installed ESLint globally (using the
-g flag) then you must also install
jquery to the plugins section of your
.eslintrc configuration file. You can omit the
The pre-set profile
plugin:jquery/deprecated includes all known deprecated and removed code, and is updated as new releases of jQuery come out. You can instead use profiles targetting specific versions of jQuery if you know the environment in which your code will operate. There are profiles for jQuery 3.3.x+ environments (
deprecated-3.3), 3.0.x+ (
deprecated-3.0), and several others for completeness.
Alternatively, you can pick out rules individually:
npm install npm test
Distributed under the MIT license. See LICENSE for details.