-
-
Notifications
You must be signed in to change notification settings - Fork 3
ci(lint): add new lint job for 'attw' and update dependencies #889
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
base: main
Are you sure you want to change the base?
Conversation
- Introduced a new linting job for 'attw' in the GitHub Actions workflow. - Enhanced the linting process by adding steps for checking out the repository, deriving SHAs, and setting up the environment. - Updated the 'test-required-check' job to include the new 'attw' lint job as a dependency.
WalkthroughA new Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub Actions
participant files-changed
participant attw
participant eslint/yaml-lint/package-json-lint
participant test-required-check
Developer->>GitHub Actions: Push/PR triggers workflow
GitHub Actions->>files-changed: Determine changed files
files-changed-->>attw: If frontend_lintable == true
attw->>GitHub Actions: Run frontend lint steps
GitHub Actions->>eslint/yaml-lint/package-json-lint: Run other lint jobs
attw-->>test-required-check: Signal completion
eslint/yaml-lint/package-json-lint-->>test-required-check: Signal completion
test-required-check->>GitHub Actions: Complete if all dependencies finish
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/eslint-config/src/utils/create-config.tsOops! Something went wrong! :( ESLint: 9.27.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/packages/eslint-config/dist/index.mjs' imported from /eslint.config.js packages/eslint-config/src/config/plugins/imports.tsOops! Something went wrong! :( ESLint: 9.27.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/packages/eslint-config/dist/index.mjs' imported from /eslint.config.js 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Graph Analysis (1)packages/eslint-config/src/config/plugins/imports.ts (1)
🪛 LanguageToolpackages/eslint-config/README.md[uncategorized] ~623-~623: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION) ⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you for following the naming conventions! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/workflows/lint.yml (2)
107-111
: Inconsistent job naming.
The job is namedLint (are the types wrong)
, which deviates from the concise pattern used by other lint jobs (e.g.,Lint (eslint)
). Consider renaming it toLint (attw)
for consistency.
154-157
: Guard cache preparation on success.
The cache compression step runs even iflint attw
fails, which might waste resources. Consider addingif: ${{ success() }}
to skip cache prep on failure.- shell: "bash" - run: "tar -cf - .nx/cache | lz4 > /tmp/nx_cache.tar.lz4" + if: ${{ success() }} + shell: "bash" + run: "tar -cf - .nx/cache | lz4 > /tmp/nx_cache.tar.lz4"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/lint.yml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (typescript)
🔇 Additional comments (1)
.github/workflows/lint.yml (1)
357-360
: Reviewtest-required-check
dependencies.
attw
has been added toneeds
, which is correct. However, there's still a TODO to includemarkdown-lint
. Please confirm whethermarkdown-lint
should be included now or if it will be addressed in a follow-up.
- name: "Get changed files" | ||
id: "files" | ||
uses: "tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7 | ||
with: | ||
files_ignore_from_source_file: ".github/ignore-files-for-nx-affected.yml" | ||
base_sha: "${{ steps.setSHAs.outputs.base }}" | ||
separator: "," | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Use the same changed-files
action version.
The tj-actions/changed-files
action here is pinned to v44.5.7, whereas eslint
uses v46.0.5. Consistency across jobs reduces maintenance burden and ensures uniform behavior.
- uses: "tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7
+ uses: "tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c" # v46.0.5
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: "Get changed files" | |
id: "files" | |
uses: "tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7 | |
with: | |
files_ignore_from_source_file: ".github/ignore-files-for-nx-affected.yml" | |
base_sha: "${{ steps.setSHAs.outputs.base }}" | |
separator: "," | |
- name: "Get changed files" | |
id: "files" | |
- uses: "tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7 | |
+ uses: "tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c" # v46.0.5 | |
with: | |
files_ignore_from_source_file: ".github/ignore-files-for-nx-affected.yml" | |
base_sha: "${{ steps.setSHAs.outputs.base }}" | |
separator: "," |
🤖 Prompt for AI Agents
In .github/workflows/lint.yml around lines 140 to 147, the
tj-actions/changed-files action is pinned to version v44.5.7, but eslint uses
v46.0.5. Update the version of tj-actions/changed-files here to v46.0.5 to
maintain consistency across jobs and reduce maintenance complexity.
- name: "Git checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}" | ||
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7 | ||
env: | ||
GIT_COMMITTER_NAME: "GitHub Actions Shell" | ||
GIT_AUTHOR_NAME: "GitHub Actions Shell" | ||
EMAIL: "github-actions[bot]@users.noreply.github.com" | ||
with: | ||
# Number of commits to fetch. 0 indicates all history for all branches and tags. | ||
# Pulls all commits (needed for NX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Align checkout action version with other jobs.
This job uses actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
(v4.1.7), while other lint jobs use actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
(v4.2.2). Unify the version to avoid discrepancies.
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
+ uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: "Git checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}" | |
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7 | |
env: | |
GIT_COMMITTER_NAME: "GitHub Actions Shell" | |
GIT_AUTHOR_NAME: "GitHub Actions Shell" | |
EMAIL: "github-actions[bot]@users.noreply.github.com" | |
with: | |
# Number of commits to fetch. 0 indicates all history for all branches and tags. | |
# Pulls all commits (needed for NX) | |
- name: "Git checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}" | |
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
env: | |
GIT_COMMITTER_NAME: "GitHub Actions Shell" | |
GIT_AUTHOR_NAME: "GitHub Actions Shell" | |
EMAIL: "github-actions[bot]@users.noreply.github.com" | |
with: | |
# Number of commits to fetch. 0 indicates all history for all branches and tags. | |
# Pulls all commits (needed for NX) |
🤖 Prompt for AI Agents
In .github/workflows/lint.yml around lines 118 to 126, the checkout action
version is set to actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
(v4.1.7), which differs from other lint jobs using
actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2). Update the
checkout action version here to match the other jobs by replacing the current
version with actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683.
…s" to "types" - Changed the file type identifier for TypeScript declaration files in the ESLint configuration from "d.ts" to "types" for consistency. - Updated the `getFilesGlobs` function to reflect this change, ensuring proper handling of TypeScript declaration files. - Modified related documentation in README.md to align with the new file type naming.
Summary by CodeRabbit