
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
eslint-plugin-no-jquery
Advanced tools
Disallow jQuery functions, with suggestions for native equivalents where possible.
Originally a fork of eslint-plugin-jquery.
You'll first need to install ESLint:
npm install eslint --save-dev
Next, install eslint-plugin-no-jquery:
npm install eslint-plugin-no-jquery --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-no-jquery globally.
Add no-jquery to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"extends": "plugin:no-jquery/deprecated",
"plugins": [
"no-jquery"
]
}
The config plugin:no-jquery/recommended includes the recommended rule no-jquery/variable-pattern which is required for method rules to work correctly.
The config plugin:no-jquery/deprecated includes all known deprecated and removed code, and is updated as new releases of jQuery come out. You can instead use configs targeting specific versions of jQuery if you know the environment in which your code will operate. There is a config for all minor versions from 1.0 to 3.6 (deprecated-1.0, ..., deprecated-3.7). Deprecation configs are cumulative, so they include all the rules for jQuery versions below them.
The config plugin:no-jquery/slim includes all features excluded from the official "slim" build of jQuery, specifically the ajax and effects modules.
The config plugin:no-jquery/all includes all methods and utilies and should be used when you are aiming to remove all jQuery usage from your code.
Alternatively, you can pick out rules individually (see below).
The following global settings can be used under the no-jquery property to configure the linter:
constructorAliases - An array of aliases for the jQuery constructor. Defaults to [ "$", "jQuery" ].variablePattern - Regular expression pattern for matching jQuery variables. Defaults to "^\\$.". This pattern can be enforced with the no-jquery/variable-pattern rule.collectionReturningPlugins - An object describing the return types of jQuery plugins. Keys are plugin method names, and values can be one of:
'always' a plugin which always returns a jQuery collection.
$bar = $foo.stop()'accessor' a plugin which only returns a jQuery collection when an argument is given.
w = $foo.width(), $bar = $foo.width( 200 )'valueAccessor' a plugin which only returns a jQuery collection when more than one argument is given.
w = $foo.css( 'width' ), $bar = $foo.css( 'width', '1em' )'never' (default) a plugin which never returns a jQuery collection.
arr = $foo.toArray(){
"settings": {
"no-jquery": {
"constructorAliases": [ "$", "jQuery" ],
"variablePattern": "^\\$.|^element$",
"collectionReturningPlugins": {
"datePicker": "always"
}
}
},
"plugins": [
"no-jquery"
]
}
Rules with options are indicated with ⚙️. Rules which are fixable are indicated with 🔧.
Where rules are included in the configs recommended, slim, all or deprecated-X.X it is indicated below. Where rules are included in a config with non-default options this is indicated with a †.
no-jquery/no-ajax slim, allno-jquery/no-ajax-events slimno-jquery/no-and-self 🔧 1.8no-jquery/no-animate ⚙️ slim, allno-jquery/no-animate-toggle slimno-jquery/no-append-htmlno-jquery/no-attr allno-jquery/no-bind 3.0, allno-jquery/no-box-model 1.3no-jquery/no-browser 1.3no-jquery/no-camel-case 3.3, allno-jquery/no-class allno-jquery/no-class-stateno-jquery/no-clone allno-jquery/no-closest allno-jquery/no-constructor-attributesno-jquery/no-contains allno-jquery/no-context-prop 1.10no-jquery/no-css allno-jquery/no-data allno-jquery/no-deferred allno-jquery/no-delegate 3.0, allno-jquery/no-done-fail allno-jquery/no-eachno-jquery/no-each-collection allno-jquery/no-each-util allno-jquery/no-error 🔧 allno-jquery/no-error-shorthand 🔧 1.8no-jquery/no-escape-selector 🔧 allno-jquery/no-event-shorthand ⚙️ 🔧 3.5, 3.3†, allno-jquery/no-extend ⚙️ 🔧 allno-jquery/no-fade slim, allno-jquery/no-filter allno-jquery/no-findno-jquery/no-find-collection allno-jquery/no-find-util allno-jquery/no-fx slimno-jquery/no-fx-interval 3.0no-jquery/no-global-eval allno-jquery/no-global-selector ⚙️no-jquery/no-grep allno-jquery/no-has allno-jquery/no-hold-ready 3.2, allno-jquery/no-html ⚙️ allno-jquery/no-in-array allno-jquery/no-is allno-jquery/no-is-array 🔧 3.2, allno-jquery/no-is-empty-object allno-jquery/no-is-function 🔧 3.3, allno-jquery/no-is-numeric 3.3, allno-jquery/no-is-plain-object allno-jquery/no-is-window 3.3, allno-jquery/no-jquery-constructor allno-jquery/no-live 1.7, allno-jquery/no-load slim, allno-jquery/no-load-shorthand 🔧 1.8no-jquery/no-mapno-jquery/no-map-collection allno-jquery/no-map-util allno-jquery/no-merge allno-jquery/no-node-name 3.2, allno-jquery/no-noop 🔧 allno-jquery/no-now 🔧 3.3, allno-jquery/no-on-ready 🔧 1.8no-jquery/no-other-methods allno-jquery/no-other-utils allno-jquery/no-param allno-jquery/no-parent allno-jquery/no-parents allno-jquery/no-parse-html allno-jquery/no-parse-html-literal ⚙️ 🔧no-jquery/no-parse-json 🔧 3.0, allno-jquery/no-parse-xml 🔧 slim, allno-jquery/no-prop allno-jquery/no-proxy 🔧 3.3, allno-jquery/no-readyno-jquery/no-ready-shorthand 🔧 3.0, allno-jquery/no-selector-prop 1.7no-jquery/no-serialize allno-jquery/no-size 🔧 1.8, allno-jquery/no-sizzle ⚙️ 3.4†no-jquery/no-slide slim, allno-jquery/no-sub 1.7, allno-jquery/no-support 1.9no-jquery/no-text allno-jquery/no-trigger allno-jquery/no-trim 3.5, allno-jquery/no-type 3.3, allno-jquery/no-unique 🔧 3.0, allno-jquery/no-unload-shorthand 🔧 1.8no-jquery/no-val allno-jquery/no-visibility allno-jquery/no-when allno-jquery/no-wrap allno-jquery/variable-pattern recommendedno-jquery/no-die (use no-jquery/no-live)no-jquery/no-hide (use no-jquery/no-visibility)no-jquery/no-show (use no-jquery/no-visibility)no-jquery/no-submit (use no-jquery/no-event-shorthand)no-jquery/no-toggle (use no-jquery/no-visibility)no-jquery/no-unbind (use no-jquery/no-bind)no-jquery/no-undelegate (use no-jquery/no-delegate)npm install
npm test
To update documentation after modifying a rule or its tests, use
npm run doc
To run a specific test or tests:
npm run testpath tests/rules/no-ajax
Distributed under the MIT license. See LICENSE for details.
FAQs
Disallow jQuery functions with native equivalents.
The npm package eslint-plugin-no-jquery receives a total of 54,695 weekly downloads. As such, eslint-plugin-no-jquery popularity was classified as popular.
We found that eslint-plugin-no-jquery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 24 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.