Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update editorconfig-to-prettier #5550

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -29,7 +29,7 @@
"dedent": "0.7.0",
"diff": "3.2.0",
"editorconfig": "0.15.2",
"editorconfig-to-prettier": "0.1.0",
"editorconfig-to-prettier": "0.1.1",
"emoji-regex": "6.5.1",
"escape-string-regexp": "1.0.5",
"esutils": "2.0.2",
Expand Down
10 changes: 10 additions & 0 deletions tests_integration/__tests__/config-resolution.js
Expand Up @@ -150,6 +150,16 @@ test("API resolveConfig.sync with file arg and .editorconfig", () => {
});
});

test("API resolveConfig.sync with file arg and .editorconfig (key = unset)", () => {
const file = path.resolve(
path.join(__dirname, "../cli/config/editorconfig/tab_width=unset.js")
);

expect(
prettier.resolveConfig.sync(file, { editorconfig: true })
).not.toMatchObject({ tabWidth: "unset" });
});

test("API resolveConfig with nested file arg and .editorconfig", () => {
const file = path.resolve(
path.join(__dirname, "../cli/config/editorconfig/lib/file.js")
Expand Down
5 changes: 4 additions & 1 deletion tests_integration/cli/config/editorconfig/.editorconfig
Expand Up @@ -12,4 +12,7 @@ indent_style = space
indent_size = 2

[lib/indent_size=tab.js]
indent_size = tab
indent_size = tab

[tab_width=unset.js]
tab_width = unset
6 changes: 3 additions & 3 deletions yarn.lock
Expand Up @@ -1815,9 +1815,9 @@ ecc-jsbn@~0.1.1:
dependencies:
jsbn "~0.1.0"

editorconfig-to-prettier@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/editorconfig-to-prettier/-/editorconfig-to-prettier-0.1.0.tgz#c31d2ceea2ef922835c53f6ca0e5ba2930b8940d"
editorconfig-to-prettier@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/editorconfig-to-prettier/-/editorconfig-to-prettier-0.1.1.tgz#7391c7067dfd68ffee65afc2c4fbe4fba8d4219a"

editorconfig@0.15.2:
version "0.15.2"
Expand Down