diff --git a/apps/web/lint-staged.config.mjs b/apps/web/lint-staged.config.mjs new file mode 100644 index 0000000..26d2ae3 --- /dev/null +++ b/apps/web/lint-staged.config.mjs @@ -0,0 +1 @@ +export { default } from '@repo/lint-staged-config/config'; diff --git a/apps/web/package.json b/apps/web/package.json index 9a12e9f..ec98593 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@repo/eslint-config": "workspace:*", + "@repo/lint-staged-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@types/node": "catalog:", "@types/react": "catalog:", @@ -28,10 +29,5 @@ "postcss": "catalog:", "tailwindcss": "catalog:", "typescript": "catalog:" - }, - "lint-staged": { - "*.{js,jsx,ts,tsx,md,json}": [ - "eslint --fix" - ] } } diff --git a/packages/lint-staged-config/config.mjs b/packages/lint-staged-config/config.mjs new file mode 100644 index 0000000..9a220a5 --- /dev/null +++ b/packages/lint-staged-config/config.mjs @@ -0,0 +1,3 @@ +export default { + '*.{js,jsx,ts,tsx,md,json}': ['eslint --fix'], +}; diff --git a/packages/lint-staged-config/package.json b/packages/lint-staged-config/package.json new file mode 100644 index 0000000..2ce0450 --- /dev/null +++ b/packages/lint-staged-config/package.json @@ -0,0 +1,13 @@ +{ + "name": "@repo/lint-staged-config", + "version": "0.0.0", + "type": "module", + "private": true, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "exports": { + "./config": "./config.mjs" + } +} diff --git a/packages/ui/lint-staged.config.mjs b/packages/ui/lint-staged.config.mjs new file mode 100644 index 0000000..26d2ae3 --- /dev/null +++ b/packages/ui/lint-staged.config.mjs @@ -0,0 +1 @@ +export { default } from '@repo/lint-staged-config/config'; diff --git a/packages/ui/package.json b/packages/ui/package.json index cb95def..800f6d2 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,6 +29,7 @@ "devDependencies": { "@radix-ui/react-slot": "catalog:", "@repo/eslint-config": "workspace:*", + "@repo/lint-staged-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@types/react": "catalog:", "autoprefixer": "catalog:", @@ -46,10 +47,5 @@ "dependencies": { "react": "catalog:", "react-dom": "catalog:" - }, - "lint-staged": { - "*.{js,jsx,ts,tsx,md,json}": [ - "eslint --fix" - ] } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74c2437..52a71f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,6 +117,9 @@ importers: '@repo/eslint-config': specifier: workspace:* version: link:../../packages/eslint-config + '@repo/lint-staged-config': + specifier: workspace:* + version: link:../../packages/lint-staged-config '@repo/typescript-config': specifier: workspace:* version: link:../../packages/typescript-config @@ -160,6 +163,8 @@ importers: specifier: 'catalog:' version: 2.3.2(eslint@9.15.0(jiti@1.21.6)) + packages/lint-staged-config: {} + packages/typescript-config: {} packages/ui: @@ -177,6 +182,9 @@ importers: '@repo/eslint-config': specifier: workspace:* version: link:../eslint-config + '@repo/lint-staged-config': + specifier: workspace:* + version: link:../lint-staged-config '@repo/typescript-config': specifier: workspace:* version: link:../typescript-config