-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect EOL character from
.editorconfig
(#590)
* add .editorconfig support for new line choice * add more tests and change the markdown path to root * add full tests inside & document the hypothetical markdown file --------- Co-authored-by: Bryan Mishkin <[email protected]>
- Loading branch information
1 parent
d998fe2
commit cd94000
Showing
13 changed files
with
376 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
test/lib/generate/__snapshots__/editor-config-test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using crlf end of line from .editorconfig 1`] = ` | ||
"## Rules | ||
<!-- begin auto-generated rules list --> | ||
💼 Configurations enabled in. | ||
| Name | 💼 | | ||
| :------------------- | :------------------------------------- | | ||
| [a](docs/rules/a.md) | ![badge-a][] ![badge-B][] ![badge-c][] | | ||
| [B](docs/rules/B.md) | | | ||
| [c](docs/rules/c.md) | | | ||
<!-- end auto-generated rules list --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using crlf end of line from .editorconfig 2`] = ` | ||
"# test/a | ||
💼 This rule is enabled in the following configs: \`a\`, \`B\`, \`c\`. | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using crlf end of line from .editorconfig 3`] = ` | ||
"# test/B | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using crlf end of line from .editorconfig 4`] = ` | ||
"# test/c | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using lf end of line from .editorconfig 1`] = ` | ||
"## Rules | ||
<!-- begin auto-generated rules list --> | ||
💼 Configurations enabled in. | ||
| Name | 💼 | | ||
| :------------------- | :------------------------------------- | | ||
| [a](docs/rules/a.md) | ![badge-a][] ![badge-B][] ![badge-c][] | | ||
| [B](docs/rules/B.md) | | | ||
| [c](docs/rules/c.md) | | | ||
<!-- end auto-generated rules list --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using lf end of line from .editorconfig 2`] = ` | ||
"# test/a | ||
💼 This rule is enabled in the following configs: \`a\`, \`B\`, \`c\`. | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using lf end of line from .editorconfig 3`] = ` | ||
"# test/B | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using lf end of line from .editorconfig 4`] = ` | ||
"# test/c | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using the end of line from .editorconfig while respecting the .md specific end of line setting 1`] = ` | ||
"## Rules | ||
<!-- begin auto-generated rules list --> | ||
💼 Configurations enabled in. | ||
| Name | 💼 | | ||
| :------------------- | :------------------------------------- | | ||
| [a](docs/rules/a.md) | ![badge-a][] ![badge-B][] ![badge-c][] | | ||
| [B](docs/rules/B.md) | | | ||
| [c](docs/rules/c.md) | | | ||
<!-- end auto-generated rules list --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using the end of line from .editorconfig while respecting the .md specific end of line setting 2`] = ` | ||
"# test/a | ||
💼 This rule is enabled in the following configs: \`a\`, \`B\`, \`c\`. | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using the end of line from .editorconfig while respecting the .md specific end of line setting 3`] = ` | ||
"# test/B | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; | ||
|
||
exports[`string (getEndOfLine) generates using the correct end of line when .editorconfig exists generates using the end of line from .editorconfig while respecting the .md specific end of line setting 4`] = ` | ||
"# test/c | ||
<!-- end auto-generated rule header --> | ||
" | ||
`; |
Oops, something went wrong.