Skip to content

Commit

Permalink
Fix #16 - Add eslint-plugin-unicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenyOrekhov committed Sep 1, 2019
1 parent 91519f1 commit 3891e10
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ This config is designed to be compatible with Douglas Crockford's
| [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) | 14 | **11** |
| [eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) | 13 | **12** |
| [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) | 40 | **32** |
| **Total** | 323 | **287** |
| [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) | 37 | **32** |
| **Total** | 360 | **319** |

## Usage

Expand Down
8 changes: 7 additions & 1 deletion disabled-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@
"import/no-nodejs-modules": "off",
"import/no-default-export": "off",
"import/no-named-export": "off",
"dynamic-import-chunkname": "off"
"dynamic-import-chunkname": "off",

"unicorn/no-fn-reference-in-iterator": "off",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-process-exit": "off",
"unicorn/prefer-spread": "off",
"unicorn/prevent-abbreviations": "off"
}
51 changes: 50 additions & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"plugins": [
"promise",
"security",
"import"
"import",
"unicorn"
],

"extends": [
Expand Down Expand Up @@ -635,6 +636,54 @@
}
],

"unicorn/custom-error-definition": "error",
"unicorn/error-message": "error",
"unicorn/escape-case": "error",
"unicorn/explicit-length-check": "error",
"unicorn/import-index": "error",
"unicorn/new-for-builtins": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/no-array-instanceof": "error",
"unicorn/no-console-spaces": "error",
"unicorn/no-for-loop": "error",
"unicorn/no-hex-escape": "error",
"unicorn/no-new-buffer": "error",
"unicorn/no-unreadable-array-destructuring": "error",
"unicorn/no-unsafe-regex": "error",
"unicorn/no-unused-properties": "error",
"unicorn/no-zero-fractions": "error",
"unicorn/number-literal-case": "error",
"unicorn/prefer-add-event-listener": "error",
"unicorn/prefer-event-key": "error",
"unicorn/prefer-exponentiation-operator": "error",
"unicorn/prefer-flat-map": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-node-append": "error",
"unicorn/prefer-node-remove": "error",
"unicorn/prefer-query-selector": "error",
"unicorn/prefer-starts-ends-with": "error",
"unicorn/prefer-text-content": "error",
"unicorn/prefer-type-error": "error",
"unicorn/regex-shorthand": "error",
"unicorn/throw-new-error": "error",

"unicorn/catch-error-name": [
"error",
{
"caughtErrorsIgnorePattern": "^ignore$"
}
],
"unicorn/filename-case": [
"error",
{
"cases": {
"kebabCase": true,
"camelCase": true,
"pascalCase": true
}
}
],

"security/detect-object-injection": "off"
}
}
111 changes: 111 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 @@ -32,7 +32,8 @@
"dependencies": {
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-security": "^1.4.0"
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-unicorn": "^10.0.0"
},
"files": [
"index.json"
Expand Down

0 comments on commit 3891e10

Please sign in to comment.