Skip to content

Commit

Permalink
Merge pull request #29 from mapado/tab-width-default-2
Browse files Browse the repository at this point in the history
default tab width should be 2 and not 4
  • Loading branch information
jdeniau authored Jul 30, 2024
2 parents 7c9fedc + 3a99c33 commit 34e9adc
Show file tree
Hide file tree
Showing 5 changed files with 4,991 additions and 2,232 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# CHANGELOG

## Unreleased

### Changed

[BREAKING] Set default `tabWidth` to 2, as documented in [Gherkin Reference](https://cucumber.io/docs/gherkin/reference/).

If you want to use four space, you can override this values in your prettier configuration file:

```json
{
// …
"overrides": [
{
"files": "*.feature",
"options": {
"tabWidth": 4
}
}
]
}
```

## [2.4.1] - 2024-07-26

- Re-set hardline for Background [#27](https://github.com/mapado/prettier-plugin-gherkin/pull/27) by [@jdeniau](https://github.com/jdeniau)
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ const plugin: Plugin<TypedGherkinNode<GherkinNode>> = {
},
defaultOptions: {
printWidth: 120,
tabWidth: 4,
tabWidth: 2,
},
options: {
escapeBackslashes: {
Expand Down
Loading

0 comments on commit 34e9adc

Please sign in to comment.