Skip to content

Commit

Permalink
feat: add jest configuration
Browse files Browse the repository at this point in the history
Adds rules for jest to be used as `canonical/jest`
  • Loading branch information
claudiorodriguez committed Jun 30, 2017
1 parent 9babeeb commit 2cd8221
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -14,6 +14,7 @@ This package includes the following configurations:
* [`canonical`](./configurations/eslintrc.json) – The Canonical code style guide.
* [`canonical/ava`](./configurations/ava.json) – To be used in addition to "canonical" configuration by projects that use [AVA](https://ava.li/).
* [`canonical/flowtype`](./configurations/flowtype.json) – To be used in addition to "canonical" configuration by projects that use [Flowtype](https://flowtype.org/).
* [`canonical/jest`](./configurations/jest.json) – To be used in addition to "canonical" configuration by projects that use [jest](https://facebook.github.io/jest/).
* [`canonical/lodash`](./configurations/lodash.json) – To be used in addition to "canonical" configuration by projects that use [lodash](https://lodash.com/).
* [`canonical/mocha`](./configurations/mocha.json) – To be used in addition to "canonical" configuration by projects that use [Mocha](https://mochajs.org/).
* [`canonical/react`](./configurations/react.json) – To be used in addition to "canonical" configuration by projects that use [React](https://facebook.github.io/react/).
Expand All @@ -26,6 +27,7 @@ Example:
"canonical",
"canonical/ava",
"canonical/flowtype",
"canonical/jest",
"canonical/lodash",
"canonical/mocha",
"canonical/react"
Expand Down
14 changes: 14 additions & 0 deletions configurations/jest.json
@@ -0,0 +1,14 @@
{
"env": {
"jest": true
},
"plugins": [
"jest"
],
"rules": {
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
1 change: 1 addition & 0 deletions jest.js
@@ -0,0 +1 @@
module.exports = require('./configurations/jest.json');
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -11,6 +11,7 @@
"eslint-plugin-filenames": "^1.2.0",
"eslint-plugin-flowtype": "^2.34.0",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jest": "^20.0.3",
"eslint-plugin-jsdoc": "^3.1.0",
"eslint-plugin-lodash": "^2.4.2",
"eslint-plugin-mocha": "^4.10.0",
Expand Down

0 comments on commit 2cd8221

Please sign in to comment.