Skip to content

darwintantuco/eslint-plugin-require-form-method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-require-form-method

Node.js CI

Disallow form tags without explicit method attribute

Prevents sensitive data appearing on URLs accidentally

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

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

npm

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

yarn

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

Usage

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

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

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

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