eslint-plugin-woodpecker 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,27 @@
1
1
  <a id="top"></a>
2
2
 
3
- # <img height=24 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon32.png"> eslint-plugin-woodpecker
3
+ # <img height=24 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon32.png"> <picture><source media="(prefers-color-scheme: dark)" srcset="https://codeberg.org/adamlui/eslint-plugin-woodpecker/raw/branch/main/assets/images/icons/woodpecker/white/icon64.png"><img height=26 src="https://codeberg.org/adamlui/eslint-plugin-woodpecker/raw/branch/main/assets/images/icons/woodpecker/black/icon64.png"></picture> eslint-plugin-woodpecker
4
4
 
5
5
  <a target="_blank" href="https://www.npmjs.com/package/eslint-plugin-woodpecker">
6
6
  <img alt="[Latest Build]" src="https://img.shields.io/npm/v/eslint-plugin-woodpecker?logo=icinga&style=for-the-badge&label=Latest%20Build&color=32fcee"></a>
7
+ <a target="_blank" href="https://sonarcloud.io/component_measures?metric=new_security_rating&id=adamlui-gl_eslint-plugin-woodpecker"><img alt="[SonarQube Security Rating]" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fshieldcn.dev%2Fsonar%2Fsecurity%2Fadamlui-gl_eslint-plugin-woodpecker%2Fshields.json&style=for-the-badge&logo=sonar&logoColor=white&color=f1f20a&label=Security+Rating"></a>
7
8
  <a href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/src/branch/main/docs/LICENSE.md">
8
- <img alt="[License: MIT]" src="https://img.shields.io/badge/License-MIT-f1f20a.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
9
+ <img alt="[License: MIT]" src="https://img.shields.io/badge/License-MIT-d8d8da.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
9
10
  <a target="_blank" href="https://getnpmstats.com/?package=eslint-plugin-woodpecker&range=last-year&interval=monthly">
10
11
  <img alt="[Monthly npm downloads]" src="https://img.shields.io/npm/dm/eslint-plugin-woodpecker?style=for-the-badge&logo=npm&color=black"></a>
11
12
  <a target="_blank" href="https://eslint.org/">
12
13
  <img alt="[Requires ESLint >=9.0.0]" src="https://img.shields.io/badge/Requires-ESLint_%3E%3D9.0.0-4B32C3?style=for-the-badge&logo=eslint"></a>
13
14
  <br><br>
14
15
 
15
- ESLint rules for Woodpecker CI files (including shell commands).
16
+ <a target="_blank" href="https://eslint.org">ESLint</a> rules for <a target="_blank" href="https://woodpecker-ci.org">Woodpecker CI</a> files. Includes 400+ <a target="_blank" href="https://www.shellcheck.net/wiki/">ShellCheck</a> rules (in `strict` config).
16
17
 
17
18
  <img src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-woodpecker/02a07386aa/assets/images/screenshots/vs-code/squiggles.png">
18
19
 
19
20
  ---
20
21
 
21
- ## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/sharp-install-desktop.svg?color=%232b2b2a"> Installation
22
+ <h2 id="installation">
23
+ <img height=30 width=27 align="top" src="https://api.iconify.design/ic/sharp-install-desktop.svg?color=%232b2b2a"> Installation
24
+ </h2>
22
25
 
23
26
  From your project root:
24
27
 
@@ -33,7 +36,7 @@ npm i -D eslint-plugin-woodpecker
33
36
  Usage
34
37
  </h2>
35
38
 
36
- Add a bundled config to your `eslint.config.*js`:
39
+ Add a bundled config to your `eslint.config.*`:
37
40
 
38
41
  ```js
39
42
  ...
@@ -73,14 +76,14 @@ export default [
73
76
  Disabling rules
74
77
  </h2>
75
78
 
76
- Aside from editing `eslint.config.*js`, rules can also be disabled via inline YAML comments using <a target="_blank" href="https://eslint.org/docs/latest/use/configure/rules#disable-rules">standard ESLint directives</a>:
79
+ Aside from editing `eslint.config.*`, rules can also be disabled via inline YAML comments using standard <a target="_blank" href="https://eslint.org/docs/latest/use/configure/rules#disable-rules">ESLint directives</a>:
77
80
 
78
81
  ```yaml
