Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs re: moduleFileExtensions to add ordering note (left-to-right) #7616

Merged
merged 4 commits into from
Jan 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "ts", "tsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.
SimenB marked this conversation as resolved.
Show resolved Hide resolved

We recommend placing the extensions most commonly used in your project on the left, so if you are using TypeScript, you may want to consider moving "ts" and/or "tsx" to the beginning of the array.

### `moduleNameMapper` [object<string, string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-22.0/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ return {

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-22.1/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ return {

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-22.2/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ return {

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-22.3/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ This option allows the use of a custom global teardown module which exports an a

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-22.4/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ This option allows the use of a custom global teardown module which exports an a

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.0/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ This option allows the use of a custom global teardown module which exports an a

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.1/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ This option allows the use of a custom global teardown module which exports an a

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleDirectories` [array<string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.2/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.3/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.4/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.5/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-23.6/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ An array of directory names to be searched recursively up from the requiring mod

Default: `["js", "json", "jsx", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for.
An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).
If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left.

### `moduleNameMapper` [object<string, string>]

Expand Down