Files
plane/turbo.json
sriram veeraghanta cf44769280 chore: enforce react-hooks/rules-of-hooks as error (#6820)
* chore: enforce react-hooks/rules-of-hooks as error

- Promote react-hooks/rules-of-hooks from warn to error in oxlint
- Add nested oxlint config for silo (pure Node.js app) extending root and disabling React hook rules
- Fix rules-of-hooks violations in blocks, propel, space, and editor
- Drop obsolete eslint cache path from check:lint turbo outputs

* Update packages/editor/src/ee/extensions/multi-column/column/components/drag-handle.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: use named render functions in stories to satisfy rules-of-hooks

* fix: resolve lint warnings in formatting-icons stories

- Replace unassociated <label> elements with <span>
- Add void operator to floating clipboard promises
- Add explicit return in .then() callbacks
- Fix formatting

* fix: resolve rules-of-hooks violations for useState and useAiFlag

- Extract use*Feature methods from useQuickActionsFactory into standalone
  exported hooks so useState/useFlag aren't called inside object methods
- Each extracted hook calls its own permission hooks directly
- Separate useAiFlag from && short-circuit in useDebouncedDuplicateIssues
- Replace useState+useEffect with useMemo in useDebouncedDuplicateIssues
- Move early return in useViewMenuItems after all hook calls
- Remove unused useAiFlag import from helpers/app-rail.ts

* fix: extract feature hooks from useQuickActionsFactory to fix rules-of-hooks

Move use*Feature methods out of the factory return object into standalone
exported hooks. Hooks inside object methods are not valid React hook call
sites and violate react-hooks/rules-of-hooks.

Also moves the early return in useViewMenuItems below hook calls to avoid
conditional hook execution, and removes unnecessary optional chaining on
feature results that always return a value.

* fix: move useState above early return in MilestoneWorkItemActionButton

Also replace div/SVG click handlers with button elements to fix a11y
warnings (no-static-element-interactions, click-events-have-key-events).

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aaron Reisman <aaron.reisman@plane.so>
2026-04-22 17:54:45 +05:30

134 lines
3.4 KiB
JSON

{
"$schema": "https://turborepo.com/schema.json",
"globalDependencies": [".npmrc", ".oxfmtrc.json", "eslint.config.mjs"],
"globalEnv": [
"API_BASE_URL",
"APP_BASE_URL",
"APP_ENV",
"APP_VERSION",
"DEV",
"GITLAB_CLIENT_ID",
"GITLAB_CLIENT_SECRET",
"LOG_LEVEL",
"NODE_ENV",
"VERCEL",
"REQUEST_INTERVAL",
"SENTRY_DSN",
"SENTRY_ENVIRONMENT",
"SENTRY_TRACES_SAMPLE_RATE",
"VITE_ADMIN_BASE_PATH",
"VITE_ADMIN_BASE_URL",
"VITE_API_BASE_PATH",
"VITE_API_BASE_URL",
"VITE_APP_VERSION",
"VITE_ENABLE_SESSION_RECORDER",
"VITE_LIVE_BASE_PATH",
"VITE_LIVE_BASE_URL",
"VITE_PI_BASE_PATH",
"VITE_PI_BASE_URL",
"VITE_POSTHOG_DEBUG",
"VITE_POSTHOG_HOST",
"VITE_POSTHOG_KEY",
"VITE_FLUX_BASE_PATH",
"VITE_FLUX_BASE_URL",
"VITE_SENTRY_DSN",
"VITE_SENTRY_ENVIRONMENT",
"VITE_SENTRY_PROFILES_SAMPLE_RATE",
"VITE_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE",
"VITE_SENTRY_REPLAYS_SESSION_SAMPLE_RATE",
"VITE_SENTRY_SEND_DEFAULT_PII",
"VITE_SENTRY_TRACES_SAMPLE_RATE",
"VITE_SESSION_RECORDER_KEY",
"VITE_SILO_BASE_PATH",
"VITE_SILO_BASE_URL",
"VITE_SPACE_BASE_PATH",
"VITE_SPACE_BASE_URL",
"VITE_SUPPORT_EMAIL",
"VITE_WEB_BASE_PATH",
"VITE_WEB_BASE_URL",
"VITE_WEBSITE_URL",
"WEB_BASE_URL",
"VITE_GOOGLE_ANALYTICS_ID",
"VITE_PRO_SELFHOSTED_MONTHLY_PAYMENT_URL",
"VITE_PRO_SELFHOSTED_YEARLY_PAYMENT_URL",
"VITE_BUSINESS_SELFHOSTED_MONTHLY_PAYMENT_URL",
"VITE_BUSINESS_SELFHOSTED_YEARLY_PAYMENT_URL",
"VITE_ENTERPRISE_SELFHOSTED_MONTHLY_PAYMENT_URL",
"VITE_ENTERPRISE_SELFHOSTED_YEARLY_PAYMENT_URL",
"ENABLE_EXPERIMENTAL_COREPACK",
"VITE_TURNSTILE_SITE_KEY",
"VITE_FLATFILE_PUBLISHABLE_KEY",
"SENTRY_AUTH_TOKEN",
"DD_TRACE_ENABLED",
"AWS_SECRET_CACHE_TTL"
],
"remoteCache": {
"apiUrl": "https://turborepo-remote-cache.vamsi-906.workers.dev",
"enabled": true,
"signature": true,
"teamSlug": "plane"
},
"tasks": {
"build": {
"dependsOn": ["^build", "check:types"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": ["dist/**", "build/**", ".react-router/**"]
},
"build-storybook": {
"dependsOn": ["^build", "check:types"],
"outputs": ["storybook-static/**"]
},
"check": {
"dependsOn": ["check:format", "check:lint", "check:types"]
},
"check:format": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$"],
"outputs": []
},
"check:lint": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
"outputs": []
},
"check:types": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
"outputs": []
},
"clean": {
"cache": false
},
"dev": {
"cache": false,
"dependsOn": ["^build"],
"persistent": true
},
"fix": {
"cache": false,
"dependsOn": ["fix:format", "fix:lint"]
},
"fix:format": {
"cache": false
},
"fix:lint": {
"cache": false,
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"]
},
"start": {
"cache": false,
"persistent": true
},
"test": {
"dependsOn": ["^build"],
"outputs": []
},
"test:e2e": {
"cache": false,
"persistent": false,
"env": ["CI", "E2E_*"]
}
}
}