eslint-plugin-jquery-unsafe

0.1.0 • Public • Published

eslint-plugin-jquery-unsafe

Disallow jQuery functions with XSS potential.

Copied directly from eslint-plugin-jquery. Forking didn't seem appropriate as the intent of the plugin is different.

Installation

You'll first need to install ESLint:

$ npm install eslint --save-dev

Next, install eslint-plugin-jquery-unsafe:

$ npm install eslint-plugin-jquery-unsafe --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-jquery-unsafe globally.

Usage

Add jquery-unsafe to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "jquery-unsafe"
  ],
  "rules": {
    "jquery-unsafe/no-after": 2,
    "jquery-unsafe/no-append": 2,
    "jquery-unsafe/no-appendTo": 2,
    "jquery-unsafe/no-before": 2,
    "jquery-unsafe/no-html": 2,
    "jquery-unsafe/no-prepend": 2,
    "jquery-unsafe/no-prependTo": 2
  }
}

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.

Package Sidebar

Install

npm i eslint-plugin-jquery-unsafe

Weekly Downloads

398

Version

0.1.0

License

MIT

Last publish

Collaborators

  • kellyjosephprice