File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ docker build . -t vonwig/standardjs:local -f standardjs.Dockerfile
85
85
Push
86
86
87
87
``` sh
88
- docker build --push . -t vonwig/eslint:latest
89
- docker build --push . -t vonwig/extractor-eslint:latest -f extractor.Dockerfile
90
- docker build --push . -t vonwig/standardjs:latest -f standardjs.Dockerfile
88
+ docker build --push . -t vonwig/eslint:latest --push
89
+ docker build --push . -t vonwig/extractor-eslint:latest -f extractor.Dockerfile --push
90
+ docker build --push . -t vonwig/standardjs:latest -f standardjs.Dockerfile --push
91
91
```
Original file line number Diff line number Diff line change 2
2
3
3
PROJECT_DIR=" /project"
4
4
5
- echo " ARGS:"
6
-
7
5
# First arg
8
6
ARGS=" $1 "
9
7
@@ -13,4 +11,16 @@ ESLINT_ARGS=$(echo $ARGS | jq -r '.args')
13
11
14
12
ESLINT_VERSION=$( echo $ARGS | jq -r ' .version' )
15
13
16
- npx --no-install " eslint@$ESLINT_VERSION " $ESLINT_ARGS
14
+ echo " Linting: eslint@$ESLINT_VERSION $ESLINT_ARGS "
15
+
16
+ # Run eslint but suppress the output
17
+ npx --no-install " eslint@$ESLINT_VERSION " $ESLINT_ARGS > /dev/null
18
+
19
+ # If eslint fails, exit with the exit code
20
+ if [ $? -ne 0 ]; then
21
+ echo " ESLint exited with an error code: $? "
22
+ exit $?
23
+ else
24
+ echo " ESLint passed with no errors"
25
+ exit 0
26
+ fi
You can’t perform that action at this time.
0 commit comments