Skip to content

Commit 446fe71

Browse files
committed
ci(lint): use super-linter
Replace all other linters with super-linter
1 parent 554638e commit 446fe71

12 files changed

+254
-177
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
11+
[*.sh]
12+
space_redirects = true # like -sr
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
{
3+
"problemMatcher": [
4+
{
5+
"owner": "markdownlint",
6+
"pattern": [
7+
{
8+
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"code": 4,
13+
"message": 5
14+
}
15+
]
16+
}
17+
]
18+
}

.github/workflows/eclint.yml

-14
This file was deleted.

.github/workflows/linter.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
super-linter:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v2
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v1
16+
17+
- name: Add matchers
18+
run: |
19+
echo "::add-matcher::.github/super-linter-problem-matcher.json"
20+
- name: Lint Code Base
21+
uses: github/super-linter@v3
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
FILTER_REGEX_EXCLUDE: .*.template

.github/workflows/markdown-link-check.yml

-19
This file was deleted.

.github/workflows/shfmt.yml

-20
This file was deleted.

CONTRIBUTING.md

+31-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
11
# Contributing to docker-node
22

3-
Thank you for your contribution. Here are a set of guidelines for contributing to the docker-node project.
3+
Thank you for your contribution. Here are a set of guidelines for contributing
4+
to the docker-node project.
45

56
## Version Updates
67

78
New **Node.js** releases are released as soon as possible.
89

9-
New **NPM** releases are not tracked. We simply use the NPM version bundled in the corresponding Node.js release.
10+
New **NPM** releases are not tracked. We simply use the NPM version bundled in
11+
the corresponding Node.js release.
1012

11-
**Yarn** is updated to the latest version only when there is a new Node.js SemVer PATCH release (unless Yarn has received a security update), and it's updated only in the branch with the new release, preferably in the same PR. The `update.sh` script does this automatically when invoked with a specific branch, e.g. `./update.sh 6.10`.
13+
**Yarn** is updated to the latest version only when there is a new Node.js
14+
SemVer PATCH release (unless Yarn has received a security update), and it's
15+
updated only in the branch with the new release, preferably in the same PR. The
16+
`update.sh` script does this automatically when invoked with a specific branch,
17+
e.g. `./update.sh 6.10`.
1218

1319
### Submitting a PR for a version update
1420

