Skip to content

Commit

Permalink
prettiercache -> prettier-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed May 18, 2022
1 parent af29b16 commit b4de3fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion cspell.json
Expand Up @@ -258,7 +258,6 @@
"precommit",
"prefetch",
"preorder",
"prettiercache",
"prettierformatsource",
"prettiergetsupportinfo",
"prettierignore",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/find-cache-file.js
Expand Up @@ -5,12 +5,12 @@ const path = require("path");
const findCacheDir = require("find-cache-dir");

/**
* Find default cache file (`./node_modules/.cache/prettier/.prettiercache`) using https://github.com/avajs/find-cache-dir
* Find default cache file (`./node_modules/.cache/prettier/.prettier-cache`) using https://github.com/avajs/find-cache-dir
*/
function findDefaultCacheFile() {
const cacheDir =
findCacheDir({ name: "prettier", create: true }) || os.tmpdir();
const cacheFilePath = path.join(cacheDir, ".prettiercache");
const cacheFilePath = path.join(cacheDir, ".prettier-cache");
return cacheFilePath;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/__tests__/cache.js
Expand Up @@ -15,7 +15,7 @@ describe("--cache option", () => {
const dir = resolveDir("cli/cache");
const defaultCacheFile = path.join(
dir,
"node_modules/.cache/prettier/.prettiercache"
"node_modules/.cache/prettier/.prettier-cache"
);

let contentA;
Expand All @@ -32,7 +32,7 @@ describe("--cache option", () => {
await fs.writeFile(path.join(dir, "b.js"), contentB);
});

it("creates default cache file named `node_modules/.cache/prettier/.prettiercache`", async () => {
it("creates default cache file named `node_modules/.cache/prettier/.prettier-cache`", async () => {
await expect(fs.stat(defaultCacheFile)).rejects.toHaveProperty(
"code",
"ENOENT"
Expand Down

0 comments on commit b4de3fd

Please sign in to comment.