superlint/dev-dependencies/Dockerfile
Marco Ferrari 9db632f0e1
ci: configure commitlint (#5014)
- Check if the PR contains a single commit, and fail otherwise.
- Enable commitlint to check if commits adhere to the
  conventialcommits.org spec.
- Update the the pull request template to point to the conventional
  commit spec.
- Update the dependabot configuration to add the "build(...)" prefix to
  commits.
2023-12-19 19:37:16 +01:00

20 lines
632 B
Docker

FROM node:21.4.0-bookworm
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get --assume-yes --no-install-recommends install \
jq \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json ./
RUN jq '.dependencies | to_entries[] | select(.key | startswith("@commitlint/")) | .key + "@" + .value' package.json > commitlint-packages.txt \
&& xargs npm install -g < commitlint-packages.txt \
&& rm package.json commitlint-packages.txt \
&& commitlint --version \
&& git config --global --add safe.directory /source-repository
ENTRYPOINT [ "commitlint" ]