@n8n/eslint-plugin-community-nodes 0.26.0 → 0.28.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 (92) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/README.md +7 -1
  3. package/dist/plugin.d.ts +36 -0
  4. package/dist/plugin.d.ts.map +1 -1
  5. package/dist/plugin.js +12 -0
  6. package/dist/plugin.js.map +1 -1
  7. package/dist/rules/credential-password-field.d.ts.map +1 -1
  8. package/dist/rules/credential-password-field.js +3 -31
  9. package/dist/rules/credential-password-field.js.map +1 -1
  10. package/dist/rules/credential-unnecessary-password.d.ts +2 -0
  11. package/dist/rules/credential-unnecessary-password.d.ts.map +1 -0
  12. package/dist/rules/credential-unnecessary-password.js +54 -0
  13. package/dist/rules/credential-unnecessary-password.js.map +1 -0
  14. package/dist/rules/index.d.ts +7 -1
  15. package/dist/rules/index.d.ts.map +1 -1
  16. package/dist/rules/index.js +12 -0
  17. package/dist/rules/index.js.map +1 -1
  18. package/dist/rules/no-dead-files.d.ts +7 -0
  19. package/dist/rules/no-dead-files.d.ts.map +1 -0
  20. package/dist/rules/no-dead-files.js +57 -0
  21. package/dist/rules/no-dead-files.js.map +1 -0
  22. package/dist/rules/no-hardcoded-secrets.d.ts +2 -0
  23. package/dist/rules/no-hardcoded-secrets.d.ts.map +1 -0
  24. package/dist/rules/no-hardcoded-secrets.js +147 -0
  25. package/dist/rules/no-hardcoded-secrets.js.map +1 -0
  26. package/dist/rules/no-restricted-globals.d.ts +1 -1
  27. package/dist/rules/no-restricted-globals.d.ts.map +1 -1
  28. package/dist/rules/no-restricted-globals.js +18 -5
  29. package/dist/rules/no-restricted-globals.js.map +1 -1
  30. package/dist/rules/no-silent-error-swallowing.d.ts +2 -0
  31. package/dist/rules/no-silent-error-swallowing.d.ts.map +1 -0
  32. package/dist/rules/no-silent-error-swallowing.js +112 -0
  33. package/dist/rules/no-silent-error-swallowing.js.map +1 -0
  34. package/dist/rules/require-files-array.d.ts +2 -0
  35. package/dist/rules/require-files-array.d.ts.map +1 -0
  36. package/dist/rules/require-files-array.js +41 -0
  37. package/dist/rules/require-files-array.js.map +1 -0
  38. package/dist/rules/require-homepage.d.ts +2 -0
  39. package/dist/rules/require-homepage.d.ts.map +1 -0
  40. package/dist/rules/require-homepage.js +52 -0
  41. package/dist/rules/require-homepage.js.map +1 -0
  42. package/dist/rules/webhook-lifecycle-complete.d.ts.map +1 -1
  43. package/dist/rules/webhook-lifecycle-complete.js +2 -3
  44. package/dist/rules/webhook-lifecycle-complete.js.map +1 -1
  45. package/dist/typecheck.tsbuildinfo +1 -1
  46. package/dist/utils/constants.d.ts +5 -0
  47. package/dist/utils/constants.d.ts.map +1 -0
  48. package/dist/utils/constants.js +15 -0
  49. package/dist/utils/constants.js.map +1 -0
  50. package/dist/utils/credential-fields.d.ts +20 -0
  51. package/dist/utils/credential-fields.d.ts.map +1 -0
  52. package/dist/utils/credential-fields.js +45 -0
  53. package/dist/utils/credential-fields.js.map +1 -0
  54. package/dist/utils/file-utils.d.ts +6 -0
  55. package/dist/utils/file-utils.d.ts.map +1 -1
  56. package/dist/utils/file-utils.js +16 -0
  57. package/dist/utils/file-utils.js.map +1 -1
  58. package/dist/utils/index.d.ts +2 -0
  59. package/dist/utils/index.d.ts.map +1 -1
  60. package/dist/utils/index.js +2 -0
  61. package/dist/utils/index.js.map +1 -1
  62. package/docs/rules/credential-password-field.md +3 -1
  63. package/docs/rules/credential-unnecessary-password.md +46 -0
  64. package/docs/rules/no-dead-files.md +56 -0
  65. package/docs/rules/no-hardcoded-secrets.md +59 -0
  66. package/docs/rules/no-restricted-globals.md +14 -0
  67. package/docs/rules/no-silent-error-swallowing.md +72 -0
  68. package/docs/rules/require-files-array.md +43 -0
  69. package/docs/rules/require-homepage.md +49 -0
  70. package/package.json +2 -2
  71. package/src/plugin.ts +12 -0
  72. package/src/rules/credential-password-field.ts +4 -40
  73. package/src/rules/credential-unnecessary-password.test.ts +105 -0
  74. package/src/rules/credential-unnecessary-password.ts +72 -0
  75. package/src/rules/index.ts +12 -0
  76. package/src/rules/no-dead-files.test.ts +128 -0
  77. package/src/rules/no-dead-files.ts +71 -0
  78. package/src/rules/no-hardcoded-secrets.test.ts +124 -0
  79. package/src/rules/no-hardcoded-secrets.ts +161 -0
  80. package/src/rules/no-restricted-globals.test.ts +26 -2
  81. package/src/rules/no-restricted-globals.ts +22 -5
  82. package/src/rules/no-silent-error-swallowing.test.ts +245 -0
  83. package/src/rules/no-silent-error-swallowing.ts +127 -0
  84. package/src/rules/require-files-array.test.ts +57 -0
  85. package/src/rules/require-files-array.ts +50 -0
  86. package/src/rules/require-homepage.test.ts +80 -0
  87. package/src/rules/require-homepage.ts +59 -0
  88. package/src/rules/webhook-lifecycle-complete.ts +4 -5
  89. package/src/utils/constants.ts +21 -0
  90. package/src/utils/credential-fields.ts +57 -0
  91. package/src/utils/file-utils.ts +23 -0
  92. package/src/utils/index.ts +2 -0
