Skip to content

Commit

Permalink
fix .prettierignore (jsfmt.spec.js files were ignored)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 27, 2020
1 parent c2c702d commit 605e57d
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dist/
.cache/
coverage/
/tests/
/tests/**/*.*
!/tests/**/jsfmt.spec.js
/tests_integration/cli/
/tests_integration/plugins/
Expand Down
4 changes: 2 additions & 2 deletions tests/arrow-call/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run_spec(__dirname, ["babel", "flow", "typescript"]);
run_spec(__dirname, ["babel", "flow", "typescript"], {
trailingComma: "all"
trailingComma: "all",
});
run_spec(__dirname, ["babel", "flow", "typescript"], {
arrowParens: "always"
arrowParens: "always",
});
2 changes: 1 addition & 1 deletion tests/comments_jsx_same_line/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["flow", "babel", "typescript"], {
jsxBracketSameLine: true
jsxBracketSameLine: true,
});
8 changes: 4 additions & 4 deletions tests/cursor/jsfmt.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test("translates cursor correctly in basic case", () => {
prettier.formatWithCursor(" 1", { parser: "babel", cursorOffset: 2 })
).toEqual({
formatted: "1;\n",
cursorOffset: 1
cursorOffset: 1,
});
});

Expand All @@ -17,7 +17,7 @@ test("positions cursor relative to closest node, not SourceElement", () => {
prettier.formatWithCursor(code, { parser: "babel", cursorOffset: 15 })
).toEqual({
formatted: "return 15;\n",
cursorOffset: 7
cursorOffset: 7,
});
});

Expand All @@ -27,7 +27,7 @@ test("keeps cursor inside formatted node", () => {
prettier.formatWithCursor(code, { parser: "babel", cursorOffset: 14 })
).toEqual({
formatted: "return 15;\n",
cursorOffset: 7
cursorOffset: 7,
});
});

Expand All @@ -43,6 +43,6 @@ foo('bar', cb => {
console.log("stuff");
});
`,
cursorOffset: 25
cursorOffset: 25,
});
});
6 changes: 3 additions & 3 deletions tests/empty/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const prettier = require("prettier/local");
const parsers = prettier
.getSupportInfo()
.options.find(option => option.name === "parser");
.options.find((option) => option.name === "parser");

run_spec(
__dirname,
parsers.choices
.filter(choice => !choice.deprecated)
.map(choice => choice.value)
.filter((choice) => !choice.deprecated)
.map((choice) => choice.value)
);
8 changes: 4 additions & 4 deletions tests/jsx/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
run_spec(__dirname, ["flow", "babel", "typescript"], {
singleQuote: false,
jsxSingleQuote: false
jsxSingleQuote: false,
});
run_spec(__dirname, ["flow", "babel", "typescript"], {
singleQuote: false,
jsxSingleQuote: true
jsxSingleQuote: true,
});
run_spec(__dirname, ["flow", "babel", "typescript"], {
singleQuote: true,
jsxSingleQuote: false
jsxSingleQuote: false,
});
run_spec(__dirname, ["flow", "babel", "typescript"], {
singleQuote: true,
jsxSingleQuote: true
jsxSingleQuote: true,
});
2 changes: 1 addition & 1 deletion tests/multiparser_js_html/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_spec(__dirname, ["babel", "flow", "typescript"]);
run_spec(__dirname, ["babel", "flow", "typescript"], {
htmlWhitespaceSensitivity: "ignore"
htmlWhitespaceSensitivity: "ignore",
});
8 changes: 4 additions & 4 deletions tests/quote_props/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
run_spec(__dirname, ["flow", "babel"], {
quoteProps: "as-needed"
quoteProps: "as-needed",
});

run_spec(__dirname, ["flow", "babel"], {
quoteProps: "preserve"
quoteProps: "preserve",
});

run_spec(__dirname, ["flow", "babel"], {
quoteProps: "consistent"
quoteProps: "consistent",
});
run_spec(__dirname, ["flow", "babel"], {
quoteProps: "consistent",
singleQuote: true
singleQuote: true,
});
6 changes: 3 additions & 3 deletions tests/quote_props_typescript/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
run_spec(__dirname, ["typescript"], {
quoteProps: "as-needed"
quoteProps: "as-needed",
});

run_spec(__dirname, ["typescript"], {
quoteProps: "preserve"
quoteProps: "preserve",
});

run_spec(__dirname, ["typescript"], {
quoteProps: "consistent"
quoteProps: "consistent",
});
4 changes: 2 additions & 2 deletions tests/typescript/compiler/jsfmt.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ run_spec(__dirname, ["typescript"], {
disableBabelTS: [
"downlevelLetConst1.ts",
"errorOnInitializerInInterfaceProperty.ts",
"modifiersOnInterfaceIndexSignature1.ts"
]
"modifiersOnInterfaceIndexSignature1.ts",
],
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["classAbstractMixedWithModifiers.ts"]
disableBabelTS: ["classAbstractMixedWithModifiers.ts"],
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"]
disableBabelTS: ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"],
});
2 changes: 1 addition & 1 deletion tests/typescript/conformance/types/functions/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["functionOverloadErrorsSyntax.ts"]
disableBabelTS: ["functionOverloadErrorsSyntax.ts"],
});
2 changes: 1 addition & 1 deletion tests/typescript/custom/abstract/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"]
disableBabelTS: ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"],
});
2 changes: 1 addition & 1 deletion tests/typescript_class/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["constructor.ts", "generics.ts", "methods.ts"]
disableBabelTS: ["constructor.ts", "generics.ts", "methods.ts"],
});
6 changes: 3 additions & 3 deletions tests/typescript_error_recovery/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
run_spec(__dirname, ["typescript"], {
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"]
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"],
});
run_spec(__dirname, ["typescript"], {
trailingComma: "es5",
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"]
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"],
});
run_spec(__dirname, ["typescript"], {
trailingComma: "all",
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"]
disableBabelTS: ["jsdoc_only_types.ts", "index-signature.ts"],
});
2 changes: 1 addition & 1 deletion tests/typescript_interface/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run_spec(__dirname, ["typescript"], { disableBabelTS: ["abstract.ts"] });
run_spec(__dirname, ["typescript"], {
semi: false,
disableBabelTS: ["abstract.ts"]
disableBabelTS: ["abstract.ts"],
});

0 comments on commit 605e57d

Please sign in to comment.