Skip to content

Commit

Permalink
Fix #6 - add eslint-plugin-security
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenyOrekhov committed Aug 24, 2018
1 parent 34ff908 commit a84a04a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 12 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

## About

[Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs)
[Shareable Configs](https://eslint.org/docs/developer-guide/shareable-configs)
are designed to work with the `extends` feature of `.eslintrc` files.

This config is designed to be compatible with Douglas Crockford's
[JSLint](http://jslint.com/).
[JSLint](https://jslint.com/).

| Rules | Total | Enabled |
| -------------------------------------------------------------------------- | ----: | ------: |
| [ESLint](http://eslint.org/docs/rules/) | 255 | **230** |
| [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) | 14 | **11** |
| **Total** | 269 | **241** |
| Rules | Total | Enabled |
| -------------------------------------------------------------------------------- | ----: | ------: |
| [ESLint](https://eslint.org/docs/rules/) | 255 | **230** |
| [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) | 14 | **11** |
| [eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) | 13 | **12** |
| **Total** | 282 | **253** |

## Usage

Expand All @@ -25,7 +26,7 @@ npm install eslint-config-hardcore --save-dev
```

Then, add `"extends": "hardcore"` to your .eslintrc file and specify your
[environments](http://eslint.org/docs/user-guide/configuring#specifying-environments):
[environments](https://eslint.org/docs/user-guide/configuring#specifying-environments):

```json
{
Expand Down
23 changes: 20 additions & 3 deletions index.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"plugins": [
"promise"
"promise",
"security"
],

"extends": [
"eslint:recommended",
"plugin:promise/recommended"
"plugin:promise/recommended",
"plugin:security/recommended"
],

"parserOptions": {
Expand Down Expand Up @@ -535,6 +537,21 @@
"promise/no-callback-in-promise": "error",
"promise/no-return-in-finally": "error",
"promise/valid-params": "error",
"promise/no-new-statics": "error"
"promise/no-new-statics": "error",

"detect-buffer-noassert": "error",
"detect-child-process": "error",
"detect-disable-mustache-escape": "error",
"detect-eval-with-expression": "error",
"detect-new-buffer": "error",
"detect-no-csrf-before-method-override": "error",
"detect-non-literal-fs-filename": "error",
"detect-non-literal-regexp": "error",
"detect-non-literal-require": "error",
"detect-possible-timing-attacks": "error",
"detect-pseudoRandomBytes": "error",
"detect-unsafe-regex": "error",

"detect-object-injection": "off"
}
}
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"eslint": "^5.3.0"
},
"dependencies": {
"eslint-plugin-promise": "^4.0.0"
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-security": "^1.4.0"
},
"files": [
"index.json"
Expand Down

0 comments on commit a84a04a

Please sign in to comment.