eslint-plugin-woodpecker 1.0.0 → 1.1.0
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 +458 -458
- package/package.json +94 -94
- package/src/data/regex.js +1 -1
- package/src/data/schema.js +393 -61
- package/src/index.d.ts +33 -0
- package/src/index.js +8 -8
- package/src/rules/no-duplicate-step-names.js +35 -36
- package/src/rules/require-event-filter.js +33 -33
- package/src/rules/shellcheck-commands.js +77 -72
- package/src/rules/valid-depends-on.js +39 -34
- package/src/rules/valid-schema.js +36 -34
- package/src/utils/init.js +46 -44
- package/src/utils/pkg.js +23 -0
- package/src/utils/rules.js +7 -8
- package/src/utils/schema.js +21 -21
- package/src/utils/shellcheck.js +34 -35
- package/src/utils/woodpecker.js +70 -41
package/README.md
CHANGED
|
@@ -1,458 +1,458 @@
|
|
|
1
|
-
<a id="top"></a>
|
|
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
|
|
4
|
-
|
|
5
|
-
<a target="_blank" href="https://www.npmjs.com/package/eslint-plugin-woodpecker">
|
|
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 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
|
-
<a target="_blank" href="https://eslint.org/">
|
|
10
|
-
<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>
|
|
11
|
-
<br><br>
|
|
12
|
-
|
|
13
|
-
ESLint rules for Woodpecker CI.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/sharp-install-desktop.svg?color=%232b2b2a"> Installation
|
|
20
|
-
|
|
21
|
-
From your project root:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm i -D eslint-plugin-woodpecker
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
<h2 id="usage">
|
|
30
|
-
<img height=30 width=28 align="top" src="https://api.iconify.design/entypo/power-plug.svg?color=%232b2b2a">
|
|
31
|
-
Usage
|
|
32
|
-
</h2>
|
|
33
|
-
|
|
34
|
-
Add a bundled config to your `eslint.config.*js`:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
...
|
|
38
|
-
import woodpecker from 'eslint-plugin-woodpecker'
|
|
39
|
-
|
|
40
|
-
export default [
|
|
41
|
-
// other configs
|
|
42
|
-
woodpecker.configs.recommended
|
|
43
|
-
]
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Available bundles: `recommended`, `strict
|
|
47
|
-
|
|
48
|
-
**Note:** Rule config is either a severity string (`'off'`, `'warn'`, `'error'`) or an array `[severity, options]` when the rule accepts options:
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
...
|
|
52
|
-
import woodpecker from 'eslint-plugin-woodpecker'
|
|
53
|
-
|
|
54
|
-
export default [
|
|
55
|
-
// other configs
|
|
56
|
-
{
|
|
57
|
-
...woodpecker.configs.
|
|
58
|
-
rules: {
|
|
59
|
-
...woodpecker.configs.
|
|
60
|
-
'woodpecker/require-event-filter': 'off', // selectively disable rule
|
|
61
|
-
'woodpecker/shellcheck-commands': ['error', { ignoreCodes: ['SC2086'] }] // selectively tweak rule
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
<h2 id="supported-rules">
|
|
70
|
-
<img height=30 width=27 align="top" src="https://api.iconify.design/mdi/format-list-checks.svg?color=%232b2b2a">
|
|
71
|
-
Supported rules
|
|
72
|
-
</h2>
|
|
73
|
-
|
|
74
|
-
<h3 id="no-duplicate-step-names">
|
|
75
|
-
<code>no-duplicate-step-names</code>
|
|
76
|
-
<a title="Included in recommended config" href="#usage">
|
|
77
|
-
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
78
|
-
<a title="Copy rule URL" target="_blank"
|
|
79
|
-
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23no-duplicate-step-names">
|
|
80
|
-
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
81
|
-
</h3>
|
|
82
|
-
|
|
83
|
-
<details>
|
|
84
|
-
|
|
85
|
-
<summary>Disallows duplicate step names.</summary>
|
|
86
|
-
|
|
87
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
88
|
-
|
|
89
|
-
```diff
|
|
90
|
-
steps:
|
|
91
|
-
- name: build
|
|
92
|
-
image: node:20
|
|
93
|
-
! - name: build
|
|
94
|
-
image: alpine
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
98
|
-
|
|
99
|
-
```diff
|
|
100
|
-
steps:
|
|
101
|
-
- name: build
|
|
102
|
-
image: node:20
|
|
103
|
-
- - name: build
|
|
104
|
-
+ - name: deploy
|
|
105
|
-
image: alpine
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
#### When not to use it
|
|
109
|
-
|
|
110
|
-
If you intentionally duplicate step names.
|
|
111
|
-
|
|
112
|
-
#### Introduced in
|
|
113
|
-
|
|
114
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
115
|
-
|
|
116
|
-
#### See also
|
|
117
|
-
|
|
118
|
-
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
119
|
-
|
|
120
|
-
<div align="center">
|
|
121
|
-
|
|
122
|
-
[Back to index ↑][epw-rules]
|
|
123
|
-
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
</details>
|
|
129
|
-
|
|
130
|
-
<h3 id="require-event-filter">
|
|
131
|
-
<code>require-event-filter</code>
|
|
132
|
-
<a title="
|
|
133
|
-
<img height=18 alt="[
|
|
134
|
-
<a title="Copy rule URL" target="_blank"
|
|
135
|
-
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23require-event-filter">
|
|
136
|
-
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
137
|
-
</h3>
|
|
138
|
-
|
|
139
|
-
<details>
|
|
140
|
-
|
|
141
|
-
<summary>Requires <code>when.event</code> so the pipeline does not trigger on every event.</summary>
|
|
142
|
-
|
|
143
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
144
|
-
|
|
145
|
-
```diff
|
|
146
|
-
steps:
|
|
147
|
-
build:
|
|
148
|
-
image: node:20
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
+
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<
|
|
186
|
-
|
|
187
|
-
<a title="
|
|
188
|
-
<img height=18 alt="[
|
|
189
|
-
<a title="
|
|
190
|
-
<img height=18 alt="[
|
|
191
|
-
<a title="Copy rule URL" target="_blank"
|
|
192
|
-
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23shellcheck-commands">
|
|
193
|
-
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
194
|
-
</h3>
|
|
195
|
-
|
|
196
|
-
<details>
|
|
197
|
-
|
|
198
|
-
<summary>Runs ShellCheck against every <code>commands</code> entry.</summary>
|
|
199
|
-
|
|
200
|
-
<h4 id="shellcheck-commands-options">Options</h4>
|
|
201
|
-
|
|
202
|
-
- `ignoreCodes` (default `[]`) – SC codes to suppress project-wide (e.g. `['SC2086']`)
|
|
203
|
-
- `enableChecks` (default `[]`) – optional ShellCheck checks to enable (e.g. `['avoid-nullary-conditions']`)
|
|
204
|
-
- `shell` (default `'sh'`) – shell dialect to assume (`'ash'`, `'bash'`, `'busybox'`, `'dash'`, `'ksh'`, `'sh'`)
|
|
205
|
-
- `shellcheckPath` (default `null`) – explicit path to the `shellcheck` binary (when omitted, resolves from `PATH`)
|
|
206
|
-
|
|
207
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
208
|
-
|
|
209
|
-
```diff
|
|
210
|
-
steps:
|
|
211
|
-
build:
|
|
212
|
-
image: node:20
|
|
213
|
-
commands:
|
|
214
|
-
! - 'foo="bar baz"; echo $foo'
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
218
|
-
|
|
219
|
-
```diff
|
|
220
|
-
steps:
|
|
221
|
-
build:
|
|
222
|
-
image: node:20
|
|
223
|
-
commands:
|
|
224
|
-
- - 'foo="bar baz"; echo $foo'
|
|
225
|
-
+ - 'foo="bar baz"; echo "$foo"'
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
#### When not to use it
|
|
229
|
-
|
|
230
|
-
If you don't have the ShellCheck binary installed, or you
|
|
231
|
-
|
|
232
|
-
#### Introduced in
|
|
233
|
-
|
|
234
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
235
|
-
|
|
236
|
-
#### See also
|
|
237
|
-
|
|
238
|
-
- <img height=12 src="https://www.google.com/s2/favicons?domain=
|
|
239
|
-
|
|
240
|
-
<div align="center">
|
|
241
|
-
|
|
242
|
-
[Back to index ↑][epw-rules]
|
|
243
|
-
|
|
244
|
-
</div>
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
</details>
|
|
249
|
-
|
|
250
|
-
<h3 id="valid-depends-on">
|
|
251
|
-
<code>valid-depends-on</code>
|
|
252
|
-
<a title="Included in recommended config" href="#usage">
|
|
253
|
-
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
254
|
-
<a title="Copy rule URL" target="_blank"
|
|
255
|
-
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23valid-depends-on">
|
|
256
|
-
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
257
|
-
</h3>
|
|
258
|
-
|
|
259
|
-
<details>
|
|
260
|
-
|
|
261
|
-
<summary>Disallows <code>depends_on</code> entries referencing unknown step names.</summary>
|
|
262
|
-
|
|
263
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
264
|
-
|
|
265
|
-
```diff
|
|
266
|
-
steps:
|
|
267
|
-
build:
|
|
268
|
-
image: node:20
|
|
269
|
-
deploy:
|
|
270
|
-
image: alpine
|
|
271
|
-
! depends_on: [test]
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
275
|
-
|
|
276
|
-
```diff
|
|
277
|
-
steps:
|
|
278
|
-
build:
|
|
279
|
-
image: node:20
|
|
280
|
-
deploy:
|
|
281
|
-
image: alpine
|
|
282
|
-
- depends_on: [test]
|
|
283
|
-
+ depends_on: [build]
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
#### When not to use it
|
|
287
|
-
|
|
288
|
-
If you generate `depends_on` at build time.
|
|
289
|
-
|
|
290
|
-
#### Introduced in
|
|
291
|
-
|
|
292
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
293
|
-
|
|
294
|
-
#### See also
|
|
295
|
-
|
|
296
|
-
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
297
|
-
|
|
298
|
-
<div align="center">
|
|
299
|
-
|
|
300
|
-
[Back to index ↑][epw-rules]
|
|
301
|
-
|
|
302
|
-
</div>
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
</details>
|
|
307
|
-
|
|
308
|
-
<h3 id="valid-schema">
|
|
309
|
-
<code>valid-schema</code>
|
|
310
|
-
<a title="Included in recommended config" href="#usage">
|
|
311
|
-
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
312
|
-
<a title="Copy rule URL" target="_blank"
|
|
313
|
-
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23valid-schema">
|
|
314
|
-
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
315
|
-
</h3>
|
|
316
|
-
|
|
317
|
-
<details>
|
|
318
|
-
|
|
319
|
-
<summary>Validates Woodpecker YAML files against the Woodpecker CI schema.</summary>
|
|
320
|
-
|
|
321
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
322
|
-
|
|
323
|
-
```diff
|
|
324
|
-
steps:
|
|
325
|
-
build:
|
|
326
|
-
commands: ['npm test']
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
330
|
-
|
|
331
|
-
```diff
|
|
332
|
-
steps:
|
|
333
|
-
build:
|
|
334
|
-
+ image: node:20
|
|
335
|
-
commands: ['npm test']
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
#### When not to use it
|
|
339
|
-
|
|
340
|
-
If you use a modified schema.
|
|
341
|
-
|
|
342
|
-
#### Introduced in
|
|
343
|
-
|
|
344
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
345
|
-
|
|
346
|
-
#### See also
|
|
347
|
-
|
|
348
|
-
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
349
|
-
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/cli">Woodpecker — CLI reference</a>
|
|
350
|
-
|
|
351
|
-
<div align="center">
|
|
352
|
-
|
|
353
|
-
[Back to index ↑][epw-rules]
|
|
354
|
-
|
|
355
|
-
</div>
|
|
356
|
-
|
|
357
|
-
</details>
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
## <img width=30 align="top" src="https://api.iconify.design/boxicons/code-alt-filled.svg?color=%232b2b2a"> Shield embed
|
|
362
|
-
|
|
363
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme">
|
|
364
|
-
<img height=32 alt="[Linted by eslint-plugin-woodpecker]" src="https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
365
|
-
|
|
366
|
-
#### HTML
|
|
367
|
-
|
|
368
|
-
```html
|
|
369
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme">
|
|
370
|
-
<img height=32 alt="[Linted by eslint-plugin-woodpecker]" src="https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
#### Markdown
|
|
374
|
-
|
|
375
|
-
```md
|
|
376
|
-
[![[Linted by eslint-plugin-woodpecker]](https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge)](https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme)
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/baseline-account-balance.svg?color=%232b2b2a"> License
|
|
382
|
-
|
|
383
|
-
<a
|
|
384
|
-
<img height=
|
|
385
|
-
<br><br>
|
|
386
|
-
|
|
387
|
-
<details>
|
|
388
|
-
|
|
389
|
-
<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>
|
|
390
|
-
|
|
391
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
392
|
-
|
|
393
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
394
|
-
|
|
395
|
-
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
|
|
396
|
-
|
|
397
|
-
</details>
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
## <img height=30 width=29 align="top" src="https://api.iconify.design/bxs/package.svg?color=%232b2b2a"> Related
|
|
402
|
-
|
|
403
|
-
<!-- eslint-plugin-chrome-extensions -->
|
|
404
|
-
|
|
405
|
-
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-chrome-extensions</a>
|
|
406
|
-
|
|
407
|
-
<details>
|
|
408
|
-
|
|
409
|
-
<summary>ESLint rules for Chrome extensions.</summary><br>
|
|
410
|
-
|
|
411
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-chrome-extensions/04d2f53b22/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
412
|
-
|
|
413
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#supported-rules">Supported rules</a>
|
|
414
|
-
|
|
415
|
-
</details>
|
|
416
|
-
|
|
417
|
-
<!-- eslint-plugin-constructors -->
|
|
418
|
-
|
|
419
|
-
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-constructors</a>
|
|
420
|
-
|
|
421
|
-
<details>
|
|
422
|
-
|
|
423
|
-
<summary>ESLint rules for JavaScript constructor usage.</summary><br>
|
|
424
|
-
|
|
425
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-constructors/6eeba7b2cb/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
426
|
-
|
|
427
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#supported-rules">Supported rules</a>
|
|
428
|
-
|
|
429
|
-
</details>
|
|
430
|
-
|
|
431
|
-
<!-- eslint-plugin-greasemonkey -->
|
|
432
|
-
|
|
433
|
-
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-greasemonkey</a>
|
|
434
|
-
|
|
435
|
-
<details>
|
|
436
|
-
|
|
437
|
-
<summary>ESLint rules for Greasemonkey userscripts.</summary><br>
|
|
438
|
-
|
|
439
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/c9ac2985bb/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
440
|
-
|
|
441
|
-
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#supported-rules">Supported rules</a>
|
|
442
|
-
|
|
443
|
-
</details>
|
|
444
|
-
|
|
445
|
-
<!-- Footer -->
|
|
446
|
-
|
|
447
|
-
<img height=10 width="100%" src="https://cdn.staticdelivr.com/gl/adamlui/ai-web-extensions/d11d2ee/assets/images/separators/gradient-aqua.png">
|
|
448
|
-
|
|
449
|
-
<div align="center">
|
|
450
|
-
|
|
451
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.staticdelivr.com/gl/adamlui/js-utils/6b0d399/assets/images/icons/tag/white/icon16.svg"><img height=14 src="https://cdn.staticdelivr.com/gl/adamlui/js-utils/6b0d399/assets/images/icons/tag/dark-gray/icon16.svg"></picture>
|
|
452
|
-
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases"><b>Latest releases</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/issues/new">Report a bug</a> / <a target="_blank" href="https://www.npmjs.com/~adamlui">More packages by author</a> / [Back to top ↑](#top)
|
|
453
|
-
|
|
454
|
-
</div>
|
|
455
|
-
|
|
456
|
-
<!-- Links -->
|
|
457
|
-
|
|
458
|
-
[epw-rules]: #supported-rules
|
|
1
|
+
<a id="top"></a>
|
|
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
|
|
4
|
+
|
|
5
|
+
<a target="_blank" href="https://www.npmjs.com/package/eslint-plugin-woodpecker">
|
|
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 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
|
+
<a target="_blank" href="https://eslint.org/">
|
|
10
|
+
<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>
|
|
11
|
+
<br><br>
|
|
12
|
+
|
|
13
|
+
ESLint rules for Woodpecker CI (including shell commands).
|
|
14
|
+
|
|
15
|
+
<img src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-woodpecker/02a07386aa/assets/images/screenshots/vs-code/squiggles.png">
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/sharp-install-desktop.svg?color=%232b2b2a"> Installation
|
|
20
|
+
|
|
21
|
+
From your project root:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm i -D eslint-plugin-woodpecker
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<h2 id="usage">
|
|
30
|
+
<img height=30 width=28 align="top" src="https://api.iconify.design/entypo/power-plug.svg?color=%232b2b2a">
|
|
31
|
+
Usage
|
|
32
|
+
</h2>
|
|
33
|
+
|
|
34
|
+
Add a bundled config to your `eslint.config.*js`:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
...
|
|
38
|
+
import woodpecker from 'eslint-plugin-woodpecker'
|
|
39
|
+
|
|
40
|
+
export default [
|
|
41
|
+
// other configs
|
|
42
|
+
woodpecker.configs.recommended
|
|
43
|
+
]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Available bundles: `recommended`, `strict` (everything), `problem` (deterministic bugs only)
|
|
47
|
+
|
|
48
|
+
**Note:** Rule config is either a severity string (`'off'`, `'warn'`, `'error'`) or an array `[severity, options]` when the rule accepts options:
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
...
|
|
52
|
+
import woodpecker from 'eslint-plugin-woodpecker'
|
|
53
|
+
|
|
54
|
+
export default [
|
|
55
|
+
// other configs
|
|
56
|
+
{
|
|
57
|
+
...woodpecker.configs.strict,
|
|
58
|
+
rules: {
|
|
59
|
+
...woodpecker.configs.strict.rules,
|
|
60
|
+
'woodpecker/require-event-filter': 'off', // selectively disable rule
|
|
61
|
+
'woodpecker/shellcheck-commands': ['error', { ignoreCodes: ['SC2086'] }] // selectively tweak rule
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
<h2 id="supported-rules">
|
|
70
|
+
<img height=30 width=27 align="top" src="https://api.iconify.design/mdi/format-list-checks.svg?color=%232b2b2a">
|
|
71
|
+
Supported rules
|
|
72
|
+
</h2>
|
|
73
|
+
|
|
74
|
+
<h3 id="no-duplicate-step-names">
|
|
75
|
+
<code>no-duplicate-step-names</code>
|
|
76
|
+
<a title="Included in recommended config" href="#usage">
|
|
77
|
+
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
78
|
+
<a title="Copy rule URL" target="_blank"
|
|
79
|
+
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23no-duplicate-step-names">
|
|
80
|
+
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
81
|
+
</h3>
|
|
82
|
+
|
|
83
|
+
<details>
|
|
84
|
+
|
|
85
|
+
<summary>Disallows duplicate step names.</summary>
|
|
86
|
+
|
|
87
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
88
|
+
|
|
89
|
+
```diff
|
|
90
|
+
steps:
|
|
91
|
+
- name: build
|
|
92
|
+
image: node:20
|
|
93
|
+
! - name: build
|
|
94
|
+
image: alpine
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
98
|
+
|
|
99
|
+
```diff
|
|
100
|
+
steps:
|
|
101
|
+
- name: build
|
|
102
|
+
image: node:20
|
|
103
|
+
- - name: build
|
|
104
|
+
+ - name: deploy
|
|
105
|
+
image: alpine
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### When not to use it
|
|
109
|
+
|
|
110
|
+
If you intentionally duplicate step names.
|
|
111
|
+
|
|
112
|
+
#### Introduced in
|
|
113
|
+
|
|
114
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
115
|
+
|
|
116
|
+
#### See also
|
|
117
|
+
|
|
118
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
119
|
+
|
|
120
|
+
<div align="center">
|
|
121
|
+
|
|
122
|
+
[Back to index ↑][epw-rules]
|
|
123
|
+
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
<h3 id="require-event-filter">
|
|
131
|
+
<code>require-event-filter</code>
|
|
132
|
+
<a title="Included in recommended config" href="#usage">
|
|
133
|
+
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
134
|
+
<a title="Copy rule URL" target="_blank"
|
|
135
|
+
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23require-event-filter">
|
|
136
|
+
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
137
|
+
</h3>
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
|
|
141
|
+
<summary>Requires <code>when.event</code> so the pipeline does not trigger on every event.</summary>
|
|
142
|
+
|
|
143
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
144
|
+
|
|
145
|
+
```diff
|
|
146
|
+
steps:
|
|
147
|
+
build:
|
|
148
|
+
image: node:20
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
152
|
+
|
|
153
|
+
```diff
|
|
154
|
+
+ when:
|
|
155
|
+
+ event: push
|
|
156
|
+
steps:
|
|
157
|
+
build:
|
|
158
|
+
image: node:20
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### When not to use it
|
|
162
|
+
|
|
163
|
+
If you intentionally trigger your pipeline on every event, or if you filter per-step.
|
|
164
|
+
|
|
165
|
+
#### Introduced in
|
|
166
|
+
|
|
167
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
168
|
+
|
|
169
|
+
#### See also
|
|
170
|
+
|
|
171
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax#when">Woodpecker — `when` conditions</a>
|
|
172
|
+
|
|
173
|
+
<div align="center">
|
|
174
|
+
|
|
175
|
+
[Back to index ↑][epw-rules]
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
</details>
|
|
182
|
+
|
|
183
|
+
<h3 id="shellcheck-commands">
|
|
184
|
+
<code>shellcheck-commands</code>
|
|
185
|
+
<a title="Only included in strict config" href="#usage">
|
|
186
|
+
<img height=18 alt="[Strict only]" src="https://img.shields.io/badge/Strict_only-ff8c42?style=flat-square" align="middle"></a>
|
|
187
|
+
<a title="Accepts array w/ options" href="#usage">
|
|
188
|
+
<img height=18 alt="[Configurable]" src="https://img.shields.io/badge/Configurable-black?style=flat-square" align="middle"></a>
|
|
189
|
+
<a title="Uses 400+ ShellCheck rules" target="_blank" href="https://www.shellcheck.net/wiki/">
|
|
190
|
+
<img height=18 alt="[400+ rules]" src="https://img.shields.io/badge/400%2B_rules-3b5bdb?style=flat-square" align="middle"></a>
|
|
191
|
+
<a title="Copy rule URL" target="_blank"
|
|
192
|
+
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23shellcheck-commands">
|
|
193
|
+
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
194
|
+
</h3>
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
|
|
198
|
+
<summary>Runs ShellCheck against every <code>commands</code> entry.</summary>
|
|
199
|
+
|
|
200
|
+
<h4 id="shellcheck-commands-options">Options</h4>
|
|
201
|
+
|
|
202
|
+
- `ignoreCodes` (default `[]`) – SC codes to suppress project-wide (e.g. `['SC2086']`)
|
|
203
|
+
- `enableChecks` (default `[]`) – optional ShellCheck checks to enable (e.g. `['avoid-nullary-conditions']`)
|
|
204
|
+
- `shell` (default `'sh'`) – shell dialect to assume (`'ash'`, `'bash'`, `'busybox'`, `'dash'`, `'ksh'`, `'sh'`)
|
|
205
|
+
- `shellcheckPath` (default `null`) – explicit path to the `shellcheck` binary (when omitted, resolves from `PATH`)
|
|
206
|
+
|
|
207
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
208
|
+
|
|
209
|
+
```diff
|
|
210
|
+
steps:
|
|
211
|
+
build:
|
|
212
|
+
image: node:20
|
|
213
|
+
commands:
|
|
214
|
+
! - 'foo="bar baz"; echo $foo'
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
218
|
+
|
|
219
|
+
```diff
|
|
220
|
+
steps:
|
|
221
|
+
build:
|
|
222
|
+
image: node:20
|
|
223
|
+
commands:
|
|
224
|
+
- - 'foo="bar baz"; echo $foo'
|
|
225
|
+
+ - 'foo="bar baz"; echo "$foo"'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### When not to use it
|
|
229
|
+
|
|
230
|
+
If you don't have the ShellCheck binary installed, or you don't want shell linting.
|
|
231
|
+
|
|
232
|
+
#### Introduced in
|
|
233
|
+
|
|
234
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
235
|
+
|
|
236
|
+
#### See also
|
|
237
|
+
|
|
238
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=shellcheck.net&sz=64"> <a target="_blank" href="https://www.shellcheck.net/wiki/">ShellCheck — Wiki</a>
|
|
239
|
+
|
|
240
|
+
<div align="center">
|
|
241
|
+
|
|
242
|
+
[Back to index ↑][epw-rules]
|
|
243
|
+
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
</details>
|
|
249
|
+
|
|
250
|
+
<h3 id="valid-depends-on">
|
|
251
|
+
<code>valid-depends-on</code>
|
|
252
|
+
<a title="Included in recommended config" href="#usage">
|
|
253
|
+
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
254
|
+
<a title="Copy rule URL" target="_blank"
|
|
255
|
+
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23valid-depends-on">
|
|
256
|
+
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
257
|
+
</h3>
|
|
258
|
+
|
|
259
|
+
<details>
|
|
260
|
+
|
|
261
|
+
<summary>Disallows <code>depends_on</code> entries referencing unknown step names.</summary>
|
|
262
|
+
|
|
263
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
264
|
+
|
|
265
|
+
```diff
|
|
266
|
+
steps:
|
|
267
|
+
build:
|
|
268
|
+
image: node:20
|
|
269
|
+
deploy:
|
|
270
|
+
image: alpine
|
|
271
|
+
! depends_on: [test]
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
275
|
+
|
|
276
|
+
```diff
|
|
277
|
+
steps:
|
|
278
|
+
build:
|
|
279
|
+
image: node:20
|
|
280
|
+
deploy:
|
|
281
|
+
image: alpine
|
|
282
|
+
- depends_on: [test]
|
|
283
|
+
+ depends_on: [build]
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
#### When not to use it
|
|
287
|
+
|
|
288
|
+
If you generate `depends_on` at build time.
|
|
289
|
+
|
|
290
|
+
#### Introduced in
|
|
291
|
+
|
|
292
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
293
|
+
|
|
294
|
+
#### See also
|
|
295
|
+
|
|
296
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
297
|
+
|
|
298
|
+
<div align="center">
|
|
299
|
+
|
|
300
|
+
[Back to index ↑][epw-rules]
|
|
301
|
+
|
|
302
|
+
</div>
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
</details>
|
|
307
|
+
|
|
308
|
+
<h3 id="valid-schema">
|
|
309
|
+
<code>valid-schema</code>
|
|
310
|
+
<a title="Included in recommended config" href="#usage">
|
|
311
|
+
<img height=18 alt="[Recommended]" src="https://img.shields.io/badge/Recommended-f1f20a?style=flat-square" align="middle"></a>
|
|
312
|
+
<a title="Copy rule URL" target="_blank"
|
|
313
|
+
href="https://copy-to-clipboard.onrender.com/copy/https%3A%2F%2Fcodeberg.org%2Fadamlui%2Feslint-plugin-woodpecker%2F%23valid-schema">
|
|
314
|
+
<img height=16 width=21 alt="[Copy rule URL]" src="https://api.iconify.design/mdi/content-copy.svg?color=%23cccccc" align="middle"></a>
|
|
315
|
+
</h3>
|
|
316
|
+
|
|
317
|
+
<details>
|
|
318
|
+
|
|
319
|
+
<summary>Validates Woodpecker YAML files against the Woodpecker CI schema.</summary>
|
|
320
|
+
|
|
321
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
322
|
+
|
|
323
|
+
```diff
|
|
324
|
+
steps:
|
|
325
|
+
build:
|
|
326
|
+
commands: ['npm test']
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/green.svg" align="bottom"> Correct code
|
|
330
|
+
|
|
331
|
+
```diff
|
|
332
|
+
steps:
|
|
333
|
+
build:
|
|
334
|
+
+ image: node:20
|
|
335
|
+
commands: ['npm test']
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### When not to use it
|
|
339
|
+
|
|
340
|
+
If you use a modified schema.
|
|
341
|
+
|
|
342
|
+
#### Introduced in
|
|
343
|
+
|
|
344
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases/tag/v1.0.0">v1.0.0</a> (October 17, 2026)
|
|
345
|
+
|
|
346
|
+
#### See also
|
|
347
|
+
|
|
348
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/usage/workflow-syntax">Woodpecker — Workflow syntax</a>
|
|
349
|
+
- <img height=12 src="https://www.google.com/s2/favicons?domain=woodpecker-ci.org&sz=64"> <a target="_blank" href="https://woodpecker-ci.org/docs/cli">Woodpecker — CLI reference</a>
|
|
350
|
+
|
|
351
|
+
<div align="center">
|
|
352
|
+
|
|
353
|
+
[Back to index ↑][epw-rules]
|
|
354
|
+
|
|
355
|
+
</div>
|
|
356
|
+
|
|
357
|
+
</details>
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## <img width=30 align="top" src="https://api.iconify.design/boxicons/code-alt-filled.svg?color=%232b2b2a"> Shield embed
|
|
362
|
+
|
|
363
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme">
|
|
364
|
+
<img height=32 alt="[Linted by eslint-plugin-woodpecker]" src="https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
365
|
+
|
|
366
|
+
#### HTML
|
|
367
|
+
|
|
368
|
+
```html
|
|
369
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme">
|
|
370
|
+
<img height=32 alt="[Linted by eslint-plugin-woodpecker]" src="https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
#### Markdown
|
|
374
|
+
|
|
375
|
+
```md
|
|
376
|
+
[![[Linted by eslint-plugin-woodpecker]](https://img.shields.io/badge/Linted_by-eslint--plugin--woodpecker-black?logo=eslint&logoColor=white&labelColor=464646&style=for-the-badge)](https://codeberg.org/adamlui/eslint-plugin-woodpecker/#readme)
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## <img height=30 width=27 align="top" src="https://api.iconify.design/ic/baseline-account-balance.svg?color=%232b2b2a"> License
|
|
382
|
+
|
|
383
|
+
<a href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/src/branch/main/docs/LICENSE.md">
|
|
384
|
+
<img height=88 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-chrome-extensions/d79e1db7e2/assets/images/banners/mit-license/banner.png"></a>
|
|
385
|
+
<br><br>
|
|
386
|
+
|
|
387
|
+
<details>
|
|
388
|
+
|
|
389
|
+
<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>
|
|
390
|
+
|
|
391
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
392
|
+
|
|
393
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
394
|
+
|
|
395
|
+
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
|
|
396
|
+
|
|
397
|
+
</details>
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## <img height=30 width=29 align="top" src="https://api.iconify.design/bxs/package.svg?color=%232b2b2a"> Related
|
|
402
|
+
|
|
403
|
+
<!-- eslint-plugin-chrome-extensions -->
|
|
404
|
+
|
|
405
|
+
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-chrome-extensions</a>
|
|
406
|
+
|
|
407
|
+
<details>
|
|
408
|
+
|
|
409
|
+
<summary>ESLint rules for Chrome extensions.</summary><br>
|
|
410
|
+
|
|
411
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-chrome-extensions/04d2f53b22/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
412
|
+
|
|
413
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#supported-rules">Supported rules</a>
|
|
414
|
+
|
|
415
|
+
</details>
|
|
416
|
+
|
|
417
|
+
<!-- eslint-plugin-constructors -->
|
|
418
|
+
|
|
419
|
+
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-constructors</a>
|
|
420
|
+
|
|
421
|
+
<details>
|
|
422
|
+
|
|
423
|
+
<summary>ESLint rules for JavaScript constructor usage.</summary><br>
|
|
424
|
+
|
|
425
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-constructors/6eeba7b2cb/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
426
|
+
|
|
427
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-constructors/#supported-rules">Supported rules</a>
|
|
428
|
+
|
|
429
|
+
</details>
|
|
430
|
+
|
|
431
|
+
<!-- eslint-plugin-greasemonkey -->
|
|
432
|
+
|
|
433
|
+
### <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme"><img height=15 width=auto src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/e9128375d4/assets/images/icons/eslint/purple/icon16.png"> eslint-plugin-greasemonkey</a>
|
|
434
|
+
|
|
435
|
+
<details>
|
|
436
|
+
|
|
437
|
+
<summary>ESLint rules for Greasemonkey userscripts.</summary><br>
|
|
438
|
+
|
|
439
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme"><img width=555 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/c9ac2985bb/assets/images/screenshots/vs-code/squiggles.png"></a>
|
|
440
|
+
|
|
441
|
+
> <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#installation"><b>Install</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#readme">Readme</a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/#supported-rules">Supported rules</a>
|
|
442
|
+
|
|
443
|
+
</details>
|
|
444
|
+
|
|
445
|
+
<!-- Footer -->
|
|
446
|
+
|
|
447
|
+
<img height=10 width="100%" src="https://cdn.staticdelivr.com/gl/adamlui/ai-web-extensions/d11d2ee/assets/images/separators/gradient-aqua.png">
|
|
448
|
+
|
|
449
|
+
<div align="center">
|
|
450
|
+
|
|
451
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.staticdelivr.com/gl/adamlui/js-utils/6b0d399/assets/images/icons/tag/white/icon16.svg"><img height=14 src="https://cdn.staticdelivr.com/gl/adamlui/js-utils/6b0d399/assets/images/icons/tag/dark-gray/icon16.svg"></picture>
|
|
452
|
+
<a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/releases"><b>Latest releases</b></a> / <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-woodpecker/issues/new">Report a bug</a> / <a target="_blank" href="https://www.npmjs.com/~adamlui">More packages by author</a> / [Back to top ↑](#top)
|
|
453
|
+
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
<!-- Links -->
|
|
457
|
+
|
|
458
|
+
[epw-rules]: #supported-rules
|