diff --git a/nx.json b/nx.json index 2d0b277451..2a18e74d02 100644 --- a/nx.json +++ b/nx.json @@ -57,6 +57,7 @@ "lint:diff-with-main": { "executor": "nx:run-commands", "cache": false, + "dependsOn": ["twenty-oxlint-rules:build"], "options": { "command": "FILES=$(git diff --name-only --diff-filter=d main -- {projectRoot}/ | grep -E '{args.pattern}'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint -c {projectRoot}/.oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main --configuration=fix' && false)))", "pattern": "\\.(ts|tsx|js|jsx)$" diff --git a/packages/twenty-front/project.json b/packages/twenty-front/project.json index f144c326c3..8b2167c0ad 100644 --- a/packages/twenty-front/project.json +++ b/packages/twenty-front/project.json @@ -87,6 +87,7 @@ }, "lint:diff-with-main": { "executor": "nx:run-commands", + "dependsOn": ["twenty-oxlint-rules:build"], "options": { "cwd": "{projectRoot}", "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main twenty-front --configuration=fix' && false)))" diff --git a/packages/twenty-server/project.json b/packages/twenty-server/project.json index 3bb631d0e5..08dfe39d20 100644 --- a/packages/twenty-server/project.json +++ b/packages/twenty-server/project.json @@ -169,6 +169,7 @@ }, "lint:diff-with-main": { "executor": "nx:run-commands", + "dependsOn": ["twenty-oxlint-rules:build"], "options": { "cwd": "{projectRoot}", "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main twenty-server --configuration=fix' && false)))"