Add YAML linting to CI#2355
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
GabrielAnca
force-pushed
the
gabriel.anca/add-yaml-linter
branch
5 times, most recently
from
June 15, 2026 10:47
b9657e8 to
9eb3cdc
Compare
GabrielAnca
force-pushed
the
gabriel.anca/add-yaml-linter
branch
from
June 15, 2026 10:47
9eb3cdc to
7db08f7
Compare
GabrielAnca
commented
Jun 15, 2026
| 'packages/datadog-ci/shims/injected-plugin-submodules.js', | ||
| 'packages/datadog-ci/shims/intl-collator.js', | ||
| 'bin/*.js', | ||
| '.github/dependabot.yml', |
Contributor
Author
There was a problem hiding this comment.
This file is commented out entirely. So it's invalid YAML
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
GabrielAnca
commented
Jun 15, 2026
| ...yml.configs['flat/standard'], | ||
| { | ||
| files: yamlFiles, | ||
| extends: [tseslint.configs.disableTypeChecked], |
Contributor
Author
There was a problem hiding this comment.
This avoids running TS checks on yaml files. If we don't do this, TypeScript lint fails on yaml files.
Disabling TS tests in yaml files using the extends directive is the recommended approach, even though I think it's not super easy to follow. Being able to do something at the level where we introduce the conflict tseslint.configs.recommendedTypeChecked would be better, but the current solution would be even harder to read (tseslint.configs.recommendedTypeChecked.map((config) => config.files ? config : {...config, files: tsFiles}))
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
GabrielAnca
marked this pull request as ready for review
June 15, 2026 13:47
Drarig29
approved these changes
Jun 15, 2026
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a YAML linting step to GitHub Actions CI to catch YAML syntax errors before they reach GitLab. This would have prevented the
.gitlab-ci.ymlsyntax error we shipped recently ("${CI_PROJECT_DIR}/..." assume-roleis invalid YAML).Uses
eslint-plugin-yml(1M weekly downloads, actively maintained) via a newyarn lint:yamlscript. Linting covers all YAML files in the repo viaeslint-plugin-yml'sflat/standardruleset, with a few rules tuned:yml/quotesandyml/plain-scalardisabled — existing files use mixed quoting intentionally and the two rules conflict with each otherprettier/prettierdisabled for YAML — Prettier's single-quote preference clashes with YAML conventions across too many filesyml/no-empty-mapping-valuedisabledI added specific fixture files added to
globalIgnoresto prevent intentionally invalid files from failing CI.Also bumps
actions/checkoutfrom v6.0.2 to v6.0.3 across all CI jobsHappy to address the exceptions I made in separate PRs. I wanted to avoid making this one too complex.