chore(ci): Add remark-lint to project

- Add remark-lint to compose.yaml
- Add base config for remark-lint
pull/5542/head
Jason Stirnaman 2024-07-30 10:07:46 -05:00
parent b573c23e80
commit 8ab4d4491c
5 changed files with 2640 additions and 0 deletions

26
.ci/Dockerfile.remark Normal file
View File

@ -0,0 +1,26 @@
FROM registry.gitlab.com/pipeline-components/remark-lint:latest
WORKDIR /app/
# Generic
#RUN apk add --no-cache
COPY /.ci/app /app/
#COPY /.ci/remark-lint/package.json /app/
# Node
ENV PATH "$PATH:/app/node_modules/.bin/"
RUN yarn install && yarn cache clean
ENV NODE_PATH=/app/node_modules/
RUN ln -nfs /app/node_modules /node_modules
# Build arguments
ARG BUILD_DATE
ARG BUILD_REF
# Labels
LABEL \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Remark-lint" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://pipeline-components.gitlab.io/"

13
.ci/app/package.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "remark-lint",
"license": "MIT",
"devDependencies": {
"remark-cli": "12.0.1",
"remark-preset-lint-consistent": "6.0.0",
"remark-preset-lint-markdown-style-guide": "6.0.0",
"remark-preset-lint-recommended": "7.0.0",
"remark-frontmatter": "5.0.0",
"remark-lint-frontmatter-schema": "3.15.4",
"remark-lint-no-shell-dollars": "4.0.0"
}
}

2577
.ci/remark-lint/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -363,6 +363,17 @@ services:
- type: volume
source: influxdb2-config
target: /etc/influxdb2
remark-lint:
build:
context: .
dockerfile: .ci/Dockerfile.remark
command: ["remark", "content/${PRODUCT_PATH}"]
profiles:
- lint
volumes:
- type: bind
source: ./content
target: /app/content
volumes:
test-content:
cloud-tmp:

13
content/.remarkrc.yaml Normal file
View File

@ -0,0 +1,13 @@
settings:
bullet: "-"
plugins:
# Before you can configure plugins for remark here, you need to add them to
# the `devDependencies` in the `package.json` file--for CI: `/.ci/app/package.json`.
- remark-frontmatter
- remark-lint-frontmatter-schema
- remark-lint-no-shell-dollars
# Check that markdown is consistent (list items have the same indentation)
- remark-preset-lint-consistent
# - remark-preset-lint-markdown-style-guide
# - remark-preset-lint-recommended