parent
5c976c4636
commit
2827543154
|
@ -61,7 +61,9 @@ singleQuote = true
|
||||||
|
|
||||||
## Configuration Overrides
|
## Configuration Overrides
|
||||||
|
|
||||||
Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). This allows you to apply configuration to specific files.
|
Overrides let you have different configuration for certain file extensions, folders and specific files.
|
||||||
|
|
||||||
|
Prettier borrows ESLint’s [override format](http://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||||
|
|
||||||
JSON:
|
JSON:
|
||||||
|
|
||||||
|
@ -74,6 +76,12 @@ JSON:
|
||||||
"options": {
|
"options": {
|
||||||
"semi": true
|
"semi": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.html", "legacy/**/*.js"],
|
||||||
|
"options": {
|
||||||
|
"tabWidth": 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -87,6 +95,11 @@ overrides:
|
||||||
- files: "*.test.js"
|
- files: "*.test.js"
|
||||||
options:
|
options:
|
||||||
semi: true
|
semi: true
|
||||||
|
- files:
|
||||||
|
- "*.html"
|
||||||
|
- "legacy/**/*.js"
|
||||||
|
options:
|
||||||
|
tabWidth: 4
|
||||||
```
|
```
|
||||||
|
|
||||||
`files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings.
|
`files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings.
|
||||||
|
|
|
@ -62,7 +62,9 @@ singleQuote = true
|
||||||
|
|
||||||
## Configuration Overrides
|
## Configuration Overrides
|
||||||
|
|
||||||
Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). This allows you to apply configuration to specific files.
|
Overrides let you have different configuration for certain file extensions, folders and specific files.
|
||||||
|
|
||||||
|
Prettier borrows ESLint’s [override format](http://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||||
|
|
||||||
JSON:
|
JSON:
|
||||||
|
|
||||||
|
@ -75,6 +77,12 @@ JSON:
|
||||||
"options": {
|
"options": {
|
||||||
"semi": true
|
"semi": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.html", "legacy/**/*.js"],
|
||||||
|
"options": {
|
||||||
|
"tabWidth": 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -88,6 +96,11 @@ overrides:
|
||||||
- files: "*.test.js"
|
- files: "*.test.js"
|
||||||
options:
|
options:
|
||||||
semi: true
|
semi: true
|
||||||
|
- files:
|
||||||
|
- "*.html"
|
||||||
|
- "legacy/**/*.js"
|
||||||
|
options:
|
||||||
|
tabWidth: 4
|
||||||
```
|
```
|
||||||
|
|
||||||
`files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings.
|
`files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings.
|
||||||
|
|
Loading…
Reference in New Issue