79
82
  # eslint-disable woodpecker/require-event-filter
80
83
 
81
84
  steps:
82
- - name: pre-commit
83
- image: node:26.13.0-alpine@sha256:8996bb5821d62a8fd9bb27c1cb07462f3fdce6e47d640c6a881ead0b064ce216
85
+ - name: lint
86
+ image: node:26.13.0-alpine
84
87
  commands: # eslint-disable-next-line woodpecker/shellcheck-commands -- `APK_DEPS` unquoted to force multi args
85
88
  - apk add --no-cache $${APK_DEPS}
86
89
  - pip install --no-cache-dir --break-system-packages -r requirements-dev.txt
@@ -90,6 +93,128 @@ steps:
90
93
 
91
94
  ---
92
95
 
96
+ <h2 id="integrations">
97
+ <img width=26 align="top" src="https://api.iconify.design/mdi/connection.svg?color=%232b2b2a">
98
+ Integrations
99
+ </h2>
100
+
101
+ <h3 id="ide">
102
+ <img width=16 align=bottom title="VS Code" src="https://www.google.com/s2/favicons?domain=code.visualstudio.com&sz=32">
103
+ <img width=16 align=bottom title="Cursor" src="https://www.google.com/s2/favicons?domain=cursor.com&sz=32">
104
+ <img width=16 align=bottom title="Devin" src="https://www.google.com/s2/favicons?domain=devin.ai&sz=32">
105
+ <img width=16 align=bottom title="VSCodium" src="https://www.google.com/s2/favicons?domain=vscodium.com&sz=32">
106
+ <img width=16 align=bottom title="Antigravity" src="https://www.google.com/s2/favicons?domain=antigravity.google&sz=32">
107
+ <img width=16 align=bottom title="Void" src="https://www.google.com/s2/favicons?domain=voideditor.com&sz=32">
108
+ <img width=16 align=bottom title="Positron" src="https://www.google.com/s2/favicons?domain=positron.posit.co&sz=32">
109
+ <img width=16 align=bottom title="JetBrains" src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=32">
110
+ <img width=16 align=bottom title="Sublime Text" src="https://www.google.com/s2/favicons?domain=sublimetext.com&sz=32">
111
+ <img width=16 align=bottom title="Neovim" src="https://www.google.com/s2/favicons?domain=neovim.io&sz=32">
112
+ </h3>
113
+
114
+ <details>
115
+
116
+ <summary>Install an <strong>IDE extension</strong> for extended features (e.g. live linting, auto-fix).</summary><br>
117
+
118
+ <table>
119
+ <thead>
120
+ <tr>
121
+ <th align="center">Editor</th>
122
+ <th align="center">Extension</th>
123
+ </tr>
124
+ </thead>
125
+ <tbody>
126
+ <tr>
127
+ <td align="center"><img width=14 src="https://www.google.com/s2/favicons?domain=code.visualstudio.com&sz=16"> VS Code</td>
128
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=visualstudio.com&sz=16"> <a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint"><code>dbaeumer.vscode-eslint</code></a></td>
129
+ </tr>
130
+ <tr>
131
+ <td align="center"><img width=14 title="Cursor" src="https://www.google.com/s2/favicons?domain=cursor.com&sz=32"> <img width=14 title="Devin" src="https://www.google.com/s2/favicons?domain=devin.ai&sz=32"> <img width=14 title="VSCodium" src="https://www.google.com/s2/favicons?domain=vscodium.com&sz=32"> VS Code forks</td>
132
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=open-vsx.org&sz=16"> <a target="_blank" href="https://open-vsx.org/extension/dbaeumer/vscode-eslint"><code>dbaeumer.vscode-eslint</code></a></td>
133
+ </tr>
134
+ <tr>
135
+ <td align="center"><img width=14 src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=16"> JetBrains</td>
136
+ <td align="center"><img width=14 align=bottom src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=16"> <a target="_blank" href="https://plugins.jetbrains.com/plugin/25292-eslint"><code>25292-eslint</code></a></td>
137
+ </tr>
138
+ <tr>
139
+ <td align="center"><img width=14 src="https://www.google.com/s2/favicons?domain=sublimetext.com&sz=16"> Sublime Text</td>
140
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=sublimetext.com&sz=16"> <a target="_blank" href="https://packages.sublimetext.com/packages/LSP-eslint"><code>LSP-eslint</code></a></td>
141
+ </tr>
142
+ <tr>
143
+ <td align="center"><img width=14 src="https://www.google.com/s2/favicons?domain=neovim.io&sz=16"> Neovim</td>
144
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=npmjs.com&sz=16"> <a target="_blank" href="https://www.npmjs.com/package/coc-eslint"><code>coc-eslint</code></a></td>
145
+ </tr>
146
+ </tbody>
147
+ </table>
148
+
149
+ ---
150
+
151
+ </details>
152
+
153
+ <h3 id="ci">
154
+ <img width=16 align=bottom title="Woodpecker CI" src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=32">
155
+ <img width=16 align=bottom title="Forgejo Actions" src="https://www.google.com/s2/favicons?domain=forgejo.org&sz=32">
156
+ <img width=16 align=bottom title="Drone CI" src="https://www.google.com/s2/favicons?domain=drone.io&sz=32">
157
+ <img width=16 align=bottom title="Harness CI" src="https://www.google.com/s2/favicons?domain=harness.io&sz=32">
158
+ <img width=16 align=bottom title="GitLab CI" src="https://www.google.com/s2/favicons?domain=gitlab.com&sz=32">
159
+ <img width=16 align=bottom title="CircleCI" src="https://www.google.com/s2/favicons?domain=circleci.com&sz=32">
160
+ <img width=16 align=bottom title="pre-commit" src="https://www.google.com/s2/favicons?domain=pre-commit.com&sz=32">
161
+ <img width=16 align=bottom title="TeamCity" src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=32">
162
+ <img width=16 align=bottom title="GitHub Actions" src="https://www.google.com/s2/favicons?domain=github.com&sz=32">
163
+ </h3>
164
+
165
+ <details>
166
+
167
+ <summary>Use plugins in your <strong>CI pipeline</strong>.</summary><br>
168
+
169
+ <table>
170
+ <thead>
171
+ <tr>
172
+ <th align="center">CI</th>
173
+ <th align="center">Plugin</th>
174
+ </tr>
175
+ </thead>
176
+ <tbody>
177
+ <tr>
178
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=16"> Woodpecker CI</td>
179
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=16"> <a target="_blank" href="https://woodpecker-ci.org/plugins/eslint"><code>eslint</code></a></td>
180
+ </tr>
181
+ <tr>
182
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=forgejo.org&sz=16"> Forgejo Actions<sup><small>1</small></sup></td>
183
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=forgejo.org&sz=16"> <code>https://github.com/sibiraj-s/action-eslint@v4</code></td>
184
+ </tr>
185
+ <tr>
186
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=drone.io&sz=16"> Drone CI + <img width=13 src="https://www.google.com/s2/favicons?domain=harness.io&sz=16"> Harness CI</td>
187
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=docker.com&sz=16"> <a target="_blank" href="https://hub.docker.com/r/adamlui/drone-eslint"><code>adamlui/drone-eslint</code></a></td>
188
+ </tr>
189
+ <tr>
190
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=gitlab.com&sz=16"> GitLab CI</td>
191
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=gitlab.com&sz=16"> <a target="_blank" href="https://gitlab.com/components/code-quality-oss/codequality-os-scanners-integration"><code>code-quality-oss/codequality-os-scanners-integration</code></a></td>
192
+ </tr>
193
+ <tr>
194
+ <td align="center"><img width=15 align=bottom src="https://www.google.com/s2/favicons?domain=circleci.com&sz=32"> CircleCI</td>
195
+ <td align="center"><img width=15 align=bottom src="https://www.google.com/s2/favicons?domain=circleci.com&sz=32"> <a target="_blank" href="https://circleci.com/developer/orbs/orb/arrai/eslint"><code>arrai/eslint</code></a></td>
196
+ </tr>
197
+ <tr>
198
+ <td align="center"><img width=14 src="https://www.google.com/s2/favicons?domain=pre-commit.com&sz=16"> pre-commit</td>
199
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=github.com&sz=16"> <a target="_blank" href="https://github.com/pre-commit/mirrors-eslint"><code>pre-commit/mirrors-eslint</code></a></td>
200
+ </tr>
201
+ <tr>
202
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=16"> TeamCity</td>
203
+ <td align="center"><img width=12 align=bottom src="https://www.google.com/s2/favicons?domain=npmjs.com&sz=16"> <a target="_blank" href="https://www.npmjs.com/package/eslint-formatter-teamcity"><code>eslint-formatter-teamcity</code></a></td>
204
+ </tr>
205
+ <tr>
206
+ <td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=github.com&sz=16"> GitHub Actions</td>
207
+ <td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=github.com&sz=16"> <a target="_blank" href="https://github.com/marketplace/actions/action-eslint"><code>action-eslint</code></a></td>
208
+ </tr>
209
+ </tbody>
210
+ </table>
211
+
212
+ <small><sup>1</sup> Set the URL as <a target="_blank" href="https://forgejo.org/docs/next/user/actions/reference/#jobsjob_idstepsuses"><code>uses</code></a> to run. For improved security, replace the URL's ver tag w/ a commit hash.</small>
213
+
214
+ </details>
215
+
216
+ ---
217
+
93
218
  <h2 id="supported-rules">
