[BREAKING] Set default tabWidth
to 2, as documented in Gherkin Reference.
If you want to update to version 3 and use four space, you can override this values in your prettier configuration file:
{
// …
"overrides": [
{
"files": "*.feature",
"options": {
"tabWidth": 4
}
}
]
}
- Fix new lines between two comments line #17 by @jdeniau
- Fix new line for comments in data tables #18 by @jdeniau
Handle prettier 3. Prettier 2 is not compatible with this version as the plugin API did change totally.
Prettier 3 remove plugin auto-detection, so you now need to active the plugin explicitly:
package.json
- "prettier": "^2.0.0",
- "prettier-plugin-gherkin": "^1.0.0",
+ "prettier": "^3.0.0",
+ "prettier-plugin-gherkin": "^2.0.0",
.prettierrc
{
+ "plugins": ["prettier-plugin-gherkin"]
}
(maybe) drop support for node 14: prettier 3 does still support node 14, but it is unmaintained, and the tests does not pass on node 14 only. If you are willing to spend some time on this, feel free to open a PR, but I suggest you to migrate to a more recent version of node. #9 by @jdeniau
handle comments before "Given" and "When" #6
- handle "language" comment
- fix missing mediaType in json / xml embedded docstring
- fix missing example description
Version 1.0.0 is a complete rewrite of the first version by @armandabric.