diff --git a/.eslintrc.js b/.eslintrc.js index d9c68e8b0..28c478560 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -124,6 +124,7 @@ module.exports = { "unicorn/better-regex": "error", "unicorn/explicit-length-check": "error", + "unicorn/filename-case": "error", "unicorn/new-for-builtins": "error", "unicorn/no-array-for-each": "error", "unicorn/no-array-push-push": "error", @@ -289,6 +290,7 @@ module.exports = { "react/display-name": "off", "react/no-deprecated": "off", "react/prop-types": "off", + "unicorn/filename-case": "off", }, }, { diff --git a/src/language-css/parser-postcss.js b/src/language-css/parser-postcss.js index 5f60fac95..ac334014d 100644 --- a/src/language-css/parser-postcss.js +++ b/src/language-css/parser-postcss.js @@ -6,12 +6,12 @@ const parseFrontMatter = require("../utils/front-matter/parse.js"); const { hasPragma } = require("./pragma.js"); const { locStart, locEnd } = require("./loc.js"); const { calculateLoc, replaceQuotesInInlineComments } = require("./loc.js"); -const hasSCSSInterpolation = require("./utils/has-SCSS-interpolation.js"); +const hasSCSSInterpolation = require("./utils/has-scss-interpolation.js"); const hasStringOrFunction = require("./utils/has-string-or-function.js"); const isLessParser = require("./utils/is-less-parser.js"); const isSCSS = require("./utils/is-scss.js"); -const isSCSSNestedPropertyNode = require("./utils/is-SCSS-nested-property-node.js"); -const isSCSSVariable = require("./utils/is-SCSS-variable.js"); +const isSCSSNestedPropertyNode = require("./utils/is-scss-nested-property-node.js"); +const isSCSSVariable = require("./utils/is-scss-variable.js"); const stringifyNode = require("./utils/stringify-node.js"); const isModuleRuleName = require("./utils/is-module-rule-name.js"); diff --git a/src/language-css/utils/has-SCSS-interpolation.js b/src/language-css/utils/has-scss-interpolation.js similarity index 100% rename from src/language-css/utils/has-SCSS-interpolation.js rename to src/language-css/utils/has-scss-interpolation.js diff --git a/src/language-css/utils/is-SCSS-nested-property-node.js b/src/language-css/utils/is-scss-nested-property-node.js similarity index 100% rename from src/language-css/utils/is-SCSS-nested-property-node.js rename to src/language-css/utils/is-scss-nested-property-node.js diff --git a/src/language-css/utils/is-SCSS-variable.js b/src/language-css/utils/is-scss-variable.js similarity index 100% rename from src/language-css/utils/is-SCSS-variable.js rename to src/language-css/utils/is-scss-variable.js diff --git a/src/language-js/parse/postprocess/index.js b/src/language-js/parse/postprocess/index.js index cbd197dc8..3b3260bc6 100644 --- a/src/language-js/parse/postprocess/index.js +++ b/src/language-js/parse/postprocess/index.js @@ -4,7 +4,7 @@ const { locStart, locEnd } = require("../../loc.js"); const isTsKeywordType = require("../../utils/is-ts-keyword-type.js"); const isTypeCastComment = require("../../utils/is-type-cast-comment.js"); const getLast = require("../../../utils/get-last.js"); -const visitNode = require("./visitNode.js"); +const visitNode = require("./visit-node.js"); const { throwErrorForInvalidNodes } = require("./typescript.js"); function postprocess(ast, options) { diff --git a/src/language-js/parse/postprocess/typescript.js b/src/language-js/parse/postprocess/typescript.js index 329280a70..39a71708f 100644 --- a/src/language-js/parse/postprocess/typescript.js +++ b/src/language-js/parse/postprocess/typescript.js @@ -1,7 +1,7 @@ "use strict"; const createError = require("../../../common/parser-create-error.js"); -const visitNode = require("./visitNode.js"); +const visitNode = require("./visit-node.js"); function throwSyntaxError(node, message) { const { start, end } = node.loc; diff --git a/src/language-js/parse/postprocess/visitNode.js b/src/language-js/parse/postprocess/visit-node.js similarity index 100% rename from src/language-js/parse/postprocess/visitNode.js rename to src/language-js/parse/postprocess/visit-node.js diff --git a/tests/integration/__tests__/arg-parsing.js b/tests/integration/__tests__/arg-parsing.js index d04a45f24..433def782 100644 --- a/tests/integration/__tests__/arg-parsing.js +++ b/tests/integration/__tests__/arg-parsing.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); describe("boolean flags do not swallow the next argument", () => { diff --git a/tests/integration/__tests__/check.js b/tests/integration/__tests__/check.js index e47eec277..76b4acab5 100644 --- a/tests/integration/__tests__/check.js +++ b/tests/integration/__tests__/check.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("checks stdin with --check", () => { runPrettier("cli/with-shebang", ["--check", "--parser", "babel"], { diff --git a/tests/integration/__tests__/config-invalid.js b/tests/integration/__tests__/config-invalid.js index d8acde855..c27902982 100644 --- a/tests/integration/__tests__/config-invalid.js +++ b/tests/integration/__tests__/config-invalid.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js index 7e39b7f8f..84149e970 100644 --- a/tests/integration/__tests__/config-resolution.js +++ b/tests/integration/__tests__/config-resolution.js @@ -3,7 +3,7 @@ const path = require("path"); const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/cursor-offset.js b/tests/integration/__tests__/cursor-offset.js index e8c4f375b..38f8fc7eb 100644 --- a/tests/integration/__tests__/cursor-offset.js +++ b/tests/integration/__tests__/cursor-offset.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("write cursorOffset to stderr with --cursor-offset ", () => { runPrettier("cli", ["--cursor-offset", "2", "--parser", "babel"], { diff --git a/tests/integration/__tests__/debug-check.js b/tests/integration/__tests__/debug-check.js index 94a196d5f..bd96aa85c 100644 --- a/tests/integration/__tests__/debug-check.js +++ b/tests/integration/__tests__/debug-check.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("doesn't crash when --debug-check is passed", () => { runPrettier("cli/with-shebang", ["issue1890.js", "--debug-check"]).test({ diff --git a/tests/integration/__tests__/debug-print-ast.js b/tests/integration/__tests__/debug-print-ast.js index 53022674e..7927bff34 100644 --- a/tests/integration/__tests__/debug-print-ast.js +++ b/tests/integration/__tests__/debug-print-ast.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("prints information for debugging AST --debug-print-ast", () => { runPrettier("cli/with-shebang", ["--debug-print-ast", "--parser", "babel"], { diff --git a/tests/integration/__tests__/debug-print-comments.js b/tests/integration/__tests__/debug-print-comments.js index 5b10539f3..2b1f1f99f 100644 --- a/tests/integration/__tests__/debug-print-comments.js +++ b/tests/integration/__tests__/debug-print-comments.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("prints information for debugging comment attachment with --debug-print-comments", () => { runPrettier( diff --git a/tests/integration/__tests__/debug-print-doc.js b/tests/integration/__tests__/debug-print-doc.js index b165b6c93..4954bb448 100644 --- a/tests/integration/__tests__/debug-print-doc.js +++ b/tests/integration/__tests__/debug-print-doc.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("prints doc with --debug-print-doc", () => { runPrettier("cli/with-shebang", ["--debug-print-doc", "--parser", "babel"], { diff --git a/tests/integration/__tests__/early-exit.js b/tests/integration/__tests__/early-exit.js index 85277ba5a..8cf36ed21 100644 --- a/tests/integration/__tests__/early-exit.js +++ b/tests/integration/__tests__/early-exit.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const { isProduction } = require("../env.js"); describe("show version with --version", () => { diff --git a/tests/integration/__tests__/error-on-unmatched-pattern.js b/tests/integration/__tests__/error-on-unmatched-pattern.js index 0cea212d3..36bf16aed 100644 --- a/tests/integration/__tests__/error-on-unmatched-pattern.js +++ b/tests/integration/__tests__/error-on-unmatched-pattern.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("no error on unmatched pattern", () => { runPrettier("cli/error-on-unmatched-pattern", [ diff --git a/tests/integration/__tests__/file-info.js b/tests/integration/__tests__/file-info.js index 009b36820..e121e505e 100644 --- a/tests/integration/__tests__/file-info.js +++ b/tests/integration/__tests__/file-info.js @@ -6,7 +6,7 @@ const tempy = require("tempy"); const fromPairs = require("lodash/fromPairs"); const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/help-options.js b/tests/integration/__tests__/help-options.js index f87acfa2f..fb03f529e 100644 --- a/tests/integration/__tests__/help-options.js +++ b/tests/integration/__tests__/help-options.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const constant = require("../../../src/cli/constant.js"); const { createDetailedOptionMap, diff --git a/tests/integration/__tests__/ignore-absolute-path.js b/tests/integration/__tests__/ignore-absolute-path.js index 79fde347f..23749ded2 100644 --- a/tests/integration/__tests__/ignore-absolute-path.js +++ b/tests/integration/__tests__/ignore-absolute-path.js @@ -1,7 +1,7 @@ "use strict"; const path = require("path"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("support absolute filename", () => { runPrettier("cli/ignore-absolute-path", [ diff --git a/tests/integration/__tests__/ignore-emoji.js b/tests/integration/__tests__/ignore-emoji.js index a18ff4e90..41939a4cf 100644 --- a/tests/integration/__tests__/ignore-emoji.js +++ b/tests/integration/__tests__/ignore-emoji.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/ignore-in-subdirectories.js b/tests/integration/__tests__/ignore-in-subdirectories.js index b30d361fe..e99e1015e 100644 --- a/tests/integration/__tests__/ignore-in-subdirectories.js +++ b/tests/integration/__tests__/ignore-in-subdirectories.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/ignore-path.js b/tests/integration/__tests__/ignore-path.js index b7877a1bd..63dd2451f 100644 --- a/tests/integration/__tests__/ignore-path.js +++ b/tests/integration/__tests__/ignore-path.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); fs.writeFileSync( // This file is in `.gitignore`, just copy from `regular-module.js` diff --git a/tests/integration/__tests__/ignore-relative-path.js b/tests/integration/__tests__/ignore-relative-path.js index 85a0939cd..8bb7525a5 100644 --- a/tests/integration/__tests__/ignore-relative-path.js +++ b/tests/integration/__tests__/ignore-relative-path.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/ignore-unknown.js b/tests/integration/__tests__/ignore-unknown.js index 13846a720..68967e173 100644 --- a/tests/integration/__tests__/ignore-unknown.js +++ b/tests/integration/__tests__/ignore-unknown.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("ignore-unknown dir", () => { runPrettier("cli/ignore-unknown", [ diff --git a/tests/integration/__tests__/ignore-vcs-files.js b/tests/integration/__tests__/ignore-vcs-files.js index 058bd15f6..a6416647b 100644 --- a/tests/integration/__tests__/ignore-vcs-files.js +++ b/tests/integration/__tests__/ignore-vcs-files.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/infer-parser.js b/tests/integration/__tests__/infer-parser.js index bd98fa819..029a5abf6 100644 --- a/tests/integration/__tests__/infer-parser.js +++ b/tests/integration/__tests__/infer-parser.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("stdin no path and no parser", () => { describe("logs error and exits with 2", () => { diff --git a/tests/integration/__tests__/invalid-ignore.js b/tests/integration/__tests__/invalid-ignore.js index 55ed1cc7a..6902461bd 100644 --- a/tests/integration/__tests__/invalid-ignore.js +++ b/tests/integration/__tests__/invalid-ignore.js @@ -2,7 +2,7 @@ const path = require("path"); const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/line-suffix-boundary.js b/tests/integration/__tests__/line-suffix-boundary.js index 8e1cd7a03..e74dc58b6 100644 --- a/tests/integration/__tests__/line-suffix-boundary.js +++ b/tests/integration/__tests__/line-suffix-boundary.js @@ -6,7 +6,7 @@ const prettier = require("prettier-local"); const { group, indent, line, lineSuffix, lineSuffixBoundary, softline } = prettier.doc.builders; -const printDoc = require("../printDoc.js"); +const printDoc = require("../print-doc.js"); describe("lineSuffixBoundary", () => { test("should be correctly treated as a potential line break in `fits`", () => { diff --git a/tests/integration/__tests__/list-different.js b/tests/integration/__tests__/list-different.js index 2de416d56..4eada3755 100644 --- a/tests/integration/__tests__/list-different.js +++ b/tests/integration/__tests__/list-different.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("checks stdin with --list-different", () => { runPrettier("cli/with-shebang", ["--list-different", "--parser", "babel"], { diff --git a/tests/integration/__tests__/loglevel.js b/tests/integration/__tests__/loglevel.js index bb9bc3319..51d745e38 100644 --- a/tests/integration/__tests__/loglevel.js +++ b/tests/integration/__tests__/loglevel.js @@ -1,7 +1,7 @@ "use strict"; const stripAnsi = require("strip-ansi"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); test("do not show logs with --loglevel silent", async () => { await runPrettierWithLogLevel("silent", null); diff --git a/tests/integration/__tests__/parser-api.js b/tests/integration/__tests__/parser-api.js index 8f88a67a5..b9e69de25 100644 --- a/tests/integration/__tests__/parser-api.js +++ b/tests/integration/__tests__/parser-api.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); test("allows custom parser provided as object", () => { const output = prettier.format("1", { diff --git a/tests/integration/__tests__/patterns-dirs.js b/tests/integration/__tests__/patterns-dirs.js index 803b41377..3d8546bc5 100644 --- a/tests/integration/__tests__/patterns-dirs.js +++ b/tests/integration/__tests__/patterns-dirs.js @@ -2,7 +2,7 @@ const path = require("path"); const fs = require("fs"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const { projectRoot } = require("../env.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/patterns-glob.js b/tests/integration/__tests__/patterns-glob.js index 4bb648939..e69acf18f 100644 --- a/tests/integration/__tests__/patterns-glob.js +++ b/tests/integration/__tests__/patterns-glob.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/patterns.js b/tests/integration/__tests__/patterns.js index 455829833..ccf494aaf 100644 --- a/tests/integration/__tests__/patterns.js +++ b/tests/integration/__tests__/patterns.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/piped-output.js b/tests/integration/__tests__/piped-output.js index 004c5eb89..fdadb0dbb 100644 --- a/tests/integration/__tests__/piped-output.js +++ b/tests/integration/__tests__/piped-output.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("output with --check + unformatted differs when piped", () => { const cli0 = runPrettier( diff --git a/tests/integration/__tests__/plugin-default-options.js b/tests/integration/__tests__/plugin-default-options.js index 76c9f4002..31e28e85e 100644 --- a/tests/integration/__tests__/plugin-default-options.js +++ b/tests/integration/__tests__/plugin-default-options.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("plugin default options should work", () => { runPrettier( diff --git a/tests/integration/__tests__/plugin-extensions.js b/tests/integration/__tests__/plugin-extensions.js index 2bba45602..d9ab5a6f1 100644 --- a/tests/integration/__tests__/plugin-extensions.js +++ b/tests/integration/__tests__/plugin-extensions.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const EOL = "\n"; describe("uses 'extensions' from languages to determine parser", () => { diff --git a/tests/integration/__tests__/plugin-flush-line-suffix.js b/tests/integration/__tests__/plugin-flush-line-suffix.js index 0ed261439..7487783fd 100644 --- a/tests/integration/__tests__/plugin-flush-line-suffix.js +++ b/tests/integration/__tests__/plugin-flush-line-suffix.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("flush all line-suffix content", () => { runPrettier("plugins/flushLineSuffix", ["*.foo", "--plugin=./plugin"], { diff --git a/tests/integration/__tests__/plugin-options-string.js b/tests/integration/__tests__/plugin-options-string.js index 1dd3a4d88..dea3b778a 100644 --- a/tests/integration/__tests__/plugin-options-string.js +++ b/tests/integration/__tests__/plugin-options-string.js @@ -1,7 +1,7 @@ "use strict"; const snapshotDiff = require("snapshot-diff"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); test("show external options with `--help`", async () => { const originalStdout = await runPrettier("plugins/options-string", ["--help"]) diff --git a/tests/integration/__tests__/plugin-options.js b/tests/integration/__tests__/plugin-options.js index 22cafb738..4e9f69998 100644 --- a/tests/integration/__tests__/plugin-options.js +++ b/tests/integration/__tests__/plugin-options.js @@ -1,7 +1,7 @@ "use strict"; const snapshotDiff = require("snapshot-diff"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); test("show external options with `--help`", async () => { const originalStdout = await runPrettier("plugins/options", ["--help"]) diff --git a/tests/integration/__tests__/plugin-precedence.js b/tests/integration/__tests__/plugin-precedence.js index 0770ab4b5..e22985324 100644 --- a/tests/integration/__tests__/plugin-precedence.js +++ b/tests/integration/__tests__/plugin-precedence.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("json-stringify takes precedence over json for package.json", () => { runPrettier("plugins", ["--stdin-filepath=package.json"], { diff --git a/tests/integration/__tests__/plugin-preprocess.js b/tests/integration/__tests__/plugin-preprocess.js index 0c0452e42..2d0457b19 100644 --- a/tests/integration/__tests__/plugin-preprocess.js +++ b/tests/integration/__tests__/plugin-preprocess.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const EOL = "\n"; describe("parser preprocess function is used to reshape input text", () => { diff --git a/tests/integration/__tests__/plugin-resolution.js b/tests/integration/__tests__/plugin-resolution.js index 8b51b7866..55118184b 100644 --- a/tests/integration/__tests__/plugin-resolution.js +++ b/tests/integration/__tests__/plugin-resolution.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); const EOL = "\n"; describe("automatically loads 'prettier-plugin-*'", () => { diff --git a/tests/integration/__tests__/plugin-virtual-directory.js b/tests/integration/__tests__/plugin-virtual-directory.js index 44c95f6c4..280562d4b 100644 --- a/tests/integration/__tests__/plugin-virtual-directory.js +++ b/tests/integration/__tests__/plugin-virtual-directory.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("plugin search should not crash when prettier isn't inside a directory", () => { runPrettier( diff --git a/tests/integration/__tests__/skip-folders.js b/tests/integration/__tests__/skip-folders.js index dd1ea822b..fda9a2efb 100644 --- a/tests/integration/__tests__/skip-folders.js +++ b/tests/integration/__tests__/skip-folders.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/stdin-filepath.js b/tests/integration/__tests__/stdin-filepath.js index 53f53b8e1..5be8c05d5 100644 --- a/tests/integration/__tests__/stdin-filepath.js +++ b/tests/integration/__tests__/stdin-filepath.js @@ -1,7 +1,7 @@ "use strict"; const { isCI } = require("ci-info"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("format correctly if stdin content compatible with stdin-filepath", () => { runPrettier( diff --git a/tests/integration/__tests__/support-info.js b/tests/integration/__tests__/support-info.js index 57cd9d7df..017d6af5d 100644 --- a/tests/integration/__tests__/support-info.js +++ b/tests/integration/__tests__/support-info.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); test("API getSupportInfo()", () => { expect(getCoreInfo()).toMatchSnapshot(); diff --git a/tests/integration/__tests__/syntax-error.js b/tests/integration/__tests__/syntax-error.js index e33c23e5b..a4d043068 100644 --- a/tests/integration/__tests__/syntax-error.js +++ b/tests/integration/__tests__/syntax-error.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("exits with non-zero code when input has a syntax error", () => { runPrettier("cli/with-shebang", ["--parser", "babel"], { diff --git a/tests/integration/__tests__/with-config-precedence.js b/tests/integration/__tests__/with-config-precedence.js index 39944e10f..ff1d0592b 100644 --- a/tests/integration/__tests__/with-config-precedence.js +++ b/tests/integration/__tests__/with-config-precedence.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("CLI overrides take precedence without --config-precedence", () => { runPrettier("cli/config/", [ diff --git a/tests/integration/__tests__/with-node-modules.js b/tests/integration/__tests__/with-node-modules.js index 689b9eafa..a9cb5ef56 100644 --- a/tests/integration/__tests__/with-node-modules.js +++ b/tests/integration/__tests__/with-node-modules.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); expect.addSnapshotSerializer(require("../path-serializer.js")); diff --git a/tests/integration/__tests__/with-parser-inference.js b/tests/integration/__tests__/with-parser-inference.js index caacb5d48..3dd4fc913 100644 --- a/tests/integration/__tests__/with-parser-inference.js +++ b/tests/integration/__tests__/with-parser-inference.js @@ -1,7 +1,7 @@ "use strict"; const prettier = require("prettier-local"); -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("infers postcss parser", () => { runPrettier("cli/with-parser-inference", ["--end-of-line", "lf", "*"]).test({ diff --git a/tests/integration/__tests__/with-shebang.js b/tests/integration/__tests__/with-shebang.js index 7d9e7bae7..7b4fe264d 100644 --- a/tests/integration/__tests__/with-shebang.js +++ b/tests/integration/__tests__/with-shebang.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("preserves shebang", () => { runPrettier("cli/with-shebang", ["--end-of-line", "lf", "issue1890.js"]).test( diff --git a/tests/integration/__tests__/write.js b/tests/integration/__tests__/write.js index a649af391..ae702be37 100644 --- a/tests/integration/__tests__/write.js +++ b/tests/integration/__tests__/write.js @@ -1,6 +1,6 @@ "use strict"; -const runPrettier = require("../runPrettier.js"); +const runPrettier = require("../run-prettier.js"); describe("write file with --write + unformatted file", () => { runPrettier("cli/write", ["--write", "unformatted.js"]).test({ diff --git a/tests/integration/printDoc.js b/tests/integration/print-doc.js similarity index 100% rename from tests/integration/printDoc.js rename to tests/integration/print-doc.js diff --git a/tests/integration/runPrettier.js b/tests/integration/run-prettier.js similarity index 100% rename from tests/integration/runPrettier.js rename to tests/integration/run-prettier.js