94
219
  <img height=30 width=27 align="top" src="https://api.iconify.design/mdi/format-list-checks.svg?color=%232b2b2a">
95
220
  Supported rules
@@ -370,7 +495,6 @@ If you use a modified schema.
370
495
  #### See also
371
496
 
372
497
  - <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64">&ensp;<a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
373
- - <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64">&ensp;<a target="_blank" href="https://woodpecker-ci.org/docs/cli">Woodpecker — CLI reference</a>
374
498
 
375
499
  <div align="center">
376
500
 
@@ -404,10 +528,6 @@ If you use a modified schema.
404
528
 
405
529
  ## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/baseline-account-balance.svg?color=%232b2b2a"> License
406
530
 
407
- <a href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/src/branch/main/docs/LICENSE.md">
408
- <img height=88 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-chrome-extensions/d79e1db7e2/assets/images/banners/mit-license/banner.png"></a>
409
- <br><br>
410
-
411
531
  <details>
412
532
 
413
533
  <summary>Copyright © 2026 <a target="_blank" href="https://codeberg.org/adamlui"><b>Adam Lui</b></a> under the <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/src/branch/main/docs/LICENSE.md"><b>MIT license</b></a>.</summary><br>
package/docs/LICENSE.md CHANGED
@@ -7,3 +7,7 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
7
7
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
8
 
