Skip to content

Commit

Permalink
Merge pull request #302 from lishaduck/cache-docs
Browse files Browse the repository at this point in the history
Update caching docs
  • Loading branch information
AndreaPontrandolfo authored Nov 11, 2024
2 parents 4af5210 + b403185 commit d6c4ef0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/config-validation-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"validate-config": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache"
"validate-config": "eslint . --max-warnings=0"
},
"dependencies": {
"astro": "^4.12.2",
Expand Down
5 changes: 3 additions & 2 deletions apps/docs-website/docs/performance-considerations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,15 @@ export default defineFlatConfig([

This is a tradeoff, as this approach is a DX degradation and could lead to some developer frustration, because perfectly valid code in local environment could instead fail in CI.

### Adopt ESLint cache
{/* Caching doesn't handles dependencies, breaking typescript-eslint and eslint-plugin-import: https://typescript-eslint.io/troubleshooting/faqs/eslint/#can-i-use-eslints---cache-with-typescript-eslint */}
{/* ### Adopt ESLint's cache
ESLint features an internal cache where you can store your previous runs.
This technique has pretty much no downsides and you should employ it in any case, regardless of any other factor.
Read the official docs on ESLint caching here: [command-line-interface#caching](https://eslint.org/docs/latest/use/command-line-interface#caching). <br />
Instead, if your project lives in a monorepo, you can follow [this guide](https://www.shew.dev/monorepos/guardrails/eslint).
Instead, if your project lives in a monorepo, you can follow [this guide](https://www.shew.dev/monorepos/guardrails/eslint). */}

### Review glob patterns

Expand Down
2 changes: 1 addition & 1 deletion apps/docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc --noEmit",
"lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
"lint": "eslint . --max-warnings=0",
"typesync": "typesync --dry=fail",
"clean": "pnpm clear && rm -rf .turbo dist node_modules/.cache"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/sheriff-webservices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "tsx watch ./src/index.ts",
"build": "tsc",
"typecheck": "tsc --noEmit",
"lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
"lint": "eslint . --max-warnings=0",
"typesync": "typesync --dry=fail",
"serve": "node ./dist/index.js",
"clean": "rm -rf .turbo dist node_modules/.cache"
Expand Down
2 changes: 1 addition & 1 deletion packages/sheriff-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf .turbo dist node_modules/.cache",
"build": "tsup",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
"lint": "eslint ./src --max-warnings=0",
"publint": "publint",
"typesync": "typesync --dry=fail"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sheriff-create-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "tsup",
"build-watch": "tsup",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
"lint": "eslint ./src --max-warnings=0",
"publint": "publint",
"typesync": "typesync --dry=fail"
},
Expand Down
2 changes: 0 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
"outputs": ["node_modules/.cache/tsbuildinfo.json"]
},
"lint": {
"outputs": ["node_modules/.cache/.eslintcache"],
"dependsOn": ["^topo", "^build"]
},
"validate-config": {
"outputs": ["node_modules/.cache/.eslintcache"],
"dependsOn": ["^topo", "^build"]
},
"publint": {
Expand Down

0 comments on commit d6c4ef0

Please sign in to comment.