Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore(package): update to prettier@1.13.0 (#120)
  • Loading branch information
macklinu authored and SimenB committed May 27, 2018
1 parent d7f3de3 commit e40113d
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 43 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -100,5 +100,5 @@ for more information about extending configuration files.

## Credit

* [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha)
* [eslint-plugin-jasmine](https://github.com/tlvince/eslint-plugin-jasmine)
- [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha)
- [eslint-plugin-jasmine](https://github.com/tlvince/eslint-plugin-jasmine)
4 changes: 2 additions & 2 deletions docs/rules/consistent-test-it.md
Expand Up @@ -3,8 +3,8 @@
Jest allows you to choose how you want to define your tests, using the `it` or
the `test` keywords, with multiple permutations for each:

* **it:** `it`, `xit`, `fit`, `it.only`, `it.skip`.
* **test:** `test`, `xtest`, `test.only`, `test.skip`.
- **it:** `it`, `xit`, `fit`, `it.only`, `it.skip`.
- **test:** `test`, `xtest`, `test.only`, `test.skip`.

This rule gives you control over the usage of these keywords in your codebase.

Expand Down
6 changes: 3 additions & 3 deletions docs/rules/lowercase-name.md
Expand Up @@ -40,9 +40,9 @@ it('adds 1 + 2 to equal 3', () => {
This array option whitelists function names so that this rule does not report
their usage as being incorrect. There are three possible values:

* `"describe"`
* `"test"`
* `"it"`
- `"describe"`
- `"test"`
- `"it"`

By default, none of these options are enabled (the equivalent of
`{ "ignore": [] }`).
Expand Down
8 changes: 4 additions & 4 deletions docs/rules/no-disabled-tests.md
Expand Up @@ -11,10 +11,10 @@ This rule raises a warning about disabled tests.

There are a number of ways to disable tests in Jest:

* by appending `.skip` to the test-suite or test-case
* by prepending the test function name with `x`
* by declaring a test with a name but no function body
* by making a call to `pending()` anywhere within the test
- by appending `.skip` to the test-suite or test-case
- by prepending the test function name with `x`
- by declaring a test with a name but no function body
- by making a call to `pending()` anywhere within the test

The following patterns are considered warnings:

Expand Down
20 changes: 10 additions & 10 deletions docs/rules/no-hooks.md
Expand Up @@ -8,10 +8,10 @@ shared state between tests.

This rule reports for the following function calls:

* `beforeAll`
* `beforeEach`
* `afterAll`
* `afterEach`
- `beforeAll`
- `beforeEach`
- `afterAll`
- `afterEach`

Examples of **incorrect** code for this rule:

Expand Down Expand Up @@ -104,10 +104,10 @@ describe('foo', () => {
This array option whitelists setup and teardown hooks so that this rule does not
report their usage as being incorrect. There are four possible values:

* `"beforeAll"`
* `"beforeEach"`
* `"afterAll"`
* `"afterEach"`
- `"beforeAll"`
- `"beforeEach"`
- `"afterAll"`
- `"afterEach"`

By default, none of these options are enabled (the equivalent of
`{ "allow": [] }`).
Expand Down Expand Up @@ -171,5 +171,5 @@ safely disable this rule.

## Further Reading

* [Jest docs - Setup and Teardown](https://facebook.github.io/jest/docs/en/setup-teardown.html)
* [@jamiebuilds Twitter thread](https://twitter.com/jamiebuilds/status/954906997169664000)
- [Jest docs - Setup and Teardown](https://facebook.github.io/jest/docs/en/setup-teardown.html)
- [@jamiebuilds Twitter thread](https://twitter.com/jamiebuilds/status/954906997169664000)
4 changes: 2 additions & 2 deletions docs/rules/no-test-prefixes.md
Expand Up @@ -3,9 +3,9 @@
Jest allows you to choose how you want to define focused and skipped tests, with
multiple permutations for each:

* **only & skip:** `it.only`, `test.only`, `describe.only`, `it.skip`,
- **only & skip:** `it.only`, `test.only`, `describe.only`, `it.skip`,
`test.skip`, `describe.skip`.
* **'f' & 'x':** `fit`, `fdescribe`, `xit`, `xtest`, `xdescribe`.
- **'f' & 'x':** `fit`, `fdescribe`, `xit`, `xtest`, `xdescribe`.

This rule enforces usages from the **only & skip** list.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/prefer-expect-assertions.md
Expand Up @@ -7,7 +7,7 @@ Ensure every test to have either `expect.assertions(<number of assertions>)` OR

This rule triggers a warning if,

* `expect.assertions(<number of assertions>)` OR `expect.hasAssertions()` is not
- `expect.assertions(<number of assertions>)` OR `expect.hasAssertions()` is not
present as first statement in a test, e.g.:

```js
Expand All @@ -16,7 +16,7 @@ test('my test', () => {
});
```

* `expect.assertions(<number of assertions>)` is the first statement in a test
- `expect.assertions(<number of assertions>)` is the first statement in a test
where argument passed to `expect.assertions(<number of assertions>)` is not a
valid number, e.g.:

Expand Down
16 changes: 8 additions & 8 deletions docs/rules/valid-describe.md
Expand Up @@ -8,18 +8,18 @@ errors.
This rule validates that the second parameter of a `describe()` function is a
callback function. This callback function:

* should not be
- should not be
[async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
* should not contain any parameters
* should not contain any `return` statements
- should not contain any parameters
- should not contain any `return` statements

The following `describe` function aliases are also validated:

* `describe`
* `describe.only`
* `describe.skip`
* `fdescribe`
* `xdescribe`
- `describe`
- `describe.only`
- `describe.skip`
- `fdescribe`
- `xdescribe`

The following patterns are considered warnings:

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/valid-expect-in-promise.md
Expand Up @@ -7,8 +7,8 @@ promise

This rule triggers a warning if,

* test is having assertions in `then` or `catch` block of a promise
* and that promise is not returned from the test
- test is having assertions in `then` or `catch` block of a promise
- and that promise is not returned from the test

### Default configuration

Expand Down
31 changes: 25 additions & 6 deletions package.json
Expand Up @@ -4,13 +4,22 @@
"description": "Eslint rules for Jest",
"repository": "jest-community/eslint-plugin-jest",
"license": "MIT",
"keywords": ["eslint", "eslintplugin", "eslint-plugin"],
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin"
],
"author": {
"name": "Jonathan Kim",
"email": "hello@jkimbo.com",
"url": "jkimbo.com"
},
"files": ["docs/", "rules/", "processors/", "index.js"],
"files": [
"docs/",
"rules/",
"processors/",
"index.js"
],
"engines": {
"node": ">= 4"
},
Expand Down Expand Up @@ -47,8 +56,14 @@
"trailingComma": "es5"
},
"lint-staged": {
"*.js": ["eslint --fix", "git add"],
"*.{md,json}": ["prettier --write", "git add"]
"*.js": [
"eslint --fix",
"git add"
],
"*.{md,json}": [
"prettier --write",
"git add"
]
},
"jest": {
"coverageThreshold": {
Expand All @@ -67,11 +82,15 @@
{
"displayName": "lint",
"runner": "jest-runner-eslint",
"testMatch": ["<rootDir>/**/*.js"]
"testMatch": [
"<rootDir>/**/*.js"
]
}
]
},
"commitlint": {
"extends": ["@commitlint/config-conventional"]
"extends": [
"@commitlint/config-conventional"
]
}
}
4 changes: 2 additions & 2 deletions yarn.lock
Expand Up @@ -4439,8 +4439,8 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.10.2:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
version "1.13.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.0.tgz#054de8d5fb1a4405c845d16183f58a2c301f6f16"

pretty-format@^22.4.0:
version "22.4.0"
Expand Down

0 comments on commit e40113d

Please sign in to comment.