9
9
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
10
+
11
+ ---
12
+
13
+ SPDX-License-Identifier: MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-woodpecker",
3
- "version": "1.1.7",
4
- "description": "ESLint rules for Woodpecker CI files (including shell commands)",
3
+ "version": "1.1.9",
4
+ "description": "ESLint rules for Woodpecker CI files (including shell commands!)",
5
5
  "keywords": [
6
6
  "ci",
7
7
  "eslint",
@@ -63,13 +63,10 @@
63
63
  "katex": "^0.19.1"
64
64
  },
65
65
  "eslint": {
66
- "minimatch": "^11.0.5"
66
+ "minimatch": "^11.0.9"
67
67
  },
68
68
  "eslint-plugin-import-x": {
69
- "minimatch": "^11.0.5"
70
- },
71
- "eslint-plugin-sonarjs": {
72
- "minimatch": "^11.0.5"
69
+ "minimatch": "^11.0.9"
73
70
  }
74
71
  },
75
72
  "dependencies": {
@@ -79,23 +76,23 @@
79
76
  "devDependencies": {
80
77
  "@e18e/eslint-plugin": "^0.8.1",
81
78
  "@eslint/json": "^2.1.1",
82
- "@eslint/markdown": "^8.0.3",
83
- "@stylistic/eslint-plugin": "^5.10.0",
84
- "@typescript-eslint/parser": "^8.72.2",
85
- "@typescript-eslint/utils": "^8.72.2",
86
- "eslint": "^10.14.0",
87
- "eslint-plugin-constructors": "^1.7.2",
79
+ "@eslint/markdown": "^9.0.0",
80
+ "@stylistic/eslint-plugin": "^6.0.1",
81
+ "@types/eslint-plugin-no-unsanitized": "^4.1.0",
82
+ "@typescript-eslint/parser": "^8.74.0",
83
+ "@typescript-eslint/utils": "^8.74.0",
84
+ "eslint": "^10.15.0",
85
+ "eslint-plugin-constructors": "^1.7.7",
88
86
  "eslint-plugin-eslint-plugin": "^7.6.2",
89
87
  "eslint-plugin-import-x": "^4.18.1",
90
- "eslint-plugin-n": "^18.5.0",
88
+ "eslint-plugin-n": "^18.6.0",
91
89
  "eslint-plugin-no-secrets": "^2.3.3",
92
90
  "eslint-plugin-no-unsanitized": "^4.1.5",
93
91
  "eslint-plugin-package-json": "^1.14.0",
94
- "eslint-plugin-promise": "^7.3.0",
95
92
  "eslint-plugin-regexp": "^3.3.3",
96
93
  "eslint-plugin-security": "^4.2.1",
97
- "eslint-plugin-sonarjs": "^4.2.2",
98
- "oxlint": "^1.93.0",
94
+ "eslint-plugin-sonarjs": "^4.2.3",
95
+ "oxlint": "^1.95.0",
99
96
  "typescript": "npm:@typescript/typescript6@^6.0.2",
100
97
  "typescript-latest": "npm:typescript@^7.0.2"
101
98
  },
@@ -29,7 +29,7 @@ export default {
29
29
 
30
30
  getWhen(when) {
31
31
  if (!when) return null
32
- else if (Array.isArray(when)) return when.map(when => this.getWhen(when)).find(Boolean) || null
32
+ else if (Array.isArray(when)) return when.map(entry => this.getWhen(entry)).find(Boolean) || null
33
33
  else if (typeof when != 'object') return null
34
34
  else if (typeof when.event == 'string' || Array.isArray(when.event)) return when
35
35
  else return null
@@ -43,7 +43,7 @@ export default {
43
43
  if (!pair) return null
44
44
  node = pair.value
45
45
  } else if (isSeq(node)) {
46
- const idx = typeof key == 'number' ? key : re.digitsOnly.test(String(key)) ? Number(key) : NaN
46
+ const idx = typeof key == 'number' ? key : re.digitsOnly.test(String(key)) ? Number(key) : Number.NaN
47
47
  if (!Number.isInteger(idx) || idx < 0 || idx >= node.items.length) return null
48
48
  node = node.items[idx] // oxlint-disable-line security/detect-object-injection
49
49
  } else return null
package/src/utils/yaml.js CHANGED
@@ -43,7 +43,7 @@ function extractComments(text) {
43
43
  })
44
44
  }
45
45
 
46
- return comments.sort((a, b) => a.range[0] - b.range[0])
46
+ return comments.sort((a, b) => a.range[0] - b.range[0]) // oxlint-disable-line unicorn/no-array-sort
47
47
  }
48
48
 
49
49
  export default {