summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2021-09-19 09:34:44 +0200
committerNode.js GitHub Bot <github-bot@iojs.org>2021-09-21 17:03:51 +0000
commitf367af443496dc0dc8cdb924fabf1dd0f535be45 (patch)
treeb8a68517028b794c1e93639d940603a4dca1b89d
parent549f96889a77c39fa4f2257305788a00848f9e97 (diff)
downloadnode-new-f367af443496dc0dc8cdb924fabf1dd0f535be45.tar.gz
tools: extend default yamllint config
PR-URL: https://github.com/nodejs/node/pull/40150 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--.github/label-pr-config.yml24
-rw-r--r--.github/workflows/authors.yml8
-rw-r--r--.github/workflows/auto-start-ci.yml1
-rw-r--r--.github/workflows/close-stalled.yml34
-rw-r--r--.github/workflows/commit-queue.yml1
-rw-r--r--.github/workflows/license-builder.yml4
-rw-r--r--.yamllint.yaml9
-rw-r--r--doc/.eslintrc.yaml4
-rw-r--r--lib/.eslintrc.yaml2
-rw-r--r--tools/.eslintrc.yaml4
10 files changed, 49 insertions, 42 deletions
diff --git a/.github/label-pr-config.yml b/.github/label-pr-config.yml
index 6e1bccd478..c7a66707c6 100644
--- a/.github/label-pr-config.yml
+++ b/.github/label-pr-config.yml
@@ -103,9 +103,9 @@ subSystemLabels:
/^lib\/internal\/quic\/*/: quic, dont-land-on-v14.x, dont-land-on-v12.x
# All other lib/ files map directly
- /^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
- /^lib(\/internal)?\/(\w+)\.js?$/: $2 # other .js files
- /^lib\/internal\/(\w+)(?:\/|$)/: $1 # internal subfolders
+ /^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
+ /^lib(\/internal)?\/(\w+)\.js?$/: $2 # Other .js files
+ /^lib\/internal\/(\w+)(?:\/|$)/: $1 # internal subfolders
exlusiveLabels:
# more specific tests
@@ -125,26 +125,26 @@ exlusiveLabels:
/^test\//: test
- # specific map for webcrypto.md as it should be labeled 'crypto'
+ # Specific map for webcrypto.md as it should be labeled 'crypto'
/^doc\/api\/webcrypto.md$/: doc, crypto
- # specific map for modules.md as it should be labeled 'module' not 'modules'
+ # Specific map for modules.md as it should be labeled 'module' not 'modules'
/^doc\/api\/modules.md$/: doc, module
- # node-api is treated separately since it is not a JS core module but is still
- # considered a subsystem of sorts
+ # node-api is treated separately since it is not a JS core module but is still
+ # considered a subsystem of sorts
/^doc\/api\/n-api.md$/: doc, node-api
- # quic
+ # quic
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x, dont-land-on-v12.x
- # add worker label to PRs that affect doc/api/worker_threads.md
+ # Add worker label to PRs that affect doc/api/worker_threads.md
/^doc\/api\/worker_threads.md$/: doc, worker
- # automatically tag JS subsystem-specific API doc changes
+ # Automatically tag JS subsystem-specific API doc changes
/^doc\/api\/(\w+)\.md$/: doc, $1
- # add deprecations label to PRs that affect doc/api/deprecations.md
+ # Add deprecations label to PRs that affect doc/api/deprecations.md
/^doc\/api\/deprecations.md$/: doc, deprecations
/^doc\/changelogs\//: release
/^doc\//: doc
- # more specific benchmarks
+ # More specific benchmarks
/^benchmark\/buffers\//: benchmark, buffer
/^benchmark\/(?:arrays|es)\//: benchmark, v8 engine
/^benchmark\/_http/: benchmark, http
diff --git a/.github/workflows/authors.yml b/.github/workflows/authors.yml
index 8171df166a..146fcdb6a2 100644
--- a/.github/workflows/authors.yml
+++ b/.github/workflows/authors.yml
@@ -12,15 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
- fetch-depth: '0' # this is required to actually get all the authors
- - run: "tools/update-authors.js" # run the AUTHORS tool
- - uses: gr2m/create-or-update-pull-request-action@v1 # create a PR or update the Action's existing PR
+ fetch-depth: '0' # This is required to actually get all the authors
+ - run: "tools/update-authors.js" # Run the AUTHORS tool
+ - uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
with:
author: Node.js GitHub Bot <github-bot@iojs.org>
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."
- branch: "actions/authors-update" # custom branch *just* for this Action.
+ branch: "actions/authors-update" # Custom branch *just* for this Action.
commit-message: "meta: update AUTHORS"
labels: meta
title: "meta: update AUTHORS"
diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml
index c3527549e1..ef7c97d9e5 100644
--- a/.github/workflows/auto-start-ci.yml
+++ b/.github/workflows/auto-start-ci.yml
@@ -1,4 +1,3 @@
----
name: Auto Start CI
on:
diff --git a/.github/workflows/close-stalled.yml b/.github/workflows/close-stalled.yml
index 916baf0463..351ddb78c0 100644
--- a/.github/workflows/close-stalled.yml
+++ b/.github/workflows/close-stalled.yml
@@ -1,26 +1,26 @@
name: Close stalled issues and PRs
on:
schedule:
- - cron: "0 0 * * *"
+ - cron: "0 0 * * *"
jobs:
stale:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v3
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- days-before-close: 30
- stale-pr-label: stalled
- stale-issue-label: stalled
- 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.
- 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.
- # 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
- only-labels: stalled
- # max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
- operations-per-run: 500
- # deactivates automatic removal of stalled label if issue gets any activity
- remove-stale-when-updated: false
- # deactivates automatic stale labelling as we prefer to do that manually
- days-before-stale: -1
+ - uses: actions/stale@v3
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ days-before-close: 30
+ stale-pr-label: stalled
+ stale-issue-label: stalled
+ 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.
+ 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.
+ # 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
+ only-labels: stalled
+ # max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
+ operations-per-run: 500
+ # deactivates automatic removal of stalled label if issue gets any activity
+ remove-stale-when-updated: false
+ # deactivates automatic stale labelling as we prefer to do that manually
+ days-before-stale: -1
diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml
index 9b8e99c98e..b2d37f8090 100644
--- a/.github/workflows/commit-queue.yml
+++ b/.github/workflows/commit-queue.yml
@@ -1,4 +1,3 @@
----
# This action requires the following secrets to be set on the repository:
# GH_USER_NAME: GitHub user whose Jenkins and GitHub token are defined below
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml
index 115bef9977..b6453d61ac 100644
--- a/.github/workflows/license-builder.yml
+++ b/.github/workflows/license-builder.yml
@@ -12,8 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - run: "./tools/license-builder.sh" # run the license builder tool
- - uses: gr2m/create-or-update-pull-request-action@v1.x # create a PR or update the Action's existing PR
+ - run: "./tools/license-builder.sh" # Run the license builder tool
+ - uses: gr2m/create-or-update-pull-request-action@v1.x # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/.yamllint.yaml b/.yamllint.yaml
index d4af06e415..97ec306ea3 100644
--- a/.yamllint.yaml
+++ b/.yamllint.yaml
@@ -1,8 +1,15 @@
-extends: relaxed
+extends: default
rules:
+ document-start:
+ present: false
line-length: disable
+ truthy:
+ allowed-values: ['true', 'false', 'on', 'off']
ignore: |
/deps/
node_modules/
+ /test/fixtures/wpt/
+ /tools/gyp/
+ /tools/pip/
diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml
index 8e01bea6ab..fbc115669a 100644
--- a/doc/.eslintrc.yaml
+++ b/doc/.eslintrc.yaml
@@ -1,14 +1,14 @@
## Docs-specific linter rules
rules:
- # ease some restrictions in doc examples
+ # Ease some restrictions in doc examples
no-restricted-properties: off
no-undef: off
no-unused-expressions: off
no-unused-vars: off
symbol-description: off
- # add new ECMAScript features gradually
+ # Add new ECMAScript features gradually
no-var: error
prefer-const: error
prefer-rest-params: error
diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml
index 9f209505db..90715e4ea3 100644
--- a/lib/.eslintrc.yaml
+++ b/lib/.eslintrc.yaml
@@ -6,7 +6,7 @@ rules:
no-buffer-constructor: error
no-mixed-operators:
- error
- - groups: [[ "&&", "||" ]]
+ - groups: [["&&", "||"]]
no-restricted-syntax:
# Config copied from .eslintrc.js
- error
diff --git a/tools/.eslintrc.yaml b/tools/.eslintrc.yaml
index b98c59a15c..d2fe553393 100644
--- a/tools/.eslintrc.yaml
+++ b/tools/.eslintrc.yaml
@@ -8,6 +8,8 @@ rules:
- properties: 'never'
ignoreDestructuring: true
allow: ['child_process']
- no-unused-vars: [error, { args: 'after-used' }]
+ no-unused-vars:
+ - error
+ - args: 'after-used'
prefer-arrow-callback: error
no-var: error