@@ -0,0 +1,5 @@
1
+ import type { WebhookSetupMethodNames } from 'n8n-workflow';
2
+ export type WebhookLifecycleMethod = WebhookSetupMethodNames;
3
+ /** The webhook trigger lifecycle methods, in the order n8n invokes them. */
4
+ export declare const WEBHOOK_LIFECYCLE_METHODS: readonly WebhookLifecycleMethod[];
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAe7D,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAEjC,SAAS,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * n8n's canonical webhook lifecycle method names (`WebhookSetupMethodNames`) are
3
+ * a type, so they can't be iterated at lint time. This object mirrors them as a
4
+ * runtime value; the `satisfies Record<WebhookSetupMethodNames, true>` ties it to
5
+ * the source of truth — adding, removing, or renaming a method upstream breaks
6
+ * type-checking here until this list is updated.
7
+ */
8
+ const LIFECYCLE_METHOD_SET = {
9
+ checkExists: true,
10
+ create: true,
11
+ delete: true,
12
+ };
13
+ /** The webhook trigger lifecycle methods, in the order n8n invokes them. */
14
+ export const WEBHOOK_LIFECYCLE_METHODS = Object.keys(LIFECYCLE_METHOD_SET);
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAG;IAC5B,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;CAC6C,CAAC;AAE3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CACnD,oBAAoB,CACiB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ /**
3
+ * Whether a name looks like it holds a secret. A name is sensitive when it
4
+ * contains a sensitive pattern (or a caller-supplied `extra` one) and none of
5
+ * the `exclusions`. Exclusions win, so under the default set `tokenUrl` and
6
+ * `secretId` are not sensitive even though they contain `token`/`secret`.
7
+ *
8
+ * - Credential-field masking uses the default exclusions (a field named
9
+ * `tokenUrl` is a URL, not a secret to mask).
10
+ * - Pass `exclusions: []` to match on the raw patterns alone, e.g. when a
11
+ * second gate (like a value heuristic) already guards against false positives.
12
+ * - Pass `extra` to add caller-specific patterns without widening the shared set.
13
+ */
14
+ export declare function isSensitiveName(name: string, options?: {
15
+ extra?: string[];
16
+ exclusions?: string[];
17
+ }): boolean;
18
+ /** Whether the credential field element sets `typeOptions: { password: true }`. */
19
+ export declare function hasPasswordTypeOption(element: TSESTree.ObjectExpression): boolean;
20
+ //# sourceMappingURL=credential-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-fields.d.ts","sourceRoot":"","sources":["../../src/utils/credential-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAkBpD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GACvD,OAAO,CAST;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,GAAG,OAAO,CAWjF"}
@@ -0,0 +1,45 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ import { findObjectProperty, getBooleanLiteralValue } from './ast-utils.js';
3
+ const SENSITIVE_PATTERNS = [
4
+ 'password',
5
+ 'secret',
6
+ 'token',
7
+ 'cert',
8
+ 'passphrase',
9
+ 'apikey',
10
+ 'secretkey',
11
+ 'privatekey',
12
+ 'authkey',
13
+ ];
14
+ const NON_SENSITIVE_PATTERNS = ['url', 'pub', 'id'];
15
+ /**
16
+ * Whether a name looks like it holds a secret. A name is sensitive when it
17
+ * contains a sensitive pattern (or a caller-supplied `extra` one) and none of
18
+ * the `exclusions`. Exclusions win, so under the default set `tokenUrl` and
19
+ * `secretId` are not sensitive even though they contain `token`/`secret`.
20
+ *
21
+ * - Credential-field masking uses the default exclusions (a field named
22
+ * `tokenUrl` is a URL, not a secret to mask).
23
+ * - Pass `exclusions: []` to match on the raw patterns alone, e.g. when a
24
+ * second gate (like a value heuristic) already guards against false positives.
25
+ * - Pass `extra` to add caller-specific patterns without widening the shared set.
26
+ */
27
+ export function isSensitiveName(name, options = {}) {
28
+ const { extra = [], exclusions = NON_SENSITIVE_PATTERNS } = options;
29
+ const lowerName = name.toLowerCase();
30
+ if (exclusions.some((pattern) => lowerName.includes(pattern))) {
31
+ return false;
32
+ }
33
+ return [...SENSITIVE_PATTERNS, ...extra].some((pattern) => lowerName.includes(pattern));
34
+ }
35
+ /** Whether the credential field element sets `typeOptions: { password: true }`. */
36
+ export function hasPasswordTypeOption(element) {
37
+ const typeOptionsProperty = findObjectProperty(element, 'typeOptions');
38
+ if (typeOptionsProperty?.value.type !== TSESTree.AST_NODE_TYPES.ObjectExpression) {
39
+ return false;
40
+ }
41
+ const passwordProperty = findObjectProperty(typeOptionsProperty.value, 'password');
42
+ const passwordValue = passwordProperty ? getBooleanLiteralValue(passwordProperty.value) : null;
43
+ return passwordValue === true;
44
+ }
45
+ //# sourceMappingURL=credential-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-fields.js","sourceRoot":"","sources":["../../src/utils/credential-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,kBAAkB,GAAG;IAC1B,UAAU;IACV,QAAQ;IACR,OAAO;IACP,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,SAAS;CACT,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAC9B,IAAY,EACZ,OAAO,GAAgD,EAAE;IAEzD,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,UAAU,GAAG,sBAAsB,EAAE,GAAG,OAAO,CAAC;IACpE,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAErC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAC/D,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO,CAAC,GAAG,kBAAkB,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,qBAAqB,CAAC,OAAkC;IACvE,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAEvE,IAAI,mBAAmB,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;QAClF,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACnF,MAAM,aAAa,GAAG,gBAAgB,CAAC,CAAC,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE/F,OAAO,aAAa,KAAK,IAAI,CAAC;AAC/B,CAAC"}
@@ -33,6 +33,12 @@ export declare function readPackageJsonNodes(packageJsonPath: string): string[];
33
33
  * `nodes/` directory.
