Skip to content

Commit ebf1710

Browse files
committed
tools: extend default yamllint config
PR-URL: #40150 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 02a87b0 commit ebf1710

10 files changed

+49
-42
lines changed

.github/label-pr-config.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ subSystemLabels:
103103
/^lib\/internal\/quic\/*/: quic, dont-land-on-v14.x, dont-land-on-v12.x
104104

105105
# All other lib/ files map directly
106-
/^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
107-
/^lib(\/internal)?\/(\w+)\.js?$/: $2 # other .js files
108-
/^lib\/internal\/(\w+)(?:\/|$)/: $1 # internal subfolders
106+
/^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
107+
/^lib(\/internal)?\/(\w+)\.js?$/: $2 # Other .js files
108+
/^lib\/internal\/(\w+)(?:\/|$)/: $1 # internal subfolders
109109

110110
exlusiveLabels:
111111
# more specific tests
@@ -125,26 +125,26 @@ exlusiveLabels:
125125

126126
/^test\//: test
127127

128-
# specific map for webcrypto.md as it should be labeled 'crypto'
128+
# Specific map for webcrypto.md as it should be labeled 'crypto'
129129
/^doc\/api\/webcrypto.md$/: doc, crypto
130-
# specific map for modules.md as it should be labeled 'module' not 'modules'
130+
# Specific map for modules.md as it should be labeled 'module' not 'modules'
131131
/^doc\/api\/modules.md$/: doc, module
132-
# node-api is treated separately since it is not a JS core module but is still
133-
# considered a subsystem of sorts
132+
# node-api is treated separately since it is not a JS core module but is still
133+
# considered a subsystem of sorts
134134
/^doc\/api\/n-api.md$/: doc, node-api
135-
# quic
135+
# quic
136136
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x, dont-land-on-v12.x
137-
# add worker label to PRs that affect doc/api/worker_threads.md
137+
# Add worker label to PRs that affect doc/api/worker_threads.md
138138
/^doc\/api\/worker_threads.md$/: doc, worker
139-
# automatically tag JS subsystem-specific API doc changes
139+
# Automatically tag JS subsystem-specific API doc changes
140140
/^doc\/api\/(\w+)\.md$/: doc, $1
141-
# add deprecations label to PRs that affect doc/api/deprecations.md
141+
# Add deprecations label to PRs that affect doc/api/deprecations.md
142142
/^doc\/api\/deprecations.md$/: doc, deprecations
143143
/^doc\/changelogs\//: release
144144

145145
/^doc\//: doc
146146

147-
# more specific benchmarks
147+
# More specific benchmarks
148148
/^benchmark\/buffers\//: benchmark, buffer
149149
/^benchmark\/(?:arrays|es)\//: benchmark, v8 engine
150150
/^benchmark\/_http/: benchmark, http

.github/workflows/authors.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414
with:
15-
fetch-depth: '0' # this is required to actually get all the authors
16-
- run: "tools/update-authors.js" # run the AUTHORS tool
17-
- uses: gr2m/create-or-update-pull-request-action@v1 # create a PR or update the Action's existing PR
15+
fetch-depth: '0' # This is required to actually get all the authors
16+
- run: "tools/update-authors.js" # Run the AUTHORS tool
17+
- uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
2020
with:
2121
author: Node.js GitHub Bot <[email protected]>
2222
body: "If this PR exists, there's presumably new additions to the AUTHORS file. This is an automatically generated PR by the `authors.yml` GitHub Action, which runs `tools/update-authors.js` and submits a new PR or updates an existing PR.\n\nPlease note that there might be duplicate entries. If there are, please remove them and add the duplicate emails to .mailmap directly to this PR."
23-
branch: "actions/authors-update" # custom branch *just* for this Action.
23+
branch: "actions/authors-update" # Custom branch *just* for this Action.
2424
commit-message: "meta: update AUTHORS"
2525
labels: meta
2626
title: "meta: update AUTHORS"

.github/workflows/auto-start-ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Auto Start CI
32

43
on:

.github/workflows/close-stalled.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name: Close stalled issues and PRs
22
on:
33
schedule:
4-
- cron: "0 0 * * *"
4+
- cron: "0 0 * * *"
55

66
jobs:
77
stale:
88
if: github.repository == 'nodejs/node'
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/stale@v3
12-
with:
13-
repo-token: ${{ secrets.GITHUB_TOKEN }}
14-
days-before-close: 30
15-
stale-pr-label: stalled
16-
stale-issue-label: stalled
17-
close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
18-
close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
19-
# used to filter issues to check whether or not should be closed, avoids hitting maximum operations allowed if needing to paginate through all open issues
20-
only-labels: stalled
21-
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
22-
operations-per-run: 500
23-
# deactivates automatic removal of stalled label if issue gets any activity
24-
remove-stale-when-updated: false
25-
# deactivates automatic stale labelling as we prefer to do that manually
26-
days-before-stale: -1
11+
- uses: actions/stale@v3
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
days-before-close: 30
15+
stale-pr-label: stalled
16+
stale-issue-label: stalled
17+
close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
18+
close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
19+
# used to filter issues to check whether or not should be closed, avoids hitting maximum operations allowed if needing to paginate through all open issues
20+
only-labels: stalled
21+
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
22+
operations-per-run: 500
23+
# deactivates automatic removal of stalled label if issue gets any activity
24+
remove-stale-when-updated: false
25+
# deactivates automatic stale labelling as we prefer to do that manually
26+
days-before-stale: -1

.github/workflows/commit-queue.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
# This action requires the following secrets to be set on the repository:
32
# GH_USER_NAME: GitHub user whose Jenkins and GitHub token are defined below
43
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes

.github/workflows/license-builder.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
- run: "./tools/license-builder.sh" # run the license builder tool
16-
- uses: gr2m/[email protected] # create a PR or update the Action's existing PR
15+
- run: "./tools/license-builder.sh" # Run the license builder tool
16+
- uses: gr2m/[email protected] # Create a PR or update the Action's existing PR
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919
with:

.yamllint.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
extends: relaxed
1+
extends: default
22

33
rules:
4+
document-start:
5+
present: false
46
line-length: disable
7+
truthy:
8+
allowed-values: ['true', 'false', 'on', 'off']
59

610
ignore: |
711
/deps/
812
node_modules/
13+
/test/fixtures/wpt/
14+
/tools/gyp/
15+
/tools/pip/

doc/.eslintrc.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Docs-specific linter rules
22

33
rules:
4-
# ease some restrictions in doc examples
4+
# Ease some restrictions in doc examples
55
no-restricted-properties: off
66
no-undef: off
77
no-unused-expressions: off
88
no-unused-vars: off
99
symbol-description: off
1010

11-
# add new ECMAScript features gradually
11+
# Add new ECMAScript features gradually
1212
no-var: error
1313
prefer-const: error
1414
prefer-rest-params: error

lib/.eslintrc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rules:
66
no-buffer-constructor: error
77
no-mixed-operators:
88
- error
9-
- groups: [[ "&&", "||" ]]
9+
- groups: [["&&", "||"]]
1010
no-restricted-syntax:
1111
# Config copied from .eslintrc.js
1212
- error

tools/.eslintrc.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ rules:
88
- properties: 'never'
99
ignoreDestructuring: true
1010
allow: ['child_process']
11-
no-unused-vars: [error, { args: 'after-used' }]
11+
no-unused-vars:
12+
- error
13+
- args: 'after-used'
1214
prefer-arrow-callback: error
1315
no-var: error

0 commit comments

Comments
 (0)