Skip to content

Commit 09d65c3

Browse files
authored
Revert features for minor (#11016)
This reverts commit f8cb785.
1 parent 3cd28ca commit 09d65c3

5 files changed

Lines changed: 3 additions & 20 deletions

File tree

changelog_unreleased/cli/10924.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/language-yaml/embed.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
function embed(path, print, textToDoc, options) {
44
const node = path.getValue();
55

6-
// Try to format `.prettierrc` and `.stylelintrc` as `json` first
6+
// Try to format `.prettierrc` as `json` first
77
if (
88
node.type === "root" &&
99
options.filepath &&
10-
/(?:[/\\]|^)\.(?:prettier|stylelint)rc$/.test(options.filepath)
10+
/(?:[/\\]|^)\.prettierrc$/.test(options.filepath)
1111
) {
1212
return textToDoc(options.originalText, { ...options, parser: "json" });
1313
}

src/language-yaml/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const languages = [
1313
filenames: [
1414
...data.filenames.filter((filename) => filename !== "yarn.lock"),
1515
".prettierrc",
16-
".stylelintrc",
1716
],
1817
})),
1918
];

tests/integration/__tests__/__snapshots__/support-info.js.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,7 @@ exports[`CLI --support-info (stdout) 1`] = `
742742
\\".clang-tidy\\",
743743
\\".gemrc\\",
744744
\\"glide.lock\\",
745-
\\".prettierrc\\",
746-
\\".stylelintrc\\"
745+
\\".prettierrc\\"
747746
],
748747
\\"linguistLanguageId\\": 407,
749748
\\"name\\": \\"YAML\\",

tests/integration/__tests__/with-parser-inference.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ describe("infers parser from filename", () => {
2828
).toEqual("{}\n");
2929
});
3030

31-
test("json from .stylelintrc", () => {
32-
expect(
33-
prettier.format(" { } ", { filepath: "x/y/.stylelintrc" })
34-
).toEqual("{}\n");
35-
});
36-
37-
test("yaml from .stylelintrc", () => {
38-
expect(
39-
prettier.format(" extends: '' ", { filepath: "x/y/.stylelintrc" })
40-
).toEqual('extends: ""\n');
41-
});
42-
4331
test("babel from Jakefile", () => {
4432
expect(
4533
prettier.format("let foo = ( x = 1 ) => x", { filepath: "x/y/Jakefile" })

0 commit comments

Comments
 (0)