eslint — JavaScript / TypeScript linter rebased on Red Hat Hardened Images
536
ESLint is the canonical JavaScript / TypeScript / JSX linter, with the largest plugin ecosystem in the JS world. This image ships ESLint v10 in flat-config mode with a curated security-focused plugin set baked in: eslint-plugin-security (Node Security WG — eval, regex DoS, unsafe randomness, bidi homoglyph attacks), eslint-plugin-no-unsanitized (Mozilla — XSS prevention via DOM API gates), eslint-plugin-promise (async/await correctness), and eslint-plugin-import (ESM resolution, no-self-import). Plus @microsoft/eslint-formatter-sarif for native SARIF output that flows directly into DefectDojo.
The baked default eslint.config.js activates on any consumer repo that doesn't ship its own — security plugins at error level, promise + import at warning. A consumer config (eslint.config.{js,mjs,cjs,ts}) at the repo root always wins; the entrypoint detects and honours it without flag passthrough.
# Lint with the baked default config (no consumer config required)
podman run --rm -v "$(pwd):/repo:ro,Z" eslint:<version>-rhhi .
# Lint specific files
podman run --rm -v "$(pwd):/repo:ro,Z" eslint:<version>-rhhi src/
# Generate SARIF for re-import into DefectDojo
podman run --rm -v "$(pwd):/repo:ro,Z" -v /tmp:/out:rw,Z \
eslint:<version>-rhhi \
--format @microsoft/eslint-formatter-sarif \
--output-file /out/eslint.sarif \
src/
# Override the default config by dropping eslint.config.js into the
# consumer's repo root — the entrypoint detects + honours it automatically
eslint.config.js at repo root)// Flat-config example with project-specific tweaks layered on
import js from '@eslint/js';
export default [
js.configs.recommended,
{
languageOptions: { ecmaVersion: 'latest', sourceType: 'module' },
rules: {
'no-unused-vars': 'warn',
'no-console': 'off',
// Add per-project rules here
},
},
];
The bundled plugins are reachable from any consumer config via standard import (NODE_PATH points at the image's node_modules/), so consumer configs can extend our defaults rather than rebuild from scratch.
registry.access.redhat.com/hi/nodejs:latest (Red Hat Hardened)registry.access.redhat.com/hi/nodejs:24.15-builder.tgz; transitive deps via npm package-lock.jsoncontainerfiles/_template/fetch-npm-tool.sh)Pairs with stylelint (CSS) — the two together cover both halves of typical web-asset linting and are bundled in the .scan.web.yml consumer wrapper.
Content type
Image
Digest
sha256:66a7ff3d3…
Size
60 MB
Last updated
4 months ago
docker pull timothyswan/eslint:10.4.0-rhhi