Skip to content

Add linters in images repository#1786

Open
Kaniska244 wants to merge 5 commits intodevcontainers:mainfrom
Kaniska244:new-linter-setup
Open

Add linters in images repository#1786
Kaniska244 wants to merge 5 commits intodevcontainers:mainfrom
Kaniska244:new-linter-setup

Conversation

@Kaniska244
Copy link
Contributor

@Kaniska244 Kaniska244 commented Feb 17, 2026

Description of changes: As part of this PR adding linters for the following type of files.

  • Bash shell scripts excluding the test scripts.
  • Dockerfile syntaxes using hadolint
  • The source javascript files in build/src location used by the build/vscdc component.
  • JSON files with JSON and JSONC syntaxes

Changelog: The following files are changed.

  • Added a new workflow for code linter process
  • Added linter configuration files under .github/linters location.

Checklist:

  • All checks are passed.

@Kaniska244 Kaniska244 marked this pull request as ready for review February 17, 2026 10:37
@Kaniska244 Kaniska244 requested a review from a team as a code owner February 17, 2026 10:37
Copilot AI review requested due to automatic review settings February 17, 2026 10:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a defineConfig function. The export should be export default [...] instead of export default defineConfig([...]).
export default defineConfig([

@@ -0,0 +1,55 @@
import { defineConfig } from "eslint/config";
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import statement import { defineConfig } from "eslint/config" is incorrect. ESLint does not export a defineConfig function from "eslint/config". In ESLint flat config format, you should directly export an array of configuration objects without using defineConfig. Remove the import and the defineConfig() wrapper, and directly export the array.

This issue also appears on line 9 of the same file.

Copilot uses AI. Check for mistakes.
Kaniska244 and others added 4 commits February 17, 2026 16:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant