@n8n/eslint-plugin-community-nodes 0.14.0 → 0.15.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.
Files changed (34) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/README.md +2 -0
  3. package/dist/plugin.d.ts +12 -0
  4. package/dist/plugin.d.ts.map +1 -1
  5. package/dist/plugin.js +4 -0
  6. package/dist/plugin.js.map +1 -1
  7. package/dist/rules/index.d.ts +3 -1
  8. package/dist/rules/index.d.ts.map +1 -1
  9. package/dist/rules/index.js +4 -0
  10. package/dist/rules/index.js.map +1 -1
  11. package/dist/rules/no-runtime-dependencies.d.ts +2 -0
  12. package/dist/rules/no-runtime-dependencies.d.ts.map +1 -0
  13. package/dist/rules/no-runtime-dependencies.js +41 -0
  14. package/dist/rules/no-runtime-dependencies.js.map +1 -0
  15. package/dist/rules/valid-credential-references.d.ts +2 -0
  16. package/dist/rules/valid-credential-references.d.ts.map +1 -0
  17. package/dist/rules/valid-credential-references.js +77 -0
  18. package/dist/rules/valid-credential-references.js.map +1 -0
  19. package/dist/rules/webhook-lifecycle-complete.d.ts +1 -1
  20. package/dist/rules/webhook-lifecycle-complete.d.ts.map +1 -1
  21. package/dist/rules/webhook-lifecycle-complete.js +8 -0
  22. package/dist/rules/webhook-lifecycle-complete.js.map +1 -1
  23. package/docs/rules/no-runtime-dependencies.md +58 -0
  24. package/docs/rules/valid-credential-references.md +78 -0
  25. package/package.json +3 -3
  26. package/src/plugin.ts +4 -0
  27. package/src/rules/index.ts +4 -0
  28. package/src/rules/no-runtime-dependencies.test.ts +50 -0
  29. package/src/rules/no-runtime-dependencies.ts +50 -0
  30. package/src/rules/valid-credential-references.test.ts +230 -0
  31. package/src/rules/valid-credential-references.ts +105 -0
  32. package/src/rules/webhook-lifecycle-complete.test.ts +5 -0
  33. package/src/rules/webhook-lifecycle-complete.ts +10 -0
  34. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
1
 
