Added eslint action.

This commit is contained in:
Koen Rouwhorst 2019-01-05 15:52:19 +01:00
parent ec24d7ad2d
commit e416342ace
3 changed files with 33 additions and 1 deletions

View file

@ -1 +1,9 @@
# actions # GitHub actions
Some GitHub actions that I use in my projects.
## Actions
### eslint
JavaScript linter.

21
eslint/Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM node:8.15.0-alpine@sha256:f30a55706c7336a648493b926128f56176e4500cfdc968764bfdb711716e0109
LABEL name="ESLint"
LABEL maintainer="Koen Rouwhorst <info@koenrouwhorst.nl>"
LABEL "com.github.actions.name"="GitHub Action for ESLint"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="blue"
ENV ESLINT_VERSION=5.11.1 \
PATH=/usr/lib/node_modules/.bin:$PATH
RUN npm install -g eslint@${ESLINT_VERSION} && \
rm -rf /usr/share/man /tmp/* \
/root/.npm /root/.node-gyp \
/usr/lib/node_modules/npm/man \
/usr/lib/node_modules/npm/doc \
/usr/lib/node_modules/npm/html
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

3
eslint/entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env sh
sh -c "eslint $*"