eslint-plugin-woodpecker 1.1.8 → 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 +25 -13
- package/package.json +15 -5
- package/src/utils/woodpecker.js +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
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-
|
|
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 (
|
|
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
|
|
|
@@ -35,7 +36,7 @@ npm i -D eslint-plugin-woodpecker
|
|
|
35
36
|
Usage
|
|
36
37
|
</h2>
|
|
37
38
|
|
|
38
|
-
Add a bundled config to your `eslint.config
|
|
39
|
+
Add a bundled config to your `eslint.config.*`:
|
|
39
40
|
|
|
40
41
|
```js
|
|
41
42
|
...
|
|
@@ -75,14 +76,14 @@ export default [
|
|
|
75
76
|
Disabling rules
|
|
76
77
|
</h2>
|
|
77
78
|
|
|
78
|
-
Aside from editing `eslint.config
|
|
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>:
|
|
79
80
|
|
|
80
81
|
```yaml
|
|
81
82
|
# eslint-disable woodpecker/require-event-filter
|
|
82
83
|
|
|
83
84
|
steps:
|
|
84
85
|
- name: lint
|
|
85
|
-
image: node:26.13.0-alpine
|
|
86
|
+
image: node:26.13.0-alpine
|
|
86
87
|
commands: # eslint-disable-next-line woodpecker/shellcheck-commands -- `APK_DEPS` unquoted to force multi args
|
|
87
88
|
- apk add --no-cache $${APK_DEPS}
|
|
88
89
|
- pip install --no-cache-dir --break-system-packages -r requirements-dev.txt
|
|
@@ -118,7 +119,7 @@ steps:
|
|
|
118
119
|
<thead>
|
|
119
120
|
<tr>
|
|
120
121
|
<th align="center">Editor</th>
|
|
121
|
-
<th align="center">
|
|
122
|
+
<th align="center">Extension</th>
|
|
122
123
|
</tr>
|
|
123
124
|
</thead>
|
|
124
125
|
<tbody>
|
|
@@ -150,10 +151,13 @@ steps:
|
|
|
150
151
|
</details>
|
|
151
152
|
|
|
152
153
|
<h3 id="ci">
|
|
153
|
-
<img width=16 align=bottom title="Forgejo Actions" src="https://www.google.com/s2/favicons?domain=forgejo.org&sz=32">
|
|
154
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">
|
|
155
158
|
<img width=16 align=bottom title="GitLab CI" src="https://www.google.com/s2/favicons?domain=gitlab.com&sz=32">
|
|
156
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">
|
|
157
161
|
<img width=16 align=bottom title="TeamCity" src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=32">
|
|
158
162
|
<img width=16 align=bottom title="GitHub Actions" src="https://www.google.com/s2/favicons?domain=github.com&sz=32">
|
|
159
163
|
</h3>
|
|
@@ -166,26 +170,34 @@ steps:
|
|
|
166
170
|
<thead>
|
|
167
171
|
<tr>
|
|
168
172
|
<th align="center">CI</th>
|
|
169
|
-
<th align="center">
|
|
173
|
+
<th align="center">Plugin</th>
|
|
170
174
|
</tr>
|
|
171
175
|
</thead>
|
|
172
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>
|
|
173
181
|
<tr>
|
|
174
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>
|
|
175
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>
|
|
176
184
|
</tr>
|
|
177
185
|
<tr>
|
|
178
|
-
<td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=
|
|
179
|
-
<td align="center"><img width=13 align=bottom src="https://www.google.com/s2/favicons?domain=
|
|
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>
|
|
180
188
|
</tr>
|
|
181
189
|
<tr>
|
|
182
190
|
<td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=gitlab.com&sz=16"> GitLab CI</td>
|
|
183
|
-
<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>codequality-os-scanners-integration</code></a></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>
|
|
184
192
|
</tr>
|
|
185
193
|
<tr>
|
|
186
194
|
<td align="center"><img width=15 align=bottom src="https://www.google.com/s2/favicons?domain=circleci.com&sz=32"> CircleCI</td>
|
|
187
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>
|
|
188
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>
|
|
189
201
|
<tr>
|
|
190
202
|
<td align="center"><img width=13 src="https://www.google.com/s2/favicons?domain=jetbrains.com&sz=16"> TeamCity</td>
|
|
191
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>
|
|
@@ -197,7 +209,7 @@ steps:
|
|
|
197
209
|
</tbody>
|
|
198
210
|
</table>
|
|
199
211
|
|
|
200
|
-
<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
|
|
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>
|
|
201
213
|
|
|
202
214
|
</details>
|
|
203
215
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-woodpecker",
|
|
3
|
-
"version": "1.1.
|
|
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",
|
|
@@ -74,15 +74,25 @@
|
|
|
74
74
|
"yaml": "^2.9.1"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
+
"@e18e/eslint-plugin": "^0.8.1",
|
|
77
78
|
"@eslint/json": "^2.1.1",
|
|
78
79
|
"@eslint/markdown": "^9.0.0",
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
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",
|
|
81
84
|
"eslint": "^10.15.0",
|
|
85
|
+
"eslint-plugin-constructors": "^1.7.7",
|
|
86
|
+
"eslint-plugin-eslint-plugin": "^7.6.2",
|
|
82
87
|
"eslint-plugin-import-x": "^4.18.1",
|
|
88
|
+
"eslint-plugin-n": "^18.6.0",
|
|
83
89
|
"eslint-plugin-no-secrets": "^2.3.3",
|
|
90
|
+
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
84
91
|
"eslint-plugin-package-json": "^1.14.0",
|
|
85
|
-
"
|
|
92
|
+
"eslint-plugin-regexp": "^3.3.3",
|
|
93
|
+
"eslint-plugin-security": "^4.2.1",
|
|
94
|
+
"eslint-plugin-sonarjs": "^4.2.3",
|
|
95
|
+
"oxlint": "^1.95.0",
|
|
86
96
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
87
97
|
"typescript-latest": "npm:typescript@^7.0.2"
|
|
88
98
|
},
|
package/src/utils/woodpecker.js
CHANGED
|
@@ -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
|