34
34
  */
35
35
  export declare function findNodeSourceFilesOnDisk(packageJsonPath: string): string[];
36
+ /**
37
+ * Recursively finds files matching `matches` within the given subdirectories of
38
+ * the package (relative to its `package.json`). Missing subdirectories are
39
+ * skipped. Returns absolute paths.
40
+ */
41
+ export declare function findFilesInPackageDirs(packageJsonPath: string, dirs: string[], matches: (fileName: string) => boolean): string[];
36
42
  export declare function areAllCredentialUsagesTestedByNodes(credentialName: string, packageDir: string): boolean;
37
43
  export declare function findSimilarIconFiles(targetPath: string, baseDir: string): string[];
38
44
  //# sourceMappingURL=file-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAgB,iB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  }
186
186
  return findFilesRecursively(nodesDir, (fileName) => fileName.endsWith('.node.ts'));
187
187
  }
188
+ /**
189
+ * Recursively finds files matching `matches` within the given subdirectories of
190
+ * the package (relative to its `package.json`). Missing subdirectories are
191
+ * skipped. Returns absolute paths.
192
+ */
193
+ export function findFilesInPackageDirs(packageJsonPath, dirs, matches) {
194
+ const packageDir = dirname(packageJsonPath);
195
+ const results = [];
196
+ for (const dir of dirs) {
197
+ const fullPath = safeJoinPath(packageDir, dir);
198
+ if (existsSync(fullPath)) {
199
+ results.push(...findFilesRecursively(fullPath, matches));
200
+ }
201
+ }
202
+ return results;
203
+ }
188
204
  export function areAllCredentialUsagesTestedByNodes(credentialName, packageDir) {
189
205
  const packageJsonPath = safeJoinPath(packageDir, 'package.json');
190
206
  if (!existsSync(packageJsonPath)) {
@@ -1 +1 @@
1
- {"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,EACN,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB,EAAE,SAAiB;IACtE,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEpC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO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AExE,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACpC,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAC3E,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './ast-utils.js';
2
+ export * from './credential-fields.js';
3
+ export * from './constants.js';
2
4
  export * from './file-utils.js';
3
5
  export * from './rule-creator.js';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './ast-utils.js';
2
+ export * from './credential-fields.js';
3
+ export * from './constants.js';
2
4
  export * from './file-utils.js';
3
5
  export * from './rule-creator.js';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
- # Ensure credential fields with sensitive names have typeOptions.password = true (`@n8n/community-nodes/credential-password-field`)
1
+ # Ensure fields with sensitive names have typeOptions.password = true (`@n8n/community-nodes/credential-password-field`)
2
2
 
3
3
  💼 This rule is enabled in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
4
 
@@ -10,6 +10,8 @@
10
10
 
11
11
  Ensures that credential fields with names like "password", "secret", "token", or "key" are properly masked in the UI by having `typeOptions.password = true`.
12
12
 
13
+ The inverse case — non-sensitive fields that should **not** be masked — is covered by the separate [`credential-unnecessary-password`](credential-unnecessary-password.md) rule.
14
+
13
15
  ## Examples
14
16
 
15
17
  ### ❌ Incorrect
@@ -0,0 +1,46 @@
1
+ # Warn when a credential field with no sensitive name uses typeOptions.password = true (`@n8n/community-nodes/credential-unnecessary-password`)
2
+
3
+ ⚠️ This rule _warns_ in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ <!-- end auto-generated rule header -->
6
+
7
+ ## Rule Details
8
+
9
+ This is the inverse of [`credential-password-field`](credential-password-field.md). A field that clearly does not hold a secret — URLs, IDs, regions, and similar — should not be masked with `typeOptions.password = true`, since masking a non-secret value only hurts usability.
10
+
11
+ The check only flags a masked field when its name carries **no** sensitive marker at all (`password`, `secret`, `token`, `cert`, `key`-like words, …). A name that contains a sensitive marker is left alone even if it also looks like a URL or ID — for example `androidToken` is a real secret despite containing the substring `id`, so it is never flagged.
12
+
13
+ It is reported as a **warning without an autofix**: the sensitivity check is a name-based heuristic, so removing masking could be wrong for a secret whose name isn't in the recognised list. The author must confirm before removing it.
14
+
15
+ ## Examples
16
+
17
+ ### ❌ Incorrect
18
+
19
+ ```typescript
20
+ export class MyApiCredential implements ICredentialType {
21
+ properties: INodeProperties[] = [
22
+ {
23
+ displayName: 'Base URL',
24
+ name: 'baseUrl',
25
+ type: 'string',
26
+ default: '',
27
+ typeOptions: { password: true }, // A URL is not a secret
28
+ },
29
+ ];
30
+ }
31
+ ```
32
+
33
+ ### ✅ Correct
34
+
35
+ ```typescript
36
+ export class MyApiCredential implements ICredentialType {
37
+ properties: INodeProperties[] = [
38
+ {
39
+ displayName: 'Base URL',
40
+ name: 'baseUrl',
41
+ type: 'string',
42
+ default: '',
43
+ },
44
+ ];
45
+ }
46
+ ```
@@ -0,0 +1,56 @@
1
+ # Disallow leftover backup, editor, and test-artifact files in the `nodes/` and `credentials/` directories of a community node package (`@n8n/community-nodes/no-dead-files`)
2
+
3
+ ⚠️ This rule _warns_ in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ <!-- end auto-generated rule header -->
6
+
7
+ ## Rule Details
8
+
9
+ Community node packages sometimes ship stray files that were never meant to be
10
+ published: editor backups, scratch test scripts, or Windows "mark of the web"
11
+ alternate-data-stream files that leaked in when the package was zipped up on
12
+ another machine. These files add noise to the published artifact and are a
13
+ strong signal that the package was assembled by hand rather than from a clean
14
+ build.
15
+
16
+ This rule scans the package's `nodes/` and `credentials/` directories
17
+ (recursively) and reports any file whose name matches a known dead-file
18
+ pattern:
19
+
20
+ - `*.backup`
21
+ - `*.bak`
22
+ - `*Zone.Identifier` (Windows alternate-data-stream artifacts)
23
+ - `test.js`
24
+ - `test.ts`
25
+
26
+ The check is anchored on `package.json`, so it runs once per package regardless
27
+ of how many files match. It is reported as a **warning** — the files should be
28
+ removed before publishing, but their presence does not break the node at
29
+ runtime.
30
+
31
+ ## Examples
32
+
33
+ ### Incorrect
34
+
35
+ ```
36
+ nodes/
37
+ MyNode/
38
+ MyNode.node.ts
39
+ MyNode.node.ts.bak ← leftover editor backup
40
+ test.js ← stray test script
41
+ MyNode.node.ts:Zone.Identifier ← Windows mark-of-the-web artifact
42
+ credentials/
43
+ MyApi.credentials.ts
44
+ MyApi.credentials.ts.backup ← leftover editor backup
45
+ ```
46
+
47
+ ### Correct
48
+
49
+ ```
50
+ nodes/
51
+ MyNode/
52
+ MyNode.node.ts
53
+ MyNode.node.json
54
+ credentials/
55
+ MyApi.credentials.ts
56
+ ```
@@ -0,0 +1,59 @@
1
+ # Disallow hardcoded secrets (API keys, tokens, passwords) embedded as string literals in source (`@n8n/community-nodes/no-hardcoded-secrets`)
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
+ Credentials must never be committed to source. A hardcoded API key, token, or
10
+ password ends up in the package published to the community registry and in every
11
+ git history that ever contained it, where anyone can extract it.
12
+
13
+ This rule flags string literals that _look like_ real secrets: a value longer
14
+ than 16 characters, with the shape of a hex digest or a base64/token string,
15
+ assigned to a variable, property, or field whose name contains `key`, `secret`,
16
+ `token`, `password`, `passwd`, or `auth`.
17
+
18
+ Secrets belong in n8n credentials or environment variables, never in code:
19
+
20
+ ```typescript
21
+ // Read from the node's configured credential instead.
22
+ const credentials = await this.getCredentials('myServiceApi');
23
+ const apiKey = credentials.apiKey;
24
+ ```
25
+
26
+ > [!NOTE]
27
+ > This rule is heuristic and will produce some false positives — it supplements
28
+ > a human/automated security review, it does not replace one. When a flagged
29
+ > value is genuinely not a secret (for example a public constant that happens to
30
+ > look token-shaped), rename the variable so it no longer reads as a credential,
31
+ > or move the value out of the literal. Obvious placeholders (`your-...`,
32
+ > `example`, `changeme`, `xxxx`, `<...>`, `{{...}}`) are ignored automatically.
33
+
34
+ ## Examples
35
+
36
+ ### ❌ Incorrect
37
+
38
+ ```typescript
39
+ const apiKey = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0';
40
+
41
+ const config = { clientSecret: 'sk-1a2B3c4D5e6F7g8H9i0J-kLmNoP' };
42
+
43
+ class MyNode {
44
+ private authToken = 'ghp_1a2B3c4D5e6F7g8H9i0J0k1L2m3N4o5P6q7R';
45
+ }
46
+ ```
47
+
48
+ ### ✅ Correct
49
+
50
+ ```typescript
51
+ // Pull secrets from configured credentials at runtime.
52
+ const { apiKey } = await this.getCredentials('myServiceApi');
53
+
54
+ // Or from the environment.
55
+ const apiKey = process.env.MY_SERVICE_API_KEY;
56
+
57
+ // Placeholders and short/non-secret values are fine.
58
+ const apiKey = 'your-api-key-here';
59
+ ```
@@ -33,12 +33,26 @@ export class MyNode implements INodeType {
33
33
  ### ✅ Correct
34
34
 
35
35
  ```typescript
36
+ import { sleep } from 'n8n-workflow';
37
+
36
38
  export class MyNode implements INodeType {
37
39
  async execute(this: IExecuteFunctions) {
38
40
  // Use n8n context methods instead
39
41
  const timezone = this.getTimezone();
40
42
 
43
+ // Use the sleep helper instead of setTimeout
44
+ await sleep(1000);
45
+
41
46
  return this.prepareOutputData([]);
42
47
  }
43
48
  }
44
49
  ```
50
+
51
+ ## Alternatives to restricted timer globals
52
+
53
+ `n8n-workflow` exports helpers that work the same everywhere, including on
54
+ n8n Cloud, instead of reaching for the restricted timer globals directly:
55
+
56
+ - Instead of `setTimeout(resolve, ms)`, use `await sleep(ms)`.
57
+ - Instead of `setTimeout` + `clearTimeout` for a cancellable delay, use
58
+ `await sleepWithAbort(ms, abortSignal)`.
@@ -0,0 +1,72 @@
1
+ # Disallow webhook lifecycle methods (checkExists, create, delete) from silently swallowing errors in catch blocks (`@n8n/community-nodes/no-silent-error-swallowing`)
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
+ Webhook trigger nodes register, verify, and clean up webhooks on a third-party
10
+ service through the `webhookMethods` lifecycle (`checkExists`, `create`,
11
+ `delete`). When these methods catch an error and silently discard it — an empty
12
+ `catch` block, or one that only returns `true`/`false` without logging or
13
+ rethrowing — real failures become invisible. The user sees a webhook that
14
+ "succeeded" while it was never registered, a stale webhook that is never cleaned
15
+ up, or a workflow that quietly stops firing with no diagnostic to explain why.
16
+
17
+ This rule flags `catch` blocks inside the `checkExists`, `create`, and `delete`
18
+ methods of a node's `webhookMethods` that:
19
+
20
+ - have an empty body, or
21
+ - contain only a `return true`, `return false`, or bare `return` statement.
22
+
23
+ Handle the error instead: log it (so it surfaces in execution logs) and/or
24
+ rethrow it. A `catch` that logs before returning, rethrows, or returns a
25
+ computed value is allowed.
26
+
27
+ ## Examples
28
+
29
+ ### ❌ Incorrect
30
+
31
+ ```typescript
32
+ webhookMethods = {
33
+ default: {
34
+ async checkExists(this: IHookFunctions): Promise<boolean> {
35
+ try {
36
+ return await this.helpers.httpRequest({ url });
37
+ } catch (error) {}
38
+ },
39
+ async create(this: IHookFunctions): Promise<boolean> {
40
+ try {
41
+ return await this.helpers.httpRequest({ url });
42
+ } catch (error) {
43
+ return false;
44
+ }
45
+ },
46
+ },
47
+ };
48
+ ```
49
+
50
+ ### ✅ Correct
51
+
52
+ ```typescript
53
+ webhookMethods = {
54
+ default: {
55
+ async checkExists(this: IHookFunctions): Promise<boolean> {
56
+ try {
57
+ return await this.helpers.httpRequest({ url });
58
+ } catch (error) {
59
+ this.logger.error('checkExists failed', { error });
60
+ return false;
61
+ }
62
+ },
63
+ async create(this: IHookFunctions): Promise<boolean> {
64
+ try {
65
+ return await this.helpers.httpRequest({ url });
66
+ } catch (error) {
67
+ throw error;
68
+ }
69
+ },
70
+ },
71
+ };
72
+ ```
@@ -0,0 +1,43 @@
1
+ # Require a non-empty "files" array in package.json (`@n8n/community-nodes/require-files-array`)
2
+
3
+ ⚠️ This rule _warns_ in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ <!-- end auto-generated rule header -->
6
+
7
+ ## Rule Details
8
+
9
+ The `files` field in package.json controls which files are included when the
10
+ package is published to npm. Without it, every file in the package directory
11
+ gets published — including tests, source files, build artifacts, and config
12
+ files — bloating the published package and potentially leaking unintended
13
+ content.
14
+
15
+ Declaring an explicit, non-empty `files` array ensures only the intended files
16
+ (typically `dist` and any credential assets) are published.
17
+
18
+ ## Examples
19
+
20
+ ### Incorrect
21
+
22
+ ```json
23
+ {
24
+ "name": "n8n-nodes-example",
25
+ "version": "1.0.0"
26
+ }
27
+ ```
28
+
29
+ ```json
30
+ {
31
+ "name": "n8n-nodes-example",
32
+ "files": []
33
+ }
34
+ ```
35
+
36
+ ### Correct
37
+
38
+ ```json
39
+ {
40
+ "name": "n8n-nodes-example",
41
+ "files": ["dist"]
42
+ }
43
+ ```
@@ -0,0 +1,49 @@
1
+ # Require a "homepage" field with a valid URL in package.json (`@n8n/community-nodes/require-homepage`)
2
+
3
+ ⚠️ This rule _warns_ in the following configs: ✅ `recommended`, ☑️ `recommendedWithoutN8nCloudSupport`.
4
+
5
+ <!-- end auto-generated rule header -->
6
+
7
+ ## Rule Details
8
+
9
+ A published community node package should point users to a homepage — a
10
+ project website, repository, or documentation page — so they can learn more
11
+ about the node and its maintainer. This rule requires the `package.json` to
12
+ declare a `homepage` field that is a valid URL.
13
+
14
+ The value is parsed with the `URL` constructor, so it must include a protocol
15
+ (e.g. `https://`). Bare domains (`example.com`) and placeholder values (`TODO`)
16
+ are rejected.
17
+
18
+ ## Examples
19
+
20
+ ### ❌ Incorrect
21
+
22
+ ```json
23
+ {
24
+ "name": "n8n-nodes-my-service"
25
+ }
26
+ ```
27
+
28
+ ```json
29
+ {
30
+ "name": "n8n-nodes-my-service",
31
+ "homepage": ""
32
+ }
33
+ ```
34
+
35
+ ```json
36
+ {
37
+ "name": "n8n-nodes-my-service",
38
+ "homepage": "example.com"
39
+ }
40
+ ```
41
+
42
+ ### ✅ Correct
43
+
44
+ ```json
45
+ {
46
+ "name": "n8n-nodes-my-service",
47
+ "homepage": "https://github.com/acme/n8n-nodes-my-service"
48
+ }
49
+ ```
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.26.0",
4
+ "version": "0.28.0",
5
5
  "main": "./dist/plugin.js",
6
6
  "types": "./dist/plugin.d.ts",
7
7
  "exports": {
@@ -27,7 +27,7 @@
27
27
  "vitest": "^4.1.9",
28
28
  "@n8n/typescript-config": "1.9.0",
29
29
  "@n8n/vitest-config": "1.19.0",
30
- "n8n-workflow": "2.32.0"
30
+ "n8n-workflow": "2.34.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "eslint": "9.29.0",