-
Notifications
You must be signed in to change notification settings - Fork 663
feat: migrate generated packages to root ESLint config and ignore current violations #8067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shivanee-p
wants to merge
15
commits into
main
Choose a base branch
from
shivaneep-generated-packages-linter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5cbda9d
feat: migrate generated packages to root ESLint config and baseline v…
shivanee-p 8cd9605
chore: address Gemini Code Assist findings and refactor scripts
shivanee-p 6020738
feat(generator): format generated TypeScript files using Prettier
shivanee-p ba7be43
fix: address Gemini comments on sorting and project globs
shivanee-p f01189c
fix: use stream-json for memory-safe baselining and increase buffer size
shivanee-p 569b8c4
fix: include filepath in Prettier formatting call to address Gemini c…
shivanee-p b8c1b1b
ci: add dedicated ESLint check for changed packages
shivanee-p 51946e3
ci: fail ESLint check on violations by adding --fail-on-error flag
shivanee-p 82a2e57
ci: downgrade Node version to 18 in ESLint workflow
shivanee-p df30e8a
fix: handle shebangs correctly in baseline script
shivanee-p 30bc062
ci: add explicit read-only permissions for GITHUB_TOKEN in ESLint wor…
shivanee-p bc07bfc
fix: handle non-JSON output gracefully in run-eslint-root.mjs
shivanee-p 290085d
chore: baseline violations in generated packages (excluding OOM failu…
shivanee-p 4fe339f
fix: address script injection vulnerability in eslint workflow
shivanee-p b0806e0
chore: add Cloudtop helper scripts for final 6 packages
shivanee-p File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,4 @@ test/fixtures | |
| build/ | ||
| docs/ | ||
| protos/ | ||
| packages/ | ||
| handwritten/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "overrides": [ | ||
| { | ||
| "files": ["packages/**/*.ts"], | ||
| "extends": "./node_modules/gts", | ||
| "parserOptions": { | ||
| "project": ["packages/*/tsconfig.json"] | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: ESLint Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'packages/**' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint-changed: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Required to get all history for diffs | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
|
|
||
| - name: Install shared linting dependencies | ||
| run: | | ||
| npm install --save-dev eslint@8 gts@6.0.2 stream-json | ||
|
|
||
| - name: Get changed packages | ||
| id: changed-packages | ||
| run: | | ||
| # Get files changed in the PR relative to the base branch | ||
| git fetch origin ${{ github.base_ref }} | ||
| CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) | ||
|
|
||
| # Extract unique package names from packages/ directory | ||
| CHANGED_PACKAGES=$(echo "$CHANGED_FILES" | grep '^packages/' | cut -d/ -f2 | sort -u | tr '\n' ' ') | ||
|
|
||
| echo "packages=$CHANGED_PACKAGES" >> $GITHUB_OUTPUT | ||
| echo "Changed packages: $CHANGED_PACKAGES" | ||
|
|
||
| - name: Run ESLint on changed packages | ||
| if: steps.changed-packages.outputs.packages != '' | ||
| env: | ||
| CHANGED_PACKAGES: ${{ steps.changed-packages.outputs.packages }} | ||
| run: | | ||
| for pkg in $CHANGED_PACKAGES; do | ||
| echo "Processing package: $pkg" | ||
| node packages/run-eslint-root.mjs "$pkg" --fail-on-error | ||
| done | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.