Add linters in images repository#1786
Open
Kaniska244 wants to merge 9 commits intodevcontainers:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds automated code linting infrastructure to the repository using GitHub Actions and super-linter. The linting covers Bash scripts, JavaScript files, JSON/JSONC files, and Dockerfiles across the repository, with test scripts specifically excluded from linting.
Changes:
- New GitHub Actions workflow for automated code linting on push to main and pull requests
- ESLint configuration for JavaScript and JSON/JSONC files with specific rules for build scripts
- ShellCheck configuration for Bash script validation with error-level severity
- Hadolint configuration for Dockerfile linting with specific rule exceptions
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/code-linter.yml | Adds workflow using super-linter to validate Bash, JavaScript, JSON, and Dockerfiles on main branch pushes and PRs |
| .github/linters/eslint.config.mjs | ESLint flat config with rules for JavaScript files and JSON/JSONC parsing, including exceptions for specific build scripts |
| .github/linters/.shellcheckrc | ShellCheck config setting Bash mode, error-only severity, and disabling SC1101/SC1102 |
| .github/linters/.hadolint.yaml | Hadolint config with error threshold and ignored rules for Docker best practices |
Comments suppressed due to low confidence (1)
.github/linters/eslint.config.mjs:9
- Remove the
defineConfig()wrapper from the export statement. ESLint flat config does not use adefineConfigfunction. The export should beexport default [...]instead ofexport default defineConfig([...]).
export default defineConfig([
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Description of changes: As part of this PR adding linters for the following type of files.
build/vscdccomponent.Changelog: The following files are changed.
.github/linterslocation.Checklist: