Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/darwintantuco/eslint-plugin-require-form-method

Disallow form tags without explicit method attribute
https://github.com/darwintantuco/eslint-plugin-require-form-method

eslint eslint-plugin eslintplugin security

Last synced: 18 days ago
JSON representation

Disallow form tags without explicit method attribute

Awesome Lists containing this project

README

        

# eslint-plugin-require-form-method

![Node.js CI](https://github.com/darwintantuco/eslint-plugin-require-form-method/workflows/Node.js%20CI/badge.svg?branch=master)

Disallow form tags without explicit method attribute

Prevents sensitive data appearing on URLs accidentally

![](demo.png)

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ 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:

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

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

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