15-
If you'd like to help us by submitting a PR for a version update, please do the following:
16-
17-
1. [Fork this project.](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
18-
1. [Clone the forked repository.](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
19-
1. Create a branch for the update PR. For example, `git checkout master; git checkout -b version-update`.
20-
1. Run `./update.sh`. You can see additional options by using accessing the built-in help documentation with `./update.sh -h`. This script will automatically update the appropriate files with the latest versions and checksums.
21-
1. Commit the modified files to the `version-update` branch and push the branch to your fork.
22-
1. [Create a PR to merge the branch from your fork into this project's master branch.](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
21+
If you'd like to help us by submitting a PR for a version update, please do the
22+
following:
23+
24+
1. [Fork this
25+
project.](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
26+
1. [Clone the forked
27+
repository.](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
28+
1. Create a branch for the update PR. For example, `git checkout master; git
29+
checkout -b version-update`.
30+
1. Run `./update.sh`. You can see additional options by using accessing the
31+
built-in help documentation with `./update.sh -h`. This script will
32+
automatically update the appropriate files with the latest versions and
33+
checksums.
34+
1. Commit the modified files to the `version-update` branch and push the branch
35+
to your fork.
36+
1. [Create a PR to merge the branch from your fork into this project's master
37+
branch.](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
2338

2439
## Adding dependencies to the base images
2540

26-
NodeJS is a big ecosystem with a variety of different use cases. The docker images for node are designed to provide the minimum for running core node. Additional dependencies (including dependencies for npm or yarn such as git) will not be included in these base images and will need to be included in descendent image.
41+
NodeJS is a big ecosystem with a variety of different use cases. The docker
42+
images for node are designed to provide the minimum for running core node.
43+
Additional dependencies (including dependencies for npm or yarn such as git)
44+
will not be included in these base images and will need to be included in
45+
descendent image.

GOVERNANCE.md

-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ If an agenda item cannot reach a consensus a WG member can call for a
111111
closing vote. The call for a vote must be seconded by a majority of
112112
the WG or else the discussion will continue. Simple majority wins.
113113

114-
<a id="developers-certificate-of-origin"></a>
115-
116114
## Developer's Certificate of Origin 1.1
117115

118116
By making a contribution to this project, I certify that:

README.md

+56-48
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
[![dockeri.co](http://dockeri.co/image/_/node)](https://registry.hub.docker.com/_/node/)
44

5-
[![GitHub issues](https://img.shields.io/github/issues/nodejs/docker-node.svg "GitHub issues")](https://github.com/nodejs/docker-node)
6-
[![GitHub stars](https://img.shields.io/github/stars/nodejs/docker-node.svg "GitHub stars")](https://github.com/nodejs/docker-node)
5+
[![GitHub issues](https://img.shields.io/github/issues/nodejs/docker-node.svg
6+
"GitHub issues")](https://github.com/nodejs/docker-node) [![GitHub
7+
stars](https://img.shields.io/github/stars/nodejs/docker-node.svg "GitHub
8+
stars")](https://github.com/nodejs/docker-node)
79

810
The official Node.js docker image, made with love by the node community.
911

1012
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1113
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1214
## Table of Contents
1315

14-
- [What is Node.js?](#what-is-nodejs)
16+
- [What is Node.js](#what-is-nodejs)
1517
- [How to use this image](#how-to-use-this-image)
1618
- [Create a `Dockerfile` in your Node.js app project](#create-a-dockerfile-in-your-nodejs-app-project)
1719
- [Best Practices](#best-practices)
@@ -31,18 +33,18 @@ The official Node.js docker image, made with love by the node community.
3133
- [Docker Working Group Members](#docker-working-group-members)
3234
- [Docker Working Group Collaborators](#docker-working-group-collaborators)
3335
- [Emeritus](#emeritus)
34-
- [Docker Working Group Members](#docker-working-group-members-1)
36+
- [Emeritus Docker Working Group Members](#emeritus-docker-working-group-members)
3537

3638
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3739

38-
## What is Node.js?
40+
## What is Node.js
3941

4042
Node.js is a platform built on Chrome's JavaScript runtime for easily building
4143
fast, scalable network applications. Node.js uses an event-driven, non-blocking
4244
I/O model that makes it lightweight and efficient, perfect for data-intensive
4345
real-time applications that run across distributed devices.
4446

45-
See: http://nodejs.org
47+
See: <http://nodejs.org>
4648

4749
## How to use this image
4850

@@ -58,8 +60,8 @@ EXPOSE 8888
5860
You can then build and run the Docker image:
5961

6062
```console
61-
$ docker build -t my-nodejs-app .
62-
$ docker run -it --rm --name my-running-app my-nodejs-app
63+
docker build -t my-nodejs-app .
64+
docker run -it --rm --name my-running-app my-nodejs-app
6365
```
6466

6567
If you prefer Docker Compose:
@@ -83,16 +85,18 @@ services:
8385
You can then run using Docker Compose:
8486
8587
```console
86-
$ docker-compose up -d
88+
docker-compose up -d
8789
```
8890

89-
Docker Compose example copies your current directory (including node_modules) to the container.
90-
It assumes that your application has a file named [`package.json`](https://docs.npmjs.com/files/package.json)
91-
defining [start script](https://docs.npmjs.com/misc/scripts#default-values).
91+
Docker Compose example copies your current directory (including node_modules) to
92+
the container. It assumes that your application has a file named
93+
[`package.json`](https://docs.npmjs.com/files/package.json) defining [start
94+
script](https://docs.npmjs.com/misc/scripts#default-values).
9295

9396
### Best Practices
9497

95-
We have assembled a [Best Practices Guide](./docs/BestPractices.md) for those using these images on a daily basis.
98+
We have assembled a [Best Practices Guide](./docs/BestPractices.md) for those
99+
using these images on a daily basis.
96100

97101
### Run a single Node.js script
98102

@@ -101,16 +105,18 @@ complete `Dockerfile`. In such cases, you can run a Node.js script by using the
101105
Node.js Docker image directly:
102106

103107
```console
104-
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app node:8 node your-daemon-or-script.js
108+
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app \
109+
-w /usr/src/app node:8 node your-daemon-or-script.js
105110
```
106111

107112
### Verbosity
108113

109-
Prior to 8.7.0 and 6.11.4 the docker images overrode the default npm log
110-
level from `warn` to `info`. However due to improvements to npm and new Docker
111-
patterns (e.g. multi-stage builds) the working group reached a [consensus](https://github.com/nodejs/docker-node/issues/528)
112-
to revert the log level to npm defaults. If you need more verbose output, please
113-
use one of the following methods to change the verbosity level.
114+
Prior to 8.7.0 and 6.11.4 the docker images overrode the default npm log level
115+
from `warn` to `info`. However due to improvements to npm and new Docker
116+
patterns (e.g. multi-stage builds) the working group reached a
117+
[consensus](https://github.com/nodejs/docker-node/issues/528) to revert the log
118+
level to npm defaults. If you need more verbose output, please use one of the
119+
following methods to change the verbosity level.
114120

115121
#### Dockerfile
116122

@@ -129,7 +135,7 @@ If you run the node image using `docker run` you can use the `-e` flag to
129135
override `NPM_CONFIG_LOGLEVEL`.
130136

131137
```console
132-
$ docker run -e NPM_CONFIG_LOGLEVEL=info node ...
138+
docker run -e NPM_CONFIG_LOGLEVEL=info node ...
133139
```
134140

135141
#### NPM run
@@ -138,7 +144,7 @@ If you are running npm commands you can use `--loglevel` to control the
138144
verbosity of the output.
139145

140146
```console
141-
$ docker run node npm --loglevel=warn ...
147+
docker run node npm --loglevel=warn ...
142148
```
143149

144150
## Image Variants
@@ -147,8 +153,8 @@ The `node` images come in many flavors, each designed for a specific use case.
147153
All of the images contain pre-installed versions of `node`,
148154
[`npm`](https://www.npmjs.com/), and [`yarn`](https://yarnpkg.com). For each
149155
supported architecture, the supported variants are different. In the file:
150-
[architectures](./architectures), it lists all supported variants for all of
151-
the architectures that we support now.
156+
[architectures](./architectures), it lists all supported variants for all of the
157+
architectures that we support now.
152158

153159
### `node:<version>`
154160

@@ -164,31 +170,32 @@ need to install, thus reducing the overall size of all images on your system.
164170

165171
### `node:alpine`
166172

167-
This image is based on the popular
168-
[Alpine Linux project](http://alpinelinux.org), available in
169-
[the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is
170-
much smaller than most distribution base images (~5MB), and thus leads to much
171-
slimmer images in general.
173+
This image is based on the popular [Alpine Linux
174+
project](http://alpinelinux.org), available in [the `alpine` official
175+
image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most
176+
distribution base images (~5MB), and thus leads to much slimmer images in
177+
general.
172178

173179
This variant is highly recommended when final image size being as small as
174-
possible is desired. The main caveat to note is that it does use
175-
[musl libc](http://www.musl-libc.org) instead of
176-
[glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain
177-
software might run into issues depending on the depth of their libc
178-
requirements. However, most software doesn't have an issue with this, so this
179-
variant is usually a very safe choice. See
180-
[this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897)
181-
for more discussion of the issues that might arise and some pro/con comparisons
182-
of using Alpine-based images. One common issue that may arise is a missing shared
183-
library required for use of `process.dlopen`. To add the missing shared libraries
184-
to your image, adding the [`libc6-compat`](https://pkgs.alpinelinux.org/package/edge/main/x86/libc6-compat)
180+
possible is desired. The main caveat to note is that it does use [musl
181+
libc](http://www.musl-libc.org) instead of [glibc and
182+
friends](http://www.etalabs.net/compare_libcs.html), so certain software might
183+
run into issues depending on the depth of their libc requirements. However, most
184+
software doesn't have an issue with this, so this variant is usually a very safe
185+
choice. See [this Hacker News comment
186+
thread](https://news.ycombinator.com/item?id=10782897) for more discussion of
187+
the issues that might arise and some pro/con comparisons of using Alpine-based
188+
images. One common issue that may arise is a missing shared library required for
189+
use of `process.dlopen`. To add the missing shared libraries to your image,
190+
adding the
191+
[`libc6-compat`](https://pkgs.alpinelinux.org/package/edge/main/x86/libc6-compat)
185192
package in your Dockerfile is recommended: `apk add --no-cache libc6-compat`
186193

187-
To minimize image size, it's uncommon for additional related tools
188-
(such as `git` or `bash`) to be included in Alpine-based images. Using this
189-
image as a base, add the things you need in your own Dockerfile
190-
(see the [`alpine` image description](https://hub.docker.com/_/alpine/) for
191-
examples of how to install packages if you are unfamiliar).
194+
To minimize image size, it's uncommon for additional related tools (such as
195+
`git` or `bash`) to be included in Alpine-based images. Using this image as a
196+
base, add the things you need in your own Dockerfile (see the [`alpine` image
197+
description](https://hub.docker.com/_/alpine/) for examples of how to install
198+
packages if you are unfamiliar).
192199

193200
### `node:slim`
194201

@@ -217,14 +224,15 @@ upgrade your Docker daemon.
217224

218225
## Supported Node.js versions
219226

220-
This project will support Node.js versions as still under active support as per the [Node.js release schedule](https://github.com/nodejs/Release).
227+
This project will support Node.js versions as still under active support as per
228+
the [Node.js release schedule](https://github.com/nodejs/Release).
221229

222230
## Governance and Current Members
223231

224232
The Node.js Docker Image is governed by the Docker Working Group. See
225233
[GOVERNANCE.md](https://github.com/nodejs/docker-node/blob/master/GOVERNANCE.md)
226-
to learn more about the group's structure and [CONTRIBUTING.md](CONTRIBUTING.md) for guidance
227-
about the expectations for all contributors to this project.
234+
to learn more about the group's structure and [CONTRIBUTING.md](CONTRIBUTING.md)
235+
for guidance about the expectations for all contributors to this project.
228236

229237
### Docker Working Group Members
230238

@@ -242,6 +250,6 @@ about the expectations for all contributors to this project.
242250

243251
### Emeritus
244252

245-
#### Docker Working Group Members
253+
#### Emeritus Docker Working Group Members
246254

247255
- Christopher Horrell ([chorrell](https://github.com/chorrell))

0 commit comments

Comments
 (0)