1.0.1 • Published 3 years ago

eslint-plugin-require-form-method-post v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

eslint-plugin-require-form-method-post

Node.js CI

Disallow form tags without explicit method="post"

Prevents sensitive data appearing on URLs

Allow form tags with explicit method="get"

npm.io

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-require-form-method-post:

npm

$ npm install eslint-plugin-require-form-method-post --save-dev

yarn

$ yarn add eslint-plugin-require-form-method-post --dev

Usage

Add require-form-method-post to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["require-form-method-post"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "require-form-method-post/require-form-method-post": "error"
  }
}