-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,51 @@ | ||
# eslint-custom-plugin | ||
custom security plugin for eslint | ||
A demo security plugin for eslint,which contains several security ryles for eslint | ||
# eslint-plugin-security-plugin | ||
|
||
Create a security plugin for educational reasons | ||
|
||
## Installation | ||
|
||
You'll first need to install [ESLint](http://eslint.org): | ||
|
||
``` | ||
$ npm i eslint --save-dev | ||
``` | ||
|
||
Next, install `eslint-plugin-security-plugin`: | ||
|
||
``` | ||
$ npm install eslint-plugin-security-plugin --save-dev | ||
``` | ||
|
||
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-security-plugin` globally. | ||
|
||
## Usage | ||
|
||
Add `security-plugin` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
|
||
```json | ||
{ | ||
"plugins": [ | ||
"security-plugin" | ||
] | ||
} | ||
``` | ||
|
||
|
||
Then configure the rules you want to use under the rules section. | ||
|
||
```json | ||
{ | ||
"rules": { | ||
"security-plugin/rule-name": 2 | ||
} | ||
} | ||
``` | ||
|
||
## Supported Rules | ||
|
||
* Fill in provided rules here | ||
|
||
|
||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @fileoverview Create a security plugin for educational reasons | ||
* @author gkouziik | ||
*/ | ||
"use strict"; | ||
|
||
//------------------------------------------------------------------------------ | ||
// Requirements | ||
//------------------------------------------------------------------------------ | ||
|
||
var requireIndex = require("requireindex"); | ||
|
||
//------------------------------------------------------------------------------ | ||
// Plugin Definition | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
// import all rules in lib/rules | ||
module.exports.rules = requireIndex(__dirname + "/rules"); | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.