2
- > @n8n/eslint-plugin-community-nodes@0.14.0 build /home/runner/work/n8n/n8n/packages/@n8n/eslint-plugin-community-nodes
2
+ > @n8n/eslint-plugin-community-nodes@0.15.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
@@ -60,6 +60,7 @@ export default [
60
60
  | [no-overrides-field](docs/rules/no-overrides-field.md) | Ban the "overrides" field in community node package.json | ✅ ☑️ | | | | |
61
61
  | [no-restricted-globals](docs/rules/no-restricted-globals.md) | Disallow usage of restricted global variables in community nodes. | ✅ | | | | |
62
62
  | [no-restricted-imports](docs/rules/no-restricted-imports.md) | Disallow usage of restricted imports in community nodes. | ✅ | | | | |
63
+ | [no-runtime-dependencies](docs/rules/no-runtime-dependencies.md) | Disallow non-empty "dependencies" in community node package.json | ✅ ☑️ | | | | |
63
64
  | [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. | | | | 💡 | ❌ |
64
65
  | [node-connection-type-literal](docs/rules/node-connection-type-literal.md) | Disallow string literals in node description `inputs`/`outputs` — use `NodeConnectionTypes` enum instead | ✅ ☑️ | | 🔧 | | |
65
66
  | [node-usable-as-tool](docs/rules/node-usable-as-tool.md) | Ensure node classes have usableAsTool property | ✅ ☑️ | | 🔧 | | |
@@ -70,6 +71,7 @@ export default [
70
71
  | [require-node-api-error](docs/rules/require-node-api-error.md) | Require NodeApiError or NodeOperationError for error wrapping in catch blocks. Raw errors lose HTTP context in the n8n UI. | ✅ ☑️ | | | | |
71
72
  | [require-node-description-fields](docs/rules/require-node-description-fields.md) | Node class description must define all required fields: icon, subtitle | ✅ ☑️ | | | | |
72
73
  | [resource-operation-pattern](docs/rules/resource-operation-pattern.md) | Enforce proper resource/operation pattern for better UX in n8n nodes | | ✅ ☑️ | | | |
74
+ | [valid-credential-references](docs/rules/valid-credential-references.md) | Ensure credentials referenced in node descriptions exist as credential classes in the package | ✅ ☑️ | | | 💡 | |
73
75
  | [valid-peer-dependencies](docs/rules/valid-peer-dependencies.md) | Require community node package.json peerDependencies to contain only "n8n-workflow": "*" (and optionally "ai-node-sdk") | ✅ ☑️ | | 🔧 | | |
74
76
  | [webhook-lifecycle-complete](docs/rules/webhook-lifecycle-complete.md) | Require webhook trigger nodes to implement the complete webhookMethods lifecycle (checkExists, create, delete) | ✅ ☑️ | | | | |
75
77
 
package/dist/plugin.d.ts CHANGED
@@ -26,6 +26,7 @@ declare const configs: {
26
26
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
27
27
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
28
28
  '@n8n/community-nodes/no-overrides-field': "error";
29
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
29
30
  '@n8n/community-nodes/icon-validation': "error";
30
31
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
31
32
  '@n8n/community-nodes/resource-operation-pattern': "warn";
@@ -37,6 +38,7 @@ declare const configs: {
37
38
  '@n8n/community-nodes/require-continue-on-fail': "error";
38
39
  '@n8n/community-nodes/require-node-api-error': "error";
39
40
  '@n8n/community-nodes/require-node-description-fields': "error";
41
+ '@n8n/community-nodes/valid-credential-references': "error";
40
42
  '@n8n/community-nodes/valid-peer-dependencies': "error";
41
43
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
42
44
  };
@@ -64,6 +66,7 @@ declare const configs: {
64
66
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
65
67
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
66
68
  '@n8n/community-nodes/no-overrides-field': "error";
69
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
67
70
  '@n8n/community-nodes/icon-validation': "error";
68
71
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
69
72
  '@n8n/community-nodes/credential-documentation-url': "error";
@@ -75,6 +78,7 @@ declare const configs: {
75
78
  '@n8n/community-nodes/require-continue-on-fail': "error";
76
79
  '@n8n/community-nodes/require-node-api-error': "error";
77
80
  '@n8n/community-nodes/require-node-description-fields': "error";
81
+ '@n8n/community-nodes/valid-credential-references': "error";
78
82
  '@n8n/community-nodes/valid-peer-dependencies': "error";
79
83
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
80
84
  };
@@ -107,6 +111,7 @@ declare const pluginWithConfigs: {
107
111
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
108
112
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
109
113
  '@n8n/community-nodes/no-overrides-field': "error";
114
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
110
115
  '@n8n/community-nodes/icon-validation': "error";
111
116
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
112
117
  '@n8n/community-nodes/resource-operation-pattern': "warn";
@@ -118,6 +123,7 @@ declare const pluginWithConfigs: {
118
123
  '@n8n/community-nodes/require-continue-on-fail': "error";
119
124
  '@n8n/community-nodes/require-node-api-error': "error";
120
125
  '@n8n/community-nodes/require-node-description-fields': "error";
126
+ '@n8n/community-nodes/valid-credential-references': "error";
121
127
  '@n8n/community-nodes/valid-peer-dependencies': "error";
122
128
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
123
129
  };
@@ -145,6 +151,7 @@ declare const pluginWithConfigs: {
145
151
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
146
152
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
147
153
  '@n8n/community-nodes/no-overrides-field': "error";
154
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
148
155
  '@n8n/community-nodes/icon-validation': "error";
149
156
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
150
157
  '@n8n/community-nodes/credential-documentation-url': "error";
@@ -156,6 +163,7 @@ declare const pluginWithConfigs: {
156
163
  '@n8n/community-nodes/require-continue-on-fail': "error";
157
164
  '@n8n/community-nodes/require-node-api-error': "error";
158
165
  '@n8n/community-nodes/require-node-description-fields': "error";
166
+ '@n8n/community-nodes/valid-credential-references': "error";
159
167
  '@n8n/community-nodes/valid-peer-dependencies': "error";
160
168
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
161
169
  };
@@ -195,6 +203,7 @@ declare const n8nCommunityNodesPlugin: {
195
203
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
196
204
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
197
205
  '@n8n/community-nodes/no-overrides-field': "error";
206
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
198
207
  '@n8n/community-nodes/icon-validation': "error";
199
208
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
200
209
  '@n8n/community-nodes/resource-operation-pattern': "warn";
@@ -206,6 +215,7 @@ declare const n8nCommunityNodesPlugin: {
206
215
  '@n8n/community-nodes/require-continue-on-fail': "error";
207
216
  '@n8n/community-nodes/require-node-api-error': "error";
208
217
  '@n8n/community-nodes/require-node-description-fields': "error";
218
+ '@n8n/community-nodes/valid-credential-references': "error";
209
219
  '@n8n/community-nodes/valid-peer-dependencies': "error";
210
220
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
211
221
  };
@@ -233,6 +243,7 @@ declare const n8nCommunityNodesPlugin: {
233
243
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': "error";
234
244
  '@n8n/community-nodes/no-http-request-with-manual-auth': "error";
235
245
  '@n8n/community-nodes/no-overrides-field': "error";
246
+ '@n8n/community-nodes/no-runtime-dependencies': "error";
236
247
  '@n8n/community-nodes/icon-validation': "error";
237
248
  '@n8n/community-nodes/options-sorted-alphabetically': "warn";
238
249
  '@n8n/community-nodes/credential-documentation-url': "error";
@@ -244,6 +255,7 @@ declare const n8nCommunityNodesPlugin: {
244
255
  '@n8n/community-nodes/require-continue-on-fail': "error";
245
256
  '@n8n/community-nodes/require-node-api-error': "error";
246
257
  '@n8n/community-nodes/require-node-description-fields': "error";
258
+ '@n8n/community-nodes/valid-credential-references': "error";
247
259
  '@n8n/community-nodes/valid-peer-dependencies': "error";
248
260
  '@n8n/community-nodes/webhook-lifecycle-complete': "error";
249
261
  };
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEE,CAAC;AAE1C,QAAA,MAAM,iBAAiB;;;;;;;;;;;2BAtEN,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CAsEiC,CAAC;AAEzE,QAAA,MAAM,uBAAuB;;;;;;;;;;;2BAxEZ,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CAwEU,CAAC;AAClD,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEE,CAAC;AAE1C,QAAA,MAAM,iBAAiB;;;;;;;;;;;2BA1EN,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CA0EiC,CAAC;AAEzE,QAAA,MAAM,uBAAuB;;;;;;;;;;;2BA5EZ,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;CA4EU,CAAC;AAClD,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
package/dist/plugin.js CHANGED
@@ -28,6 +28,7 @@ const configs = {
28
28
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': 'error',
29
29
  '@n8n/community-nodes/no-http-request-with-manual-auth': 'error',
30
30
  '@n8n/community-nodes/no-overrides-field': 'error',
31
+ '@n8n/community-nodes/no-runtime-dependencies': 'error',
31
32
  '@n8n/community-nodes/icon-validation': 'error',
32
33
  '@n8n/community-nodes/options-sorted-alphabetically': 'warn',
33
34
  '@n8n/community-nodes/resource-operation-pattern': 'warn',
@@ -39,6 +40,7 @@ const configs = {
39
40
  '@n8n/community-nodes/require-continue-on-fail': 'error',
40
41
  '@n8n/community-nodes/require-node-api-error': 'error',
41
42
  '@n8n/community-nodes/require-node-description-fields': 'error',
43
+ '@n8n/community-nodes/valid-credential-references': 'error',
42
44
  '@n8n/community-nodes/valid-peer-dependencies': 'error',
43
45
  '@n8n/community-nodes/webhook-lifecycle-complete': 'error',
44
46
  },
@@ -59,6 +61,7 @@ const configs = {
59
61
  '@n8n/community-nodes/no-forbidden-lifecycle-scripts': 'error',
60
62
  '@n8n/community-nodes/no-http-request-with-manual-auth': 'error',
61
63
  '@n8n/community-nodes/no-overrides-field': 'error',
64
+ '@n8n/community-nodes/no-runtime-dependencies': 'error',
62
65
  '@n8n/community-nodes/icon-validation': 'error',
63
66
  '@n8n/community-nodes/options-sorted-alphabetically': 'warn',
64
67
  '@n8n/community-nodes/credential-documentation-url': 'error',
@@ -70,6 +73,7 @@ const configs = {
70
73
  '@n8n/community-nodes/require-continue-on-fail': 'error',
71
74
  '@n8n/community-nodes/require-node-api-error': 'error',
72
75
  '@n8n/community-nodes/require-node-description-fields': 'error',
76
+ '@n8n/community-nodes/valid-credential-references': 'error',
73
77
  '@n8n/community-nodes/valid-peer-dependencies': 'error',
74
78
  '@n8n/community-nodes/webhook-lifecycle-complete': 'error',
75
79
  },
@@ -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,8EAA8E;IAC9E,KAAK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,EAAE,OAAO;YACnD,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"}
@@ -12,6 +12,7 @@ export declare const rules: {
12
12
  'no-forbidden-lifecycle-scripts': import("@typescript-eslint/utils/ts-eslint").RuleModule<"forbiddenScript", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
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
+ 'no-runtime-dependencies': import("@typescript-eslint/utils/ts-eslint").RuleModule<"runtimeDependenciesForbidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
15
16
  '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>;
16
17
  'resource-operation-pattern': import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooManyOperationsWithoutResources", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
17
18
  'credential-documentation-url': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidDocumentationUrl", [{
@@ -26,7 +27,8 @@ export declare const rules: {
26
27
  'require-continue-on-fail': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingContinueOnFail", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
27
28
  'require-node-api-error': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNodeApiError" | "useNodeApiErrorInsteadOfGeneric", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
28
29
  'require-node-description-fields': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingField" | "missingFields", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
30
+ 'valid-credential-references': import("@typescript-eslint/utils/ts-eslint").RuleModule<"didYouMean" | "credentialNotFound", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
29
31
  'valid-peer-dependencies': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingPeerDependencies" | "invalidPeerDependenciesType" | "missingN8nWorkflow" | "pinnedN8nWorkflow" | "forbiddenPeerDependency", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
30
- 'webhook-lifecycle-complete': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingWebhookMethods" | "missingLifecycleMethod", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
32
+ 'webhook-lifecycle-complete': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingWebhookMethods" | "emptyWebhookMethods" | "missingLifecycleMethod", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
31
33
  };
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BuB,CAAC"}
@@ -12,6 +12,7 @@ import { NoHttpRequestWithManualAuthRule } from './no-http-request-with-manual-a
12
12
  import { NoOverridesFieldRule } from './no-overrides-field.js';
13
13
  import { NoRestrictedGlobalsRule } from './no-restricted-globals.js';
14
14
  import { NoRestrictedImportsRule } from './no-restricted-imports.js';
15
+ import { NoRuntimeDependenciesRule } from './no-runtime-dependencies.js';
15
16
  import { NodeClassDescriptionIconMissingRule } from './node-class-description-icon-missing.js';
16
17
  import { NodeConnectionTypeLiteralRule } from './node-connection-type-literal.js';
17
18
  import { NodeUsableAsToolRule } from './node-usable-as-tool.js';
@@ -22,6 +23,7 @@ import { RequireContinueOnFailRule } from './require-continue-on-fail.js';
22
23
  import { RequireNodeApiErrorRule } from './require-node-api-error.js';
23
24
  import { RequireNodeDescriptionFieldsRule } from './require-node-description-fields.js';
24
25
  import { ResourceOperationPatternRule } from './resource-operation-pattern.js';
26
+ import { ValidCredentialReferencesRule } from './valid-credential-references.js';
25
27
  import { ValidPeerDependenciesRule } from './valid-peer-dependencies.js';
26
28
  import { WebhookLifecycleCompleteRule } from './webhook-lifecycle-complete.js';
27
29
  export const rules = {
@@ -38,6 +40,7 @@ export const rules = {
38
40
  'no-forbidden-lifecycle-scripts': NoForbiddenLifecycleScriptsRule,
39
41
  'no-http-request-with-manual-auth': NoHttpRequestWithManualAuthRule,
40
42
  'no-overrides-field': NoOverridesFieldRule,
43
+ 'no-runtime-dependencies': NoRuntimeDependenciesRule,
41
44
  'icon-validation': IconValidationRule,
42
45
  'resource-operation-pattern': ResourceOperationPatternRule,
43
46
  'credential-documentation-url': CredentialDocumentationUrlRule,
@@ -49,6 +52,7 @@ export const rules = {
49
52
  'require-continue-on-fail': RequireContinueOnFailRule,
50
53
  'require-node-api-error': RequireNodeApiErrorRule,
51
54
  'require-node-description-fields': RequireNodeDescriptionFieldsRule,
55
+ 'valid-credential-references': ValidCredentialReferencesRule,
52
56
  'valid-peer-dependencies': ValidPeerDependenciesRule,
53
57
  'webhook-lifecycle-complete': WebhookLifecycleCompleteRule,
54
58
  };
@@ -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,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAA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bidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ //# sourceMappingURL=no-runtime-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-runtime-dependencies.d.ts","sourceRoot":"","sources":["../../src/rules/no-runtime-dependencies.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,iKA4CpC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ import { createRule, findJsonProperty } from '../utils/index.js';
3
+ export const NoRuntimeDependenciesRule = createRule({
4
+ name: 'no-runtime-dependencies',
5
+ meta: {
6
+ type: 'problem',
7
+ docs: {
8
+ description: 'Disallow non-empty "dependencies" in community node package.json',
9
+ },
10
+ messages: {
11
+ runtimeDependenciesForbidden: 'The "dependencies" field must be empty or absent in community node packages. Runtime dependencies get bundled into the n8n instance and can conflict with other nodes or the n8n runtime itself. Move shared libraries to "peerDependencies" or bundle them into your build artifact.',
12
+ },
13
+ schema: [],
14
+ },
15
+ defaultOptions: [],
16
+ create(context) {
17
+ if (!context.filename.endsWith('package.json')) {
18
+ return {};
19
+ }
20
+ return {
21
+ ObjectExpression(node) {
22
+ if (node.parent?.type !== AST_NODE_TYPES.ExpressionStatement) {
23
+ return;
24
+ }
25
+ const depsProp = findJsonProperty(node, 'dependencies');
26
+ if (!depsProp) {
27
+ return;
28
+ }
29
+ if (depsProp.value.type !== AST_NODE_TYPES.ObjectExpression ||
30
+ depsProp.value.properties.length === 0) {
31
+ return;
32
+ }
33
+ context.report({
34
+ node: depsProp,
35
+ messageId: 'runtimeDependenciesForbidden',
36
+ });
37
+ },
38
+ };
39
+ },
40
+ });
41
+ //# sourceMappingURL=no-runtime-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-runtime-dependencies.js","sourceRoot":"","sources":["../../src/rules/no-runtime-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IACnD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EAAE,kEAAkE;SAC/E;QACD,QAAQ,EAAE;YACT,4BAA4B,EAC3B,uRAAuR;SACxR;QACD,MAAM,EAAE,EAAE;KACV;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACb,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YAChD,OAAO,EAAE,CAAC;QACX,CAAC;QAED,OAAO;YACN,gBAAgB,CAAC,IAA+B;gBAC/C,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,cAAc,CAAC,mBAAmB,EAAE,CAAC;oBAC9D,OAAO;gBACR,CAAC;gBAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACf,OAAO;gBACR,CAAC;gBAED,IACC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB;oBACvD,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EACrC,CAAC;oBACF,OAAO;gBACR,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACd,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,8BAA8B;iBACzC,CAAC,CAAC;YACJ,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ValidCredentialReferencesRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"didYouMean" | "credentialNotFound", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ //# sourceMappingURL=valid-credential-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valid-credential-references.d.ts","sourceRoot":"","sources":["../../src/rules/valid-credential-references.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,6BAA6B,sKAyFxC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { TSESTree } from '@typescript-eslint/types';
2
+ import { isNodeTypeClass, findClassProperty, findArrayLiteralProperty, extractCredentialNameFromArray, findPackageJson, readPackageJsonCredentials, isFileType, findSimilarStrings, createRule, } from '../utils/index.js';
3
+ export const ValidCredentialReferencesRule = createRule({
4
+ name: 'valid-credential-references',
5
+ meta: {
6
+ type: 'problem',
7
+ docs: {
8
+ description: 'Ensure credentials referenced in node descriptions exist as credential classes in the package',
9
+ },
10
+ messages: {
11
+ credentialNotFound: 'Credential "{{ credentialName }}" does not exist in this package. Check for typos or ensure the credential class is declared and listed in package.json.',
12
+ didYouMean: "Did you mean '{{ suggestedName }}'?",
13
+ },
14
+ schema: [],
15
+ hasSuggestions: true,
16
+ },
17
+ defaultOptions: [],
18
+ create(context) {
19
+ if (!isFileType(context.filename, '.node.ts')) {
20
+ return {};
21
+ }
22
+ let packageCredentials = null;
23
+ const loadPackageCredentials = () => {
24
+ if (packageCredentials !== null) {
25
+ return packageCredentials;
26
+ }
27
+ const packageJsonPath = findPackageJson(context.filename);
28
+ if (!packageJsonPath) {
29
+ packageCredentials = new Set();
30
+ return packageCredentials;
31
+ }
32
+ packageCredentials = readPackageJsonCredentials(packageJsonPath);
33
+ return packageCredentials;
34
+ };
35
+ return {
36
+ ClassDeclaration(node) {
37
+ if (!isNodeTypeClass(node)) {
38
+ return;
39
+ }
40
+ const descriptionProperty = findClassProperty(node, 'description');
41
+ if (!descriptionProperty?.value ||
42
+ descriptionProperty.value.type !== TSESTree.AST_NODE_TYPES.ObjectExpression) {
43
+ return;
44
+ }
45
+ const credentialsArray = findArrayLiteralProperty(descriptionProperty.value, 'credentials');
46
+ if (!credentialsArray) {
47
+ return;
48
+ }
49
+ const knownCredentials = loadPackageCredentials();
50
+ if (knownCredentials.size === 0) {
51
+ return;
52
+ }
53
+ credentialsArray.elements.forEach((element) => {
54
+ const credentialInfo = extractCredentialNameFromArray(element);
55
+ if (!credentialInfo || knownCredentials.has(credentialInfo.name)) {
56
+ return;
57
+ }
58
+ const similar = findSimilarStrings(credentialInfo.name, knownCredentials);
59
+ const suggestions = similar.map((suggestedName) => ({
60
+ messageId: 'didYouMean',
61
+ data: { suggestedName },
62
+ fix(fixer) {
63
+ return fixer.replaceText(credentialInfo.node, `"${suggestedName}"`);
64
+ },
65
+ }));
66
+ context.report({
67
+ node: credentialInfo.node,
68
+ messageId: 'credentialNotFound',
69
+ data: { credentialName: credentialInfo.name },
70
+ suggest: suggestions,
71
+ });
72
+ });
73
+ },
74
+ };
75
+ },
76
+ });
77
+ //# sourceMappingURL=valid-credential-references.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valid-credential-references.js","sourceRoot":"","sources":["../../src/rules/valid-credential-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,8BAA8B,EAC9B,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,kBAAkB,EAClB,UAAU,GACV,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,CAAC;IACvD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,+FAA+F;SAChG;QACD,QAAQ,EAAE;YACT,kBAAkB,EACjB,0JAA0J;YAC3J,UAAU,EAAE,qCAAqC;SACjD;QACD,MAAM,EAAE,EAAE;QACV,cAAc,EAAE,IAAI;KACpB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACb,IAAI,CAAC,UAAU,CAAC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AAE;oBAC7C,MAAM,cAAc,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;oBAC/D,IAAI,CAAC,cAAc,IAAI,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;wBAClE,OAAO;oBACR,CAAC;oBAED,MAAM,OAAO,GAAG,kBAAkB,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;oBAC1E,MAAM,WAAW,GAChB,OAAO,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;wBAC/B,SAAS,EAAE,YAAqB;wBAChC,IAAI,EAAE,EAAE,aAAa,EAAE;wBACvB,GAAG,CAAC,KAAK;4BACR,OAAO,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,aAAa,GAAG,CAAC,CAAC;wBACrE,CAAC;qBACD,CAAC,CAAC,CAAC;oBAEL,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI,EAAE,cAAc,CAAC,IAAI;wBACzB,SAAS,EAAE,oBAAoB;wBAC/B,IAAI,EAAE,EAAE,cAAc,EAAE,cAAc,CAAC,IAAI,EAAE;wBAC7C,OAAO,EAAE,WAAW;qBACpB,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC;YACJ,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const WebhookLifecycleCompleteRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingWebhookMethods" | "missingLifecycleMethod", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
1
+ export declare const WebhookLifecycleCompleteRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingWebhookMethods" | "emptyWebhookMethods" | "missingLifecycleMethod", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
2
  //# sourceMappingURL=webhook-lifecycle-complete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-lifecycle-complete.d.ts","sourceRoot":"","sources":["../../src/rules/webhook-lifecycle-complete.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,4BAA4B,qLAwEvC,CAAC"}
1
+ {"version":3,"file":"webhook-lifecycle-complete.d.ts","sourceRoot":"","sources":["../../src/rules/webhook-lifecycle-complete.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,4BAA4B,6MAkFvC,CAAC"}
@@ -39,6 +39,7 @@ export const WebhookLifecycleCompleteRule = createRule({
39
39
  },
40
40
  messages: {
41
41
  missingWebhookMethods: 'Webhook trigger node is missing the `webhookMethods` property. Implement `checkExists`, `create`, and `delete` to register, verify, and clean up the webhook on the third-party service.',
42
+ emptyWebhookMethods: 'Webhook trigger node has an empty `webhookMethods` object. Define at least one lifecycle group with `checkExists`, `create`, and `delete` methods.',
42
43
  missingLifecycleMethod: 'Webhook trigger lifecycle is incomplete. `webhookMethods.{{group}}` is missing: {{missing}}. All of `checkExists`, `create`, and `delete` must be implemented.',
43
44
  },
44
45
  schema: [],
@@ -69,6 +70,13 @@ export const WebhookLifecycleCompleteRule = createRule({
69
70
  if (webhookMethodsProperty.value.type !== AST_NODE_TYPES.ObjectExpression) {
70
71
  return;
71
72
  }
73
+ if (webhookMethodsProperty.value.properties.length === 0) {
74
+ context.report({
75
+ node: webhookMethodsProperty.key,
76
+ messageId: 'emptyWebhookMethods',
77
+ });
78
+ return;
79
+ }
72
80
  for (const groupProperty of webhookMethodsProperty.value.properties) {
73
81
  if (groupProperty.type !== AST_NODE_TYPES.Property)
74
82
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-lifecycle-complete.js","sourceRoot":"","sources":["../../src/rules/webhook-lifecycle-complete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EACN,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GACf,MAAM,mBAAmB,CAAC;AAE3B,MAAM,gBAAgB,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CAAC;CACD,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ # Disallow non-empty "dependencies" in community node package.json (`@n8n/community-nodes/no-runtime-dependencies`)
2
+
3
+ 💼 This rule is enabled in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ <!-- end auto-generated rule header -->
6
+
7
+ ## Rule Details
8
+
9
+ The `dependencies` field in `package.json` declares packages that are installed alongside the node at runtime. In the context of n8n community nodes this is dangerous:
10
+
11
+ - Community nodes run inside the shared n8n runtime alongside all other installed nodes. Any package listed in `dependencies` gets installed into that shared environment and can shadow or conflict with versions already used by n8n or other nodes.
12
+ - Unlike application packages, community nodes should not own their runtime environment. Shared libraries must be declared in `peerDependencies` (so the host runtime supplies them) or bundled at build time into the published artifact.
13
+ - A non-empty `dependencies` section is a strong signal that the package was scaffolded from a generic Node.js template without adapting it to the n8n community node model.
14
+
15
+ ## Examples
16
+
17
+ ### Incorrect
18
+
19
+ ```json
20
+ {
21
+ "name": "n8n-nodes-example",
22
+ "dependencies": {
23
+ "axios": "1.0.0"
24
+ }
25
+ }
26
+ ```
27
+
28
+ ```json
29
+ {
30
+ "name": "n8n-nodes-example",
31
+ "dependencies": {
32
+ "axios": "1.7.0",
33
+ "fast-xml-parser": "4.4.0",
34
+ "minimatch": "9.0.5"
35
+ }
36
+ }
37
+ ```
38
+
39
+ ### Correct
40
+
41
+ ```json
42
+ {
43
+ "name": "n8n-nodes-example",
44
+ "peerDependencies": {
45
+ "n8n-workflow": "*"
46
+ }
47
+ }
48
+ ```
49
+
50
+ ```json
51
+ {
52
+ "name": "n8n-nodes-example",
53
+ "dependencies": {},
54
+ "peerDependencies": {
55
+ "n8n-workflow": "*"
56
+ }
57
+ }
58
+ ```
@@ -0,0 +1,78 @@
1
+ # Ensure credentials referenced in node descriptions exist as credential classes in the package (`@n8n/community-nodes/valid-credential-references`)
2
+
3
+ 💼 This rule is enabled in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
6
+
7
+ <!-- end auto-generated rule header -->
8
+
9
+ ## Rule Details
10
+
11
+ For each entry in `description.credentials[]`, this rule verifies that the referenced `name` matches the `name` class field of a credential class declared in the same package (as listed in `package.json` under `n8n.credentials`).
12
+
13
+ This catches typos and broken references. When `cred-class-name-suffix` is also enabled, this rule naturally enforces the naming convention in the common case while still allowing legitimately named credentials such as `httpHeaderAuth` or `webhookAuth`.
14
+
15
+ ## Examples
16
+
17
+ ### ❌ Incorrect
18
+
19
+ ```typescript
20
+ // MyApiCredential.credentials.ts
21
+ export class MyApiCredential implements ICredentialType {
22
+ name = 'myApiCredential';
23
+ // ...
24
+ }
25
+
26
+ // package.json: "n8n": { "credentials": ["dist/credentials/MyApiCredential.credentials.js"] }
27
+
28
+ export class MyNode implements INodeType {
29
+ description: INodeTypeDescription = {
30
+ credentials: [
31
+ {
32
+ name: 'myApiCredentail', // Typo — no credential with this name exists
33
+ required: true,
34
+ },
35
+ ],
36
+ // ...
37
+ };
38
+ }
39
+ ```
40
+
41
+ ### ✅ Correct
42
+
43
+ ```typescript
44
+ // MyApiCredential.credentials.ts
45
+ export class MyApiCredential implements ICredentialType {
46
+ name = 'myApiCredential';
47
+ // ...
48
+ }
49
+
50
+ // package.json: "n8n": { "credentials": ["dist/credentials/MyApiCredential.credentials.js"] }
51
+
52
+ export class MyNode implements INodeType {
53
+ description: INodeTypeDescription = {
54
+ credentials: [
55
+ {
56
+ name: 'myApiCredential', // Matches the credential class name property
57
+ required: true,
58
+ },
59
+ ],
60
+ // ...
61
+ };
62
+ }
63
+ ```
64
+
65
+ ## Setup
66
+
67
+ Declare your credential files in `package.json` so the rule can resolve credential class names:
68
+
69
+ ```json
70
+ {
71
+ "name": "n8n-nodes-my-service",
72
+ "n8n": {
73
+ "credentials": [
74
+ "dist/credentials/MyApiCredential.credentials.js"
75
+ ]
76
+ }
77
+ }
78
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@n8n/eslint-plugin-community-nodes",
3
3
  "type": "module",
4
- "version": "0.14.0",
4
+ "version": "0.15.0",
5
5
  "main": "./dist/plugin.js",
6
6
  "types": "./dist/plugin.d.ts",
7
7
  "exports": {
@@ -23,8 +23,8 @@
23
23
  "typescript": "6.0.2",
24
24
  "vitest": "^4.1.1",
25
25
  "@n8n/typescript-config": "1.4.0",
26
- "n8n-workflow": "2.19.0",
27
- "@n8n/vitest-config": "1.10.0"
26
+ "@n8n/vitest-config": "1.10.0",
27
+ "n8n-workflow": "2.20.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "eslint": ">= 9",