@n8n/eslint-plugin-community-nodes 0.15.0 → 0.17.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/.turbo/turbo-build.log +1 -1
- package/README.md +5 -0
- package/dist/plugin.d.ts +36 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +12 -0
- package/dist/plugin.js.map +1 -1
- package/dist/rules/cred-class-name-suffix.d.ts +2 -0
- package/dist/rules/cred-class-name-suffix.d.ts.map +1 -0
- package/dist/rules/cred-class-name-suffix.js +53 -0
- package/dist/rules/cred-class-name-suffix.js.map +1 -0
- package/dist/rules/cred-class-oauth2-naming.d.ts +2 -0
- package/dist/rules/cred-class-oauth2-naming.d.ts.map +1 -0
- package/dist/rules/cred-class-oauth2-naming.js +96 -0
- package/dist/rules/cred-class-oauth2-naming.js.map +1 -0
- package/dist/rules/index.d.ts +8 -0
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +12 -0
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/n8n-object-validation.d.ts +5 -0
- package/dist/rules/n8n-object-validation.d.ts.map +1 -0
- package/dist/rules/n8n-object-validation.js +148 -0
- package/dist/rules/n8n-object-validation.js.map +1 -0
- package/dist/rules/no-builder-hint-leakage.d.ts +7 -0
- package/dist/rules/no-builder-hint-leakage.d.ts.map +1 -0
- package/dist/rules/no-builder-hint-leakage.js +99 -0
- package/dist/rules/no-builder-hint-leakage.js.map +1 -0
- package/dist/rules/no-overrides-field.js +1 -1
- package/dist/rules/no-overrides-field.js.map +1 -1
- package/dist/rules/no-template-placeholders.d.ts +2 -0
- package/dist/rules/no-template-placeholders.d.ts.map +1 -0
- package/dist/rules/no-template-placeholders.js +57 -0
- package/dist/rules/no-template-placeholders.js.map +1 -0
- package/dist/rules/node-operation-error-itemindex.d.ts +12 -0
- package/dist/rules/node-operation-error-itemindex.d.ts.map +1 -0
- package/dist/rules/node-operation-error-itemindex.js +184 -0
- package/dist/rules/node-operation-error-itemindex.js.map +1 -0
- package/dist/utils/ast-utils.d.ts.map +1 -1
- package/dist/utils/ast-utils.js +5 -1
- package/dist/utils/ast-utils.js.map +1 -1
- package/docs/rules/cred-class-name-suffix.md +46 -0
- package/docs/rules/cred-class-oauth2-naming.md +68 -0
- package/docs/rules/n8n-object-validation.md +93 -0
- package/docs/rules/no-overrides-field.md +5 -5
- package/docs/rules/no-template-placeholders.md +51 -0
- package/docs/rules/node-operation-error-itemindex.md +81 -0
- package/package.json +4 -4
- package/src/plugin.ts +12 -0
- package/src/rules/cred-class-name-suffix.test.ts +74 -0
- package/src/rules/cred-class-name-suffix.ts +57 -0
- package/src/rules/cred-class-oauth2-naming.test.ts +197 -0
- package/src/rules/cred-class-oauth2-naming.ts +118 -0
- package/src/rules/index.ts +12 -0
- package/src/rules/n8n-object-validation.test.ts +202 -0
- package/src/rules/n8n-object-validation.ts +200 -0
- package/src/rules/no-builder-hint-leakage.test.ts +84 -0
- package/src/rules/no-builder-hint-leakage.ts +112 -0
- package/src/rules/no-overrides-field.ts +1 -1
- package/src/rules/no-template-placeholders.test.ts +135 -0
- package/src/rules/no-template-placeholders.ts +68 -0
- package/src/rules/node-operation-error-itemindex.test.ts +280 -0
- package/src/rules/node-operation-error-itemindex.ts +223 -0
- package/src/utils/ast-utils.ts +5 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @n8n/eslint-plugin-community-nodes@0.
|
|
2
|
+
> @n8n/eslint-plugin-community-nodes@0.17.0 build /home/runner/work/n8n/n8n/packages/@n8n/eslint-plugin-community-nodes
|
|
3
3
|
> tsc --project tsconfig.build.json
|
|
4
4
|
|
package/README.md
CHANGED
|
@@ -48,11 +48,14 @@ export default [
|
|
|
48
48
|
| :--------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | :--- | :--- | :- | :- | :- |
|
|
49
49
|
| [ai-node-package-json](docs/rules/ai-node-package-json.md) | Enforce consistency between n8n.aiNodeSdkVersion and ai-node-sdk peer dependency in community node packages | ✅ ☑️ | | | | |
|
|
50
50
|
| [cred-class-field-icon-missing](docs/rules/cred-class-field-icon-missing.md) | Credential class must have an `icon` property defined | ✅ ☑️ | | | 💡 | |
|
|
51
|
+
| [cred-class-name-suffix](docs/rules/cred-class-name-suffix.md) | Credential class names must be suffixed with `Api` | ✅ ☑️ | | 🔧 | | |
|
|
52
|
+
| [cred-class-oauth2-naming](docs/rules/cred-class-oauth2-naming.md) | OAuth2 credentials must include `OAuth2` in the class name, `name`, and `displayName` | ✅ ☑️ | | 🔧 | | |
|
|
51
53
|
| [credential-documentation-url](docs/rules/credential-documentation-url.md) | Enforce valid credential documentationUrl format (URL or lowercase alphanumeric slug) | ✅ ☑️ | | 🔧 | | |
|
|
52
54
|
| [credential-password-field](docs/rules/credential-password-field.md) | Ensure credential fields with sensitive names have typeOptions.password = true | ✅ ☑️ | | 🔧 | | |
|
|
53
55
|
| [credential-test-required](docs/rules/credential-test-required.md) | Ensure credentials have a credential test | ✅ ☑️ | | | 💡 | |
|
|
54
56
|
| [icon-validation](docs/rules/icon-validation.md) | Validate node and credential icon files exist, are SVG format, and light/dark icons are different | ✅ ☑️ | | | 💡 | |
|
|
55
57
|
| [missing-paired-item](docs/rules/missing-paired-item.md) | Require pairedItem on INodeExecutionData objects in execute() methods to preserve item linking. | ✅ ☑️ | | | | |
|
|
58
|
+
| [n8n-object-validation](docs/rules/n8n-object-validation.md) | Validate the structure of the "n8n" object in community node package.json (required keys, types, and dist/ paths) | ✅ ☑️ | | | | |
|
|
56
59
|
| [no-credential-reuse](docs/rules/no-credential-reuse.md) | Prevent credential re-use security issues by ensuring nodes only reference credentials from the same package | ✅ ☑️ | | | 💡 | |
|
|
57
60
|
| [no-deprecated-workflow-functions](docs/rules/no-deprecated-workflow-functions.md) | Disallow usage of deprecated functions and types from n8n-workflow package | ✅ ☑️ | | | 💡 | |
|
|
58
61
|
| [no-forbidden-lifecycle-scripts](docs/rules/no-forbidden-lifecycle-scripts.md) | Ban lifecycle scripts (prepare, preinstall, postinstall, etc.) in community node packages | ✅ ☑️ | | | | |
|
|
@@ -61,8 +64,10 @@ export default [
|
|
|
61
64
|
| [no-restricted-globals](docs/rules/no-restricted-globals.md) | Disallow usage of restricted global variables in community nodes. | ✅ | | | | |
|
|
62
65
|
| [no-restricted-imports](docs/rules/no-restricted-imports.md) | Disallow usage of restricted imports in community nodes. | ✅ | | | | |
|
|
63
66
|
| [no-runtime-dependencies](docs/rules/no-runtime-dependencies.md) | Disallow non-empty "dependencies" in community node package.json | ✅ ☑️ | | | | |
|
|
67
|
+
| [no-template-placeholders](docs/rules/no-template-placeholders.md) | Disallow unresolved template placeholders in package.json | ✅ ☑️ | | | | |
|
|
64
68
|
| [node-class-description-icon-missing](docs/rules/node-class-description-icon-missing.md) | Node class description must have an `icon` property defined. Deprecated: use `require-node-description-fields` instead. | | | | 💡 | ❌ |
|
|
65
69
|
| [node-connection-type-literal](docs/rules/node-connection-type-literal.md) | Disallow string literals in node description `inputs`/`outputs` — use `NodeConnectionTypes` enum instead | ✅ ☑️ | | 🔧 | | |
|
|
70
|
+
| [node-operation-error-itemindex](docs/rules/node-operation-error-itemindex.md) | Require { itemIndex } in NodeOperationError / NodeApiError options inside item loops | ✅ ☑️ | | | | |
|
|
66
71
|
| [node-usable-as-tool](docs/rules/node-usable-as-tool.md) | Ensure node classes have usableAsTool property | ✅ ☑️ | | 🔧 | | |
|
|
67
72
|
| [options-sorted-alphabetically](docs/rules/options-sorted-alphabetically.md) | Enforce alphabetical ordering of options arrays in n8n node properties | | ✅ ☑️ | | | |
|
|
68
73
|
| [package-name-convention](docs/rules/package-name-convention.md) | Enforce correct package naming convention for n8n community nodes | ✅ ☑️ | | | 💡 | |
|
package/dist/plugin.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const configs: {
|
|
|
18
18
|
'@n8n/community-nodes/no-restricted-globals': "error";
|
|
19
19
|
'@n8n/community-nodes/no-restricted-imports': "error";
|
|
20
20
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
21
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
21
22
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
22
23
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
23
24
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -27,13 +28,18 @@ declare const configs: {
|
|
|
27
28
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
28
29
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
29
30
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
31
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
30
32
|
'@n8n/community-nodes/icon-validation': "error";
|
|
31
33
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
32
34
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
33
35
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
34
36
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
37
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
38
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
35
39
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
36
40
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
41
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
42
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
37
43
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
38
44
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
39
45
|
'@n8n/community-nodes/require-node-api-error': "error";
|
|
@@ -58,6 +64,7 @@ declare const configs: {
|
|
|
58
64
|
rules: {
|
|
59
65
|
'@n8n/community-nodes/ai-node-package-json': "error";
|
|
60
66
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
67
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
61
68
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
62
69
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
63
70
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -67,13 +74,18 @@ declare const configs: {
|
|
|
67
74
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
68
75
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
69
76
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
77
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
70
78
|
'@n8n/community-nodes/icon-validation': "error";
|
|
71
79
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
72
80
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
73
81
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
74
82
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
83
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
84
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
75
85
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
76
86
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
87
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
88
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
77
89
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
78
90
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
79
91
|
'@n8n/community-nodes/require-node-api-error': "error";
|
|
@@ -103,6 +115,7 @@ declare const pluginWithConfigs: {
|
|
|
103
115
|
'@n8n/community-nodes/no-restricted-globals': "error";
|
|
104
116
|
'@n8n/community-nodes/no-restricted-imports': "error";
|
|
105
117
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
118
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
106
119
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
107
120
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
108
121
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -112,13 +125,18 @@ declare const pluginWithConfigs: {
|
|
|
112
125
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
113
126
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
114
127
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
128
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
115
129
|
'@n8n/community-nodes/icon-validation': "error";
|
|
116
130
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
117
131
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
118
132
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
119
133
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
134
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
135
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
120
136
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
121
137
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
138
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
139
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
122
140
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
123
141
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
124
142
|
'@n8n/community-nodes/require-node-api-error': "error";
|
|
@@ -143,6 +161,7 @@ declare const pluginWithConfigs: {
|
|
|
143
161
|
rules: {
|
|
144
162
|
'@n8n/community-nodes/ai-node-package-json': "error";
|
|
145
163
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
164
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
146
165
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
147
166
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
148
167
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -152,13 +171,18 @@ declare const pluginWithConfigs: {
|
|
|
152
171
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
153
172
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
154
173
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
174
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
155
175
|
'@n8n/community-nodes/icon-validation': "error";
|
|
156
176
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
157
177
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
158
178
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
159
179
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
180
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
181
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
160
182
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
161
183
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
184
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
185
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
162
186
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
163
187
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
164
188
|
'@n8n/community-nodes/require-node-api-error': "error";
|
|
@@ -195,6 +219,7 @@ declare const n8nCommunityNodesPlugin: {
|
|
|
195
219
|
'@n8n/community-nodes/no-restricted-globals': "error";
|
|
196
220
|
'@n8n/community-nodes/no-restricted-imports': "error";
|
|
197
221
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
222
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
198
223
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
199
224
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
200
225
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -204,13 +229,18 @@ declare const n8nCommunityNodesPlugin: {
|
|
|
204
229
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
205
230
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
206
231
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
232
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
207
233
|
'@n8n/community-nodes/icon-validation': "error";
|
|
208
234
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
209
235
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
210
236
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
211
237
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
238
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
239
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
212
240
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
213
241
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
242
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
243
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
214
244
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
215
245
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
216
246
|
'@n8n/community-nodes/require-node-api-error': "error";
|
|
@@ -235,6 +265,7 @@ declare const n8nCommunityNodesPlugin: {
|
|
|
235
265
|
rules: {
|
|
236
266
|
'@n8n/community-nodes/ai-node-package-json': "error";
|
|
237
267
|
'@n8n/community-nodes/credential-password-field': "error";
|
|
268
|
+
'@n8n/community-nodes/n8n-object-validation': "error";
|
|
238
269
|
'@n8n/community-nodes/no-deprecated-workflow-functions': "error";
|
|
239
270
|
'@n8n/community-nodes/node-usable-as-tool': "error";
|
|
240
271
|
'@n8n/community-nodes/package-name-convention': "error";
|
|
@@ -244,13 +275,18 @@ declare const n8nCommunityNodesPlugin: {
|
|
|
244
275
|
'@n8n/community-nodes/no-http-request-with-manual-auth': "error";
|
|
245
276
|
'@n8n/community-nodes/no-overrides-field': "error";
|
|
246
277
|
'@n8n/community-nodes/no-runtime-dependencies': "error";
|
|
278
|
+
'@n8n/community-nodes/no-template-placeholders': "error";
|
|
247
279
|
'@n8n/community-nodes/icon-validation': "error";
|
|
248
280
|
'@n8n/community-nodes/options-sorted-alphabetically': "warn";
|
|
249
281
|
'@n8n/community-nodes/credential-documentation-url': "error";
|
|
250
282
|
'@n8n/community-nodes/resource-operation-pattern': "warn";
|
|
251
283
|
'@n8n/community-nodes/cred-class-field-icon-missing': "error";
|
|
284
|
+
'@n8n/community-nodes/cred-class-name-suffix': "error";
|
|
285
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': "error";
|
|
252
286
|
'@n8n/community-nodes/node-connection-type-literal': "error";
|
|
253
287
|
'@n8n/community-nodes/missing-paired-item': "error";
|
|
288
|
+
'@n8n/community-nodes/no-builder-hint-leakage': "error";
|
|
289
|
+
'@n8n/community-nodes/node-operation-error-itemindex': "error";
|
|
254
290
|
'@n8n/community-nodes/require-community-node-keyword': "warn";
|
|
255
291
|
'@n8n/community-nodes/require-continue-on-fail': "error";
|
|
256
292
|
'@n8n/community-nodes/require-node-api-error': "error";
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAYzC,QAAA,MAAM,OAAO;;;;;;;;;;uBAHI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAYzC,QAAA,MAAM,OAAO;;;;;;;;;;uBAHI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFE,CAAC;AAE1C,QAAA,MAAM,iBAAiB;;;;;;;;;;;2BAtFN,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CAsFiC,CAAC;AAEzE,QAAA,MAAM,uBAAuB;;;;;;;;;;;2BAxFZ,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CAwFU,CAAC;AAClD,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -20,6 +20,7 @@ const configs = {
|
|
|
20
20
|
'@n8n/community-nodes/no-restricted-globals': 'error',
|
|
21
21
|
'@n8n/community-nodes/no-restricted-imports': 'error',
|
|
22
22
|
'@n8n/community-nodes/credential-password-field': 'error',
|
|
23
|
+
'@n8n/community-nodes/n8n-object-validation': 'error',
|
|
23
24
|
'@n8n/community-nodes/no-deprecated-workflow-functions': 'error',
|
|
24
25
|
'@n8n/community-nodes/node-usable-as-tool': 'error',
|
|
25
26
|
'@n8n/community-nodes/package-name-convention': 'error',
|
|
@@ -29,13 +30,18 @@ const configs = {
|
|
|
29
30
|
'@n8n/community-nodes/no-http-request-with-manual-auth': 'error',
|
|
30
31
|
'@n8n/community-nodes/no-overrides-field': 'error',
|
|
31
32
|
'@n8n/community-nodes/no-runtime-dependencies': 'error',
|
|
33
|
+
'@n8n/community-nodes/no-template-placeholders': 'error',
|
|
32
34
|
'@n8n/community-nodes/icon-validation': 'error',
|
|
33
35
|
'@n8n/community-nodes/options-sorted-alphabetically': 'warn',
|
|
34
36
|
'@n8n/community-nodes/resource-operation-pattern': 'warn',
|
|
35
37
|
'@n8n/community-nodes/credential-documentation-url': 'error',
|
|
36
38
|
'@n8n/community-nodes/cred-class-field-icon-missing': 'error',
|
|
39
|
+
'@n8n/community-nodes/cred-class-name-suffix': 'error',
|
|
40
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': 'error',
|
|
37
41
|
'@n8n/community-nodes/node-connection-type-literal': 'error',
|
|
38
42
|
'@n8n/community-nodes/missing-paired-item': 'error',
|
|
43
|
+
'@n8n/community-nodes/no-builder-hint-leakage': 'error',
|
|
44
|
+
'@n8n/community-nodes/node-operation-error-itemindex': 'error',
|
|
39
45
|
'@n8n/community-nodes/require-community-node-keyword': 'warn',
|
|
40
46
|
'@n8n/community-nodes/require-continue-on-fail': 'error',
|
|
41
47
|
'@n8n/community-nodes/require-node-api-error': 'error',
|
|
@@ -53,6 +59,7 @@ const configs = {
|
|
|
53
59
|
rules: {
|
|
54
60
|
'@n8n/community-nodes/ai-node-package-json': 'error',
|
|
55
61
|
'@n8n/community-nodes/credential-password-field': 'error',
|
|
62
|
+
'@n8n/community-nodes/n8n-object-validation': 'error',
|
|
56
63
|
'@n8n/community-nodes/no-deprecated-workflow-functions': 'error',
|
|
57
64
|
'@n8n/community-nodes/node-usable-as-tool': 'error',
|
|
58
65
|
'@n8n/community-nodes/package-name-convention': 'error',
|
|
@@ -62,13 +69,18 @@ const configs = {
|
|
|
62
69
|
'@n8n/community-nodes/no-http-request-with-manual-auth': 'error',
|
|
63
70
|
'@n8n/community-nodes/no-overrides-field': 'error',
|
|
64
71
|
'@n8n/community-nodes/no-runtime-dependencies': 'error',
|
|
72
|
+
'@n8n/community-nodes/no-template-placeholders': 'error',
|
|
65
73
|
'@n8n/community-nodes/icon-validation': 'error',
|
|
66
74
|
'@n8n/community-nodes/options-sorted-alphabetically': 'warn',
|
|
67
75
|
'@n8n/community-nodes/credential-documentation-url': 'error',
|
|
68
76
|
'@n8n/community-nodes/resource-operation-pattern': 'warn',
|
|
69
77
|
'@n8n/community-nodes/cred-class-field-icon-missing': 'error',
|
|
78
|
+
'@n8n/community-nodes/cred-class-name-suffix': 'error',
|
|
79
|
+
'@n8n/community-nodes/cred-class-oauth2-naming': 'error',
|
|
70
80
|
'@n8n/community-nodes/node-connection-type-literal': 'error',
|
|
71
81
|
'@n8n/community-nodes/missing-paired-item': 'error',
|
|
82
|
+
'@n8n/community-nodes/no-builder-hint-leakage': 'error',
|
|
83
|
+
'@n8n/community-nodes/node-operation-error-itemindex': 'error',
|
|
72
84
|
'@n8n/community-nodes/require-community-node-keyword': 'warn',
|
|
73
85
|
'@n8n/community-nodes/require-continue-on-fail': 'error',
|
|
74
86
|
'@n8n/community-nodes/require-node-api-error': 'error',
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,MAAM,MAAM,GAAG;IACd,IAAI,EAAE;QACL,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,SAAS,EAAE,sBAAsB;KACjC;IACD,8EAA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OAAO;YACxD,0CAA0C,EAAE,OAAO;YACnD,qDAAqD,EAAE,OAAO;YAC9D,uDAAuD,EAAE,OAAO;YAChE,yCAAyC,EAAE,OAAO;YAClD,8CAA8C,EAAE,OAAO;YACvD,+CAA+C,EAAE,OAAO;YACxD,sCAAsC,EAAE,OAAO;YAC/C,oDAAoD,EAAE,MAAM;YAC5D,mDAAmD,EAAE,OAAO;YAC5D,iDAAiD,EAAE,MAAM;YACzD,oDAAoD,EAAE,OAAO;YAC7D,6CAA6C,EAAE,OAAO;YACtD,+CAA+C,EAAE,OAAO;YACxD,mDAAmD,EAAE,OAAO;YAC5D,0CAA0C,EAAE,OAAO;YACnD,8CAA8C,EAAE,OAAO;YACvD,qDAAqD,EAAE,OAAO;YAC9D,qDAAqD,EAAE,MAAM;YAC7D,+CAA+C,EAAE,OAAO;YACxD,6CAA6C,EAAE,OAAO;YACtD,sDAAsD,EAAE,OAAO;YAC/D,kDAAkD,EAAE,OAAO;YAC3D,8CAA8C,EAAE,OAAO;YACvD,iDAAiD,EAAE,OAAO;SAC1D;KACD;CACuC,CAAC;AAE1C,MAAM,iBAAiB,GAAG,EAAE,GAAG,MAAM,EAAE,OAAO,EAA0B,CAAC;AAEzE,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAClD,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cred-class-name-suffix.d.ts","sourceRoot":"","sources":["../../src/rules/cred-class-name-suffix.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,uBAAuB,kJAgDlC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { isCredentialTypeClass, isFileType, createRule } from '../utils/index.js';
|
|
2
|
+
function addApiSuffix(name) {
|
|
3
|
+
if (name.endsWith('Ap'))
|
|
4
|
+
return `${name}i`;
|
|
5
|
+
if (name.endsWith('A'))
|
|
6
|
+
return `${name}pi`;
|
|
7
|
+
return `${name}Api`;
|
|
8
|
+
}
|
|
9
|
+
export const CredClassNameSuffixRule = createRule({
|
|
10
|
+
name: 'cred-class-name-suffix',
|
|
11
|
+
meta: {
|
|
12
|
+
type: 'problem',
|
|
13
|
+
docs: {
|
|
14
|
+
description: 'Credential class names must be suffixed with `Api`',
|
|
15
|
+
},
|
|
16
|
+
messages: {
|
|
17
|
+
missingSuffix: "Credential class name '{{name}}' must end with 'Api'",
|
|
18
|
+
},
|
|
19
|
+
fixable: 'code',
|
|
20
|
+
schema: [],
|
|
21
|
+
},
|
|
22
|
+
defaultOptions: [],
|
|
23
|
+
create(context) {
|
|
24
|
+
if (!isFileType(context.filename, '.credentials.ts')) {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
ClassDeclaration(node) {
|
|
29
|
+
if (!isCredentialTypeClass(node)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const classNameNode = node.id;
|
|
33
|
+
if (!classNameNode) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const className = classNameNode.name;
|
|
37
|
+
if (className.endsWith('Api')) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const fixedName = addApiSuffix(className);
|
|
41
|
+
context.report({
|
|
42
|
+
node: classNameNode,
|
|
43
|
+
messageId: 'missingSuffix',
|
|
44
|
+
data: { name: className },
|
|
45
|
+
fix(fixer) {
|
|
46
|
+
return fixer.replaceText(classNameNode, fixedName);
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=cred-class-name-suffix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cred-class-name-suffix.js","sourceRoot":"","sources":["../../src/rules/cred-class-name-suffix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAA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eAAe;oBAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACzB,GAAG,CAAC,KAAK;wBACR,OAAO,KAAK,CAAC,WAAW,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;oBACpD,CAAC;iBACD,CAAC,CAAC;YACJ,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CredClassOAuth2NamingRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"classNameMissingOAuth2" | "nameMissingOAuth2" | "displayNameMissingOAuth2", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
2
|
+
//# sourceMappingURL=cred-class-oauth2-naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cred-class-oauth2-naming.d.ts","sourceRoot":"","sources":["../../src/rules/cred-class-oauth2-naming.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,yBAAyB,8MAmFpC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
+
import { createRule, findClassProperty, getStringLiteralValue, isCredentialTypeClass, isFileType, } from '../utils/index.js';
|
|
3
|
+
const OAUTH2_PATTERN = /oauth2/i;
|
|
4
|
+
function containsOAuth2(value) {
|
|
5
|
+
return OAUTH2_PATTERN.test(value);
|
|
6
|
+
}
|
|
7
|
+
function getExtendsArrayValues(node) {
|
|
8
|
+
if (node.value?.type !== AST_NODE_TYPES.ArrayExpression)
|
|
9
|
+
return [];
|
|
10
|
+
const values = [];
|
|
11
|
+
for (const element of node.value.elements) {
|
|
12
|
+
const value = element ? getStringLiteralValue(element) : null;
|
|
13
|
+
if (value !== null)
|
|
14
|
+
values.push(value);
|
|
15
|
+
}
|
|
16
|
+
return values;
|
|
17
|
+
}
|
|
18
|
+
function suggestOAuth2ApiName(className) {
|
|
19
|
+
if (className.endsWith('Api')) {
|
|
20
|
+
return `${className.slice(0, -'Api'.length)}OAuth2Api`;
|
|
21
|
+
}
|
|
22
|
+
return `${className}OAuth2Api`;
|
|
23
|
+
}
|
|
24
|
+
export const CredClassOAuth2NamingRule = createRule({
|
|
25
|
+
name: 'cred-class-oauth2-naming',
|
|
26
|
+
meta: {
|
|
27
|
+
type: 'problem',
|
|
28
|
+
docs: {
|
|
29
|
+
description: 'OAuth2 credentials must include `OAuth2` in the class name, `name`, and `displayName`',
|
|
30
|
+
},
|
|
31
|
+
messages: {
|
|
32
|
+
classNameMissingOAuth2: "OAuth2 credential class name '{{name}}' must end with 'OAuth2Api'",
|
|
33
|
+
nameMissingOAuth2: "OAuth2 credential `name` field '{{value}}' must contain 'OAuth2'",
|
|
34
|
+
displayNameMissingOAuth2: "OAuth2 credential `displayName` field '{{value}}' must contain 'OAuth2'",
|
|
35
|
+
},
|
|
36
|
+
schema: [],
|
|
37
|
+
fixable: 'code',
|
|
38
|
+
},
|
|
39
|
+
defaultOptions: [],
|
|
40
|
+
create(context) {
|
|
41
|
+
if (!isFileType(context.filename, '.credentials.ts')) {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
ClassDeclaration(node) {
|
|
46
|
+
if (!isCredentialTypeClass(node))
|
|
47
|
+
return;
|
|
48
|
+
if (!node.id)
|
|
49
|
+
return;
|
|
50
|
+
const className = node.id.name;
|
|
51
|
+
const superClassName = node.superClass?.type === AST_NODE_TYPES.Identifier ? node.superClass.name : null;
|
|
52
|
+
const nameProperty = findClassProperty(node, 'name');
|
|
53
|
+
const nameValue = nameProperty?.value ? getStringLiteralValue(nameProperty.value) : null;
|
|
54
|
+
const displayNameProperty = findClassProperty(node, 'displayName');
|
|
55
|
+
const displayNameValue = displayNameProperty?.value
|
|
56
|
+
? getStringLiteralValue(displayNameProperty.value)
|
|
57
|
+
: null;
|
|
58
|
+
const extendsProperty = findClassProperty(node, 'extends');
|
|
59
|
+
const extendsValues = extendsProperty ? getExtendsArrayValues(extendsProperty) : [];
|
|
60
|
+
const isOAuth2Credential = containsOAuth2(className) ||
|
|
61
|
+
(superClassName !== null && containsOAuth2(superClassName)) ||
|
|
62
|
+
extendsValues.some(containsOAuth2) ||
|
|
63
|
+
(nameValue !== null && containsOAuth2(nameValue)) ||
|
|
64
|
+
(displayNameValue !== null && containsOAuth2(displayNameValue));
|
|
65
|
+
if (!isOAuth2Credential)
|
|
66
|
+
return;
|
|
67
|
+
if (!className.endsWith('OAuth2Api')) {
|
|
68
|
+
const fixedClassName = suggestOAuth2ApiName(className);
|
|
69
|
+
context.report({
|
|
70
|
+
node: node.id,
|
|
71
|
+
messageId: 'classNameMissingOAuth2',
|
|
72
|
+
data: { name: className },
|
|
73
|
+
fix(fixer) {
|
|
74
|
+
return fixer.replaceText(node.id, fixedClassName);
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (nameValue !== null && !containsOAuth2(nameValue)) {
|
|
79
|
+
context.report({
|
|
80
|
+
node: nameProperty.value,
|
|
81
|
+
messageId: 'nameMissingOAuth2',
|
|
82
|
+
data: { value: nameValue },
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (displayNameValue !== null && !containsOAuth2(displayNameValue)) {
|
|
86
|
+
context.report({
|
|
87
|
+
node: displayNameProperty.value,
|
|
88
|
+
messageId: 'displayNameMissingOAuth2',
|
|
89
|
+
data: { value: displayNameValue },
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=cred-class-oauth2-naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cred-class-oauth2-naming.js","sourceRoot":"","sources":["../../src/rules/cred-class-oauth2-naming.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACN,UAAU,EACV,i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;CACD,CAAC,CAAC"}
|
package/dist/rules/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const rules: {
|
|
|
13
13
|
'no-http-request-with-manual-auth': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useHttpRequestWithAuthentication", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
14
14
|
'no-overrides-field': import("@typescript-eslint/utils/ts-eslint").RuleModule<"overridesForbidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
15
15
|
'no-runtime-dependencies': import("@typescript-eslint/utils/ts-eslint").RuleModule<"runtimeDependenciesForbidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
16
|
+
'no-template-placeholders': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unresolvedPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
16
17
|
'icon-validation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder" | "iconFileNotFound" | "iconNotSvg" | "lightDarkSame" | "invalidIconPath" | "addFileProtocol" | "changeExtension" | "similarIcon", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
17
18
|
'resource-operation-pattern': import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooManyOperationsWithoutResources", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
18
19
|
'credential-documentation-url': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidDocumentationUrl", [{
|
|
@@ -21,8 +22,15 @@ export declare const rules: {
|
|
|
21
22
|
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
22
23
|
'node-class-description-icon-missing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
23
24
|
'cred-class-field-icon-missing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
25
|
+
'cred-class-name-suffix': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingSuffix", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
26
|
+
'cred-class-oauth2-naming': import("@typescript-eslint/utils/ts-eslint").RuleModule<"classNameMissingOAuth2" | "nameMissingOAuth2" | "displayNameMissingOAuth2", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
24
27
|
'node-connection-type-literal': import("@typescript-eslint/utils/ts-eslint").RuleModule<"stringLiteralInInputs" | "stringLiteralInOutputs" | "unknownStringLiteralInInputs" | "unknownStringLiteralInOutputs", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
28
|
+
'node-operation-error-itemindex': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingItemIndex", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
25
29
|
'missing-paired-item': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingPairedItem", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
30
|
+
'no-builder-hint-leakage': import("@typescript-eslint/utils/ts-eslint").RuleModule<"wireExpression" | "connectionTypeLiteral", [{
|
|
31
|
+
scope?: "builderHint" | "all";
|
|
32
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
33
|
+
'n8n-object-validation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingN8nObject" | "wrongLocationApiVersion" | "missingNodesApiVersion" | "invalidNodesApiVersion" | "missingN8nNodes" | "n8nNodesNotArray" | "emptyN8nNodes" | "n8nCredentialsNotArray" | "nodePathNotString" | "nodePathNotInDist" | "credentialPathNotString" | "credentialPathNotInDist" | "invalidStrict", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
26
34
|
'require-community-node-keyword': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingKeyword" | "missingKeywordsArray", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
27
35
|
'require-continue-on-fail': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingContinueOnFail", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
28
36
|
'require-node-api-error': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNodeApiError" | "useNodeApiErrorInsteadOfGeneric", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCuB,CAAC"}
|
package/dist/rules/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { AiNodePackageJsonRule } from './ai-node-package-json.js';
|
|
2
2
|
import { CredClassFieldIconMissingRule } from './cred-class-field-icon-missing.js';
|
|
3
|
+
import { CredClassNameSuffixRule } from './cred-class-name-suffix.js';
|
|
4
|
+
import { CredClassOAuth2NamingRule } from './cred-class-oauth2-naming.js';
|
|
3
5
|
import { CredentialDocumentationUrlRule } from './credential-documentation-url.js';
|
|
4
6
|
import { CredentialPasswordFieldRule } from './credential-password-field.js';
|
|
5
7
|
import { CredentialTestRequiredRule } from './credential-test-required.js';
|
|
6
8
|
import { IconValidationRule } from './icon-validation.js';
|
|
7
9
|
import { MissingPairedItemRule } from './missing-paired-item.js';
|
|
10
|
+
import { N8nObjectValidationRule } from './n8n-object-validation.js';
|
|
11
|
+
import { NoBuilderHintLeakageRule } from './no-builder-hint-leakage.js';
|
|
8
12
|
import { NoCredentialReuseRule } from './no-credential-reuse.js';
|
|
9
13
|
import { NoDeprecatedWorkflowFunctionsRule } from './no-deprecated-workflow-functions.js';
|
|
10
14
|
import { NoForbiddenLifecycleScriptsRule } from './no-forbidden-lifecycle-scripts.js';
|
|
@@ -13,8 +17,10 @@ import { NoOverridesFieldRule } from './no-overrides-field.js';
|
|
|
13
17
|
import { NoRestrictedGlobalsRule } from './no-restricted-globals.js';
|
|
14
18
|
import { NoRestrictedImportsRule } from './no-restricted-imports.js';
|
|
15
19
|
import { NoRuntimeDependenciesRule } from './no-runtime-dependencies.js';
|
|
20
|
+
import { NoTemplatePlaceholdersRule } from './no-template-placeholders.js';
|
|
16
21
|
import { NodeClassDescriptionIconMissingRule } from './node-class-description-icon-missing.js';
|
|
17
22
|
import { NodeConnectionTypeLiteralRule } from './node-connection-type-literal.js';
|
|
23
|
+
import { NodeOperationErrorItemIndexRule } from './node-operation-error-itemindex.js';
|
|
18
24
|
import { NodeUsableAsToolRule } from './node-usable-as-tool.js';
|
|
19
25
|
import { OptionsSortedAlphabeticallyRule } from './options-sorted-alphabetically.js';
|
|
20
26
|
import { PackageNameConventionRule } from './package-name-convention.js';
|
|
@@ -41,13 +47,19 @@ export const rules = {
|
|
|
41
47
|
'no-http-request-with-manual-auth': NoHttpRequestWithManualAuthRule,
|
|
42
48
|
'no-overrides-field': NoOverridesFieldRule,
|
|
43
49
|
'no-runtime-dependencies': NoRuntimeDependenciesRule,
|
|
50
|
+
'no-template-placeholders': NoTemplatePlaceholdersRule,
|
|
44
51
|
'icon-validation': IconValidationRule,
|
|
45
52
|
'resource-operation-pattern': ResourceOperationPatternRule,
|
|
46
53
|
'credential-documentation-url': CredentialDocumentationUrlRule,
|
|
47
54
|
'node-class-description-icon-missing': NodeClassDescriptionIconMissingRule,
|
|
48
55
|
'cred-class-field-icon-missing': CredClassFieldIconMissingRule,
|
|
56
|
+
'cred-class-name-suffix': CredClassNameSuffixRule,
|
|
57
|
+
'cred-class-oauth2-naming': CredClassOAuth2NamingRule,
|
|
49
58
|
'node-connection-type-literal': NodeConnectionTypeLiteralRule,
|
|
59
|
+
'node-operation-error-itemindex': NodeOperationErrorItemIndexRule,
|
|
50
60
|
'missing-paired-item': MissingPairedItemRule,
|
|
61
|
+
'no-builder-hint-leakage': NoBuilderHintLeakageRule,
|
|
62
|
+
'n8n-object-validation': N8nObjectValidationRule,
|
|
51
63
|
'require-community-node-keyword': RequireCommunityNodeKeywordRule,
|
|
52
64
|
'require-continue-on-fail': RequireContinueOnFailRule,
|
|
53
65
|
'require-node-api-error': RequireNodeApiErrorRule,
|
package/dist/rules/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,mCAAmC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IACpD,0BAA0B,EAAE,0BAA0B;IACtD,qBAAqB,EAAE,qBAAqB;IAC5C,gCAAgC,EAAE,+BAA+B;IACjE,kCAAkC,EAAE,+BAA+B;IACnE,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,yBAAyB;IACpD,0BAA0B,EAAE,0BAA0B;IACtD,iBAAiB,EAAE,kBAAkB;IACrC,4BAA4B,EAAE,4BAA4B;IAC1D,8BAA8B,EAAE,8BAA8B;IAC9D,qCAAqC,EAAE,mCAAmC;IAC1E,+BAA+B,EAAE,6BAA6B;IAC9D,wBAAwB,EAAE,uBAAuB;IACjD,0BAA0B,EAAE,yBAAyB;IACrD,8BAA8B,EAAE,6BAA6B;IAC7D,gCAAgC,EAAE,+BAA+B;IACjE,qBAAqB,EAAE,qBAAqB;IAC5C,yBAAyB,EAAE,wBAAwB;IACnD,uBAAuB,EAAE,uBAAuB;IAChD,gCAAgC,EAAE,+BAA+B;IACjE,0BAA0B,EAAE,yBAAyB;IACrD,wBAAwB,EAAE,uBAAuB;IACjD,iCAAiC,EAAE,gCAAgC;IACnE,6BAA6B,EAAE,6BAA6B;IAC5D,yBAAyB,EAAE,yBAAyB;IACpD,4BAA4B,EAAE,4BAA4B;CAClB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
type MessageIds = 'missingN8nObject' | 'wrongLocationApiVersion' | 'missingNodesApiVersion' | 'invalidNodesApiVersion' | 'missingN8nNodes' | 'n8nNodesNotArray' | 'emptyN8nNodes' | 'n8nCredentialsNotArray' | 'nodePathNotString' | 'nodePathNotInDist' | 'credentialPathNotString' | 'credentialPathNotInDist' | 'invalidStrict';
|
|
3
|
+
export declare const N8nObjectValidationRule: TSESLint.RuleModule<MessageIds, [], unknown, TSESLint.RuleListener>;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=n8n-object-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"n8n-object-validation.d.ts","sourceRoot":"","sources":["../../src/rules/n8n-object-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAKnE,KAAK,UAAU,GACZ,kBAAkB,GAClB,yBAAyB,GACzB,wBAAwB,GACxB,wBAAwB,GACxB,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,wBAAwB,GACxB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,yBAAyB,GACzB,eAAe,CAAC;AAInB,eAAO,MAAM,uBAAuB,qEA8ElC,CAAC"}
|