Skip to content
Merged
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
6 changes: 3 additions & 3 deletions docs/rules/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ In order to provide a consistent use of file extensions across your code base, t

This rule either takes one string option, one object option, or a string and an object option. If it is the string `"never"` (the default value), then the rule forbids the use for any extension. If it is the string `"always"`, then the rule enforces the use of extensions for all import statements. If it is the string `"ignorePackages"`, then the rule enforces the use of extensions for all import statements except package imports.

```json
```
"import/extensions": [<severity>, "never" | "always" | "ignorePackages"]
```

By providing an object you can configure each extension separately.

```json
```
"import/extensions": [<severity>, {
<extension>: "never" | "always" | "ignorePackages"
}]
Expand All @@ -24,7 +24,7 @@ By providing an object you can configure each extension separately.

By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions.

```json
```
"import/extensions": [
<severity>,
"never" | "always" | "ignorePackages",
Expand Down