diff --git a/.prettierignore b/.prettierignore index f306015e3..7a309d2a7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,7 @@ dist/ .cache/ coverage/ -/tests/ +/tests/**/*.* !/tests/**/jsfmt.spec.js /tests_integration/cli/ /tests_integration/plugins/ diff --git a/tests/arrow-call/jsfmt.spec.js b/tests/arrow-call/jsfmt.spec.js index 3f8b48a0b..3f436996f 100644 --- a/tests/arrow-call/jsfmt.spec.js +++ b/tests/arrow-call/jsfmt.spec.js @@ -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", }); diff --git a/tests/comments_jsx_same_line/jsfmt.spec.js b/tests/comments_jsx_same_line/jsfmt.spec.js index 478e472a6..7cec70314 100644 --- a/tests/comments_jsx_same_line/jsfmt.spec.js +++ b/tests/comments_jsx_same_line/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["flow", "babel", "typescript"], { - jsxBracketSameLine: true + jsxBracketSameLine: true, }); diff --git a/tests/cursor/jsfmt.spec.js b/tests/cursor/jsfmt.spec.js index b16ec2b2f..49553ffb2 100644 --- a/tests/cursor/jsfmt.spec.js +++ b/tests/cursor/jsfmt.spec.js @@ -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, }); }); @@ -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, }); }); @@ -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, }); }); @@ -43,6 +43,6 @@ foo('bar', cb => { console.log("stuff"); }); `, - cursorOffset: 25 + cursorOffset: 25, }); }); diff --git a/tests/empty/jsfmt.spec.js b/tests/empty/jsfmt.spec.js index 1277371c5..58c7c013f 100644 --- a/tests/empty/jsfmt.spec.js +++ b/tests/empty/jsfmt.spec.js @@ -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) ); diff --git a/tests/jsx/jsfmt.spec.js b/tests/jsx/jsfmt.spec.js index 1f6f2c02b..f864fc536 100644 --- a/tests/jsx/jsfmt.spec.js +++ b/tests/jsx/jsfmt.spec.js @@ -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, }); diff --git a/tests/multiparser_js_html/jsfmt.spec.js b/tests/multiparser_js_html/jsfmt.spec.js index ebb684d41..afb41c93b 100644 --- a/tests/multiparser_js_html/jsfmt.spec.js +++ b/tests/multiparser_js_html/jsfmt.spec.js @@ -1,4 +1,4 @@ run_spec(__dirname, ["babel", "flow", "typescript"]); run_spec(__dirname, ["babel", "flow", "typescript"], { - htmlWhitespaceSensitivity: "ignore" + htmlWhitespaceSensitivity: "ignore", }); diff --git a/tests/quote_props/jsfmt.spec.js b/tests/quote_props/jsfmt.spec.js index 0c8f1ad3e..7652348d9 100644 --- a/tests/quote_props/jsfmt.spec.js +++ b/tests/quote_props/jsfmt.spec.js @@ -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, }); diff --git a/tests/quote_props_typescript/jsfmt.spec.js b/tests/quote_props_typescript/jsfmt.spec.js index b2443baa4..c17eda737 100644 --- a/tests/quote_props_typescript/jsfmt.spec.js +++ b/tests/quote_props_typescript/jsfmt.spec.js @@ -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", }); diff --git a/tests/typescript/compiler/jsfmt.spec.js b/tests/typescript/compiler/jsfmt.spec.js index e018c7184..2eeafba64 100644 --- a/tests/typescript/compiler/jsfmt.spec.js +++ b/tests/typescript/compiler/jsfmt.spec.js @@ -2,6 +2,6 @@ run_spec(__dirname, ["typescript"], { disableBabelTS: [ "downlevelLetConst1.ts", "errorOnInitializerInInterfaceProperty.ts", - "modifiersOnInterfaceIndexSignature1.ts" - ] + "modifiersOnInterfaceIndexSignature1.ts", + ], }); diff --git a/tests/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js b/tests/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js index 900677c6a..a78c9d443 100644 --- a/tests/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js +++ b/tests/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["typescript"], { - disableBabelTS: ["classAbstractMixedWithModifiers.ts"] + disableBabelTS: ["classAbstractMixedWithModifiers.ts"], }); diff --git a/tests/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js b/tests/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js index b8a739b47..66a924401 100644 --- a/tests/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js +++ b/tests/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["typescript"], { - disableBabelTS: ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"] + disableBabelTS: ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"], }); diff --git a/tests/typescript/conformance/types/functions/jsfmt.spec.js b/tests/typescript/conformance/types/functions/jsfmt.spec.js index c5547c764..18f3c1f02 100644 --- a/tests/typescript/conformance/types/functions/jsfmt.spec.js +++ b/tests/typescript/conformance/types/functions/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["typescript"], { - disableBabelTS: ["functionOverloadErrorsSyntax.ts"] + disableBabelTS: ["functionOverloadErrorsSyntax.ts"], }); diff --git a/tests/typescript/custom/abstract/jsfmt.spec.js b/tests/typescript/custom/abstract/jsfmt.spec.js index cc68c821f..65d2aad21 100644 --- a/tests/typescript/custom/abstract/jsfmt.spec.js +++ b/tests/typescript/custom/abstract/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["typescript"], { - disableBabelTS: ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"] + disableBabelTS: ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"], }); diff --git a/tests/typescript_class/jsfmt.spec.js b/tests/typescript_class/jsfmt.spec.js index ca20c03e0..c3810386c 100644 --- a/tests/typescript_class/jsfmt.spec.js +++ b/tests/typescript_class/jsfmt.spec.js @@ -1,3 +1,3 @@ run_spec(__dirname, ["typescript"], { - disableBabelTS: ["constructor.ts", "generics.ts", "methods.ts"] + disableBabelTS: ["constructor.ts", "generics.ts", "methods.ts"], }); diff --git a/tests/typescript_error_recovery/jsfmt.spec.js b/tests/typescript_error_recovery/jsfmt.spec.js index e097bb78e..59512d723 100644 --- a/tests/typescript_error_recovery/jsfmt.spec.js +++ b/tests/typescript_error_recovery/jsfmt.spec.js @@ -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"], }); diff --git a/tests/typescript_interface/jsfmt.spec.js b/tests/typescript_interface/jsfmt.spec.js index 1336a726c..1c149d003 100644 --- a/tests/typescript_interface/jsfmt.spec.js +++ b/tests/typescript_interface/jsfmt.spec.js @@ -1,5 +1,5 @@ run_spec(__dirname, ["typescript"], { disableBabelTS: ["abstract.ts"] }); run_spec(__dirname, ["typescript"], { semi: false, - disableBabelTS: ["abstract.ts"] + disableBabelTS: ["abstract.ts"], });