diff --git a/package.json b/package.json index 4218a4f7d..38e94dcc8 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "build-api": "lazy build-api", "build-package": "lazy build-package", "lint": "lazy lint", - "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json}\"", + "format": "prettier --write --cache \"**/*.{ts,tsx,js,jsx,json}\"", "typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts", "check-scripts": "tsx scripts/check-scripts.ts", "api-check": "lazy api-check", @@ -56,7 +56,7 @@ "packageManager": "yarn@3.5.0", "lint-staged": { "*.{js,jsx,ts,tsx,json}": [ - "prettier --write" + "prettier --write --cache" ] }, "devDependencies": { diff --git a/packages/tlschema/package.json b/packages/tlschema/package.json index 13d6ee6dc..65e7ef87b 100644 --- a/packages/tlschema/package.json +++ b/packages/tlschema/package.json @@ -34,7 +34,7 @@ "test": "lazy inherit", "test-coverage": "lazy inherit", "index": "node ./scripts/build-index.js && yarn format", - "format": "yarn run -T prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"", + "format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"", "build": "yarn run -T tsx ../../scripts/build-package.ts", "build-api": "yarn run -T tsx ../../scripts/build-api.ts", "prepack": "yarn run -T tsx ../../scripts/prepack.ts", diff --git a/scripts/lint.ts b/scripts/lint.ts index 5f42b17aa..79fe74391 100755 --- a/scripts/lint.ts +++ b/scripts/lint.ts @@ -54,6 +54,7 @@ async function main() { '-T', 'prettier', shouldFix ? '--write' : '--check', + '--cache', ...prettierFiles, ]) await exec('yarn', [