Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ yarn-error.log*
.vercel
# next-agents-md
.next-docs/

# Tool caches
.cache
Comment on lines +36 to +37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore tool caches in generated projects

Mirror this ignore in the scaffold templates. The checked root, api, and monorepo .gitignore_template files contain no .cache pattern, while the newly generated lint and format scripts write under .cache/eslint and .cache/prettier (ESLint's --help defines --cache-location as the cache file or directory path). Consequently, running either command in a newly scaffolded project immediately leaves generated cache artifacts in git status.

Useful? React with 👍 / 👎.

4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"build": "tsc && tsc-alias -p tsconfig.json",
"start": "node dist/src/index.js",
"drizzle-kit": "drizzle-kit",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"i18n:create": "vitnode i18n:create",
"i18n:check": "vitnode i18n:check",
"i18n:delete": "vitnode i18n:delete",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"dev": "pnpm --filter api db:prepare && vite dev --port 3000",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint .",
"format": "prettier --write . && eslint --fix",
"check": "prettier --check .",
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"format": "prettier --write . --cache --cache-location .cache/prettier && pnpm lint:fix",
"check": "prettier --check . --cache --cache-location .cache/prettier",
"start": "node .output/server/index.mjs",
"typecheck": "tsc --noEmit",
"lint:fix": "eslint . --fix",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"docs:check": "node scripts/check-docs.mjs",
"postinstall": "fumadocs-mdx"
},
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"i18n:check": "turbo i18n:check",
"i18n:delete": "turbo i18n:delete",
"i18n:update": "turbo i18n:update",
"i18n:update:ai": "turbo i18n:update:ai"
"i18n:update:ai": "turbo i18n:update:ai",
"format": "prettier . --write --cache --cache-location .cache/prettier",
"format:check": "prettier . --check --cache --cache-location .cache/prettier"
},
"devDependencies": {
"@types/node": "^26.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/config/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import eslint from "@eslint/js";
import perfectionist from "eslint-plugin-perfectionist";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import tsEslint from "typescript-eslint";

export default [
Expand All @@ -24,7 +24,6 @@ export default [
eslint.configs.recommended,
...tsEslint.configs.stylisticTypeChecked,
...tsEslint.configs.strictTypeChecked,
eslintPluginPrettierRecommended,
perfectionist.configs["recommended-natural"],
{ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"] },
{
Expand Down Expand Up @@ -121,4 +120,5 @@ export default [
files: ["**/src/routes.ts", "**/src/routes.tsx"],
rules: { "@typescript-eslint/promise-function-async": "off" },
},
eslintConfigPrettier,
];
1 change: 0 additions & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.10.0",
"eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-you-might-not-need-an-effect": "^1.0.1",
"prettier-plugin-tailwindcss": "^0.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
"dependsOn": ["^start"]
},
"lint": {
"dependsOn": ["^lint"]
"dependsOn": ["^lint"],
"outputs": [".cache/eslint/**"]
},
"lint:fix": {
"cache": false,
"dependsOn": ["^lint:fix"]
},
"i18n:create": {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vitnode-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"scripts": {
"build:scripts": "tsc -p tsconfig.build.json && node dist/src/prepare/prepare.js",
"start:scripts": "node dist/src/index.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"test": "vitest run",
"test:watch": "vitest"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/create-vitnode-app/src/create/create-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const paths = (root: string) => ({
* Shared blocks
*/
const eslintScripts = {
lint: "eslint .",
"lint:fix": "eslint . --fix",
lint: "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
};
const i18nScripts = {
"i18n:create": "vitnode i18n:create",
Expand Down Expand Up @@ -69,6 +69,8 @@ export const rootScripts = (
"i18n:update": "turbo i18n:update",
"i18n:update:ai": "turbo i18n:update:ai",
...withIf(enableEslint, {
format: "prettier . --write --cache --cache-location .cache/prettier",
"format:check": "prettier . --check --cache --cache-location .cache/prettier",
Comment on lines +72 to +73

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add formatting commands to standalone scaffolds

When singleApp or onlyApi is generated without --monorepo, createPackageJSON never uses rootScripts; it writes singleAppScripts or apiScripts, which only receive the new ESLint-only scripts. Because the shared ESLint configuration no longer invokes Prettier, these generated projects now have neither a formatting command nor a formatting check, and their former lint:fix workflow no longer formats files. Add the explicit Prettier scripts to the standalone script sets as well.

Useful? React with 👍 / 👎.

lint: "turbo lint",
"lint:fix": "turbo lint:fix",
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const createPluginPackageJSON = async ({
dev: "vitnode dev",
"dev:email": "email dev --dir src/emails",
...withIf(eslint, {
lint: "turbo lint",
"lint:fix": "turbo lint:fix",
lint: "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
}),
},
exports: pluginPackageExports(),
Expand Down
4 changes: 2 additions & 2 deletions packages/elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"@elastic/elasticsearch": "^9.4.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/node-cron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"node-cron": "^4.6.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/nodemailer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"nodemailer": "^9.0.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/resend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"resend": "^6.18.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1092.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/supabase-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev:plugins": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"dependencies": {
"@supabase/storage-js": "^2.110.8"
Expand Down
4 changes: 2 additions & 2 deletions packages/vitnode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:types": "vitest run --typecheck.only",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto"
},
"type": "module",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions plugins/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"build:plugins": "vitnode build",
"dev": "vitnode dev",
"dev:email": "email dev --dir src/emails",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"test": "vitest run",
"test:watch": "vitest",
"test:types": "vitest run --typecheck.only"
Expand Down
4 changes: 2 additions & 2 deletions plugins/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"scripts": {
"build:plugins": "vitnode build",
"dev": "vitnode dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto",
"test": "vitest run",
"test:watch": "vitest"
},
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@
"env": ["POSTGRES_URL", "NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_WEB_URL"]
},
"lint": {
"dependsOn": ["^lint"]
"dependsOn": ["^lint"],
"outputs": [".cache/eslint/**"]
},
"lint:fix": {
"cache": false,
"dependsOn": ["^lint:fix"]
},
"start": {
Expand Down