@n8n/eslint-plugin-community-nodes 0.20.0 β†’ 0.22.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 (101) hide show
  1. package/.turbo/turbo-build$colon$unchecked.log +1 -1
  2. package/README.md +47 -38
  3. package/dist/plugin.d.ts +54 -0
  4. package/dist/plugin.d.ts.map +1 -1
  5. package/dist/plugin.js +18 -0
  6. package/dist/plugin.js.map +1 -1
  7. package/dist/rules/ai-node-package-json.d.ts.map +1 -1
  8. package/dist/rules/ai-node-package-json.js +4 -3
  9. package/dist/rules/ai-node-package-json.js.map +1 -1
  10. package/dist/rules/cred-filename-against-convention.d.ts +2 -0
  11. package/dist/rules/cred-filename-against-convention.d.ts.map +1 -0
  12. package/dist/rules/cred-filename-against-convention.js +42 -0
  13. package/dist/rules/cred-filename-against-convention.js.map +1 -0
  14. package/dist/rules/icon-prefer-themed-variants.d.ts +2 -0
  15. package/dist/rules/icon-prefer-themed-variants.d.ts.map +1 -0
  16. package/dist/rules/icon-prefer-themed-variants.js +53 -0
  17. package/dist/rules/icon-prefer-themed-variants.js.map +1 -0
  18. package/dist/rules/icon-validation.d.ts +1 -1
  19. package/dist/rules/icon-validation.d.ts.map +1 -1
  20. package/dist/rules/icon-validation.js +4 -25
  21. package/dist/rules/icon-validation.js.map +1 -1
  22. package/dist/rules/index.d.ts +10 -1
  23. package/dist/rules/index.d.ts.map +1 -1
  24. package/dist/rules/index.js +18 -0
  25. package/dist/rules/index.js.map +1 -1
  26. package/dist/rules/no-dangerous-functions.d.ts +2 -0
  27. package/dist/rules/no-dangerous-functions.d.ts.map +1 -0
  28. package/dist/rules/no-dangerous-functions.js +121 -0
  29. package/dist/rules/no-dangerous-functions.js.map +1 -0
  30. package/dist/rules/no-emoji-in-options.d.ts +2 -0
  31. package/dist/rules/no-emoji-in-options.d.ts.map +1 -0
  32. package/dist/rules/no-emoji-in-options.js +86 -0
  33. package/dist/rules/no-emoji-in-options.js.map +1 -0
  34. package/dist/rules/node-class-description-name-camelcase.d.ts +2 -0
  35. package/dist/rules/node-class-description-name-camelcase.d.ts.map +1 -0
  36. package/dist/rules/node-class-description-name-camelcase.js +92 -0
  37. package/dist/rules/node-class-description-name-camelcase.js.map +1 -0
  38. package/dist/rules/node-filename-against-convention.d.ts +2 -0
  39. package/dist/rules/node-filename-against-convention.d.ts.map +1 -0
  40. package/dist/rules/node-filename-against-convention.js +61 -0
  41. package/dist/rules/node-filename-against-convention.js.map +1 -0
  42. package/dist/rules/node-registration-complete.d.ts +2 -0
  43. package/dist/rules/node-registration-complete.d.ts.map +1 -0
  44. package/dist/rules/node-registration-complete.js +60 -0
  45. package/dist/rules/node-registration-complete.js.map +1 -0
  46. package/dist/rules/require-version.d.ts +2 -0
  47. package/dist/rules/require-version.d.ts.map +1 -0
  48. package/dist/rules/require-version.js +50 -0
  49. package/dist/rules/require-version.js.map +1 -0
  50. package/dist/rules/valid-author.d.ts +2 -0
  51. package/dist/rules/valid-author.d.ts.map +1 -0
  52. package/dist/rules/valid-author.js +89 -0
  53. package/dist/rules/valid-author.js.map +1 -0
  54. package/dist/rules/valid-peer-dependencies.d.ts.map +1 -1
  55. package/dist/rules/valid-peer-dependencies.js +5 -3
  56. package/dist/rules/valid-peer-dependencies.js.map +1 -1
  57. package/dist/typecheck.tsbuildinfo +1 -0
  58. package/dist/utils/file-utils.d.ts +7 -2
  59. package/dist/utils/file-utils.d.ts.map +1 -1
  60. package/dist/utils/file-utils.js +47 -10
  61. package/dist/utils/file-utils.js.map +1 -1
  62. package/docs/rules/cred-filename-against-convention.md +42 -0
  63. package/docs/rules/icon-prefer-themed-variants.md +71 -0
  64. package/docs/rules/icon-validation.md +5 -3
  65. package/docs/rules/no-dangerous-functions.md +41 -0
  66. package/docs/rules/no-emoji-in-options.md +60 -0
  67. package/docs/rules/node-class-description-name-camelcase.md +41 -0
  68. package/docs/rules/node-filename-against-convention.md +50 -0
  69. package/docs/rules/node-registration-complete.md +46 -0
  70. package/docs/rules/require-version.md +51 -0
  71. package/docs/rules/valid-author.md +60 -0
  72. package/docs/rules/valid-peer-dependencies.md +1 -1
  73. package/package.json +4 -4
  74. package/src/plugin.ts +18 -0
  75. package/src/rules/ai-node-package-json.test.ts +5 -0
  76. package/src/rules/ai-node-package-json.ts +4 -3
  77. package/src/rules/cred-filename-against-convention.test.ts +72 -0
  78. package/src/rules/cred-filename-against-convention.ts +48 -0
  79. package/src/rules/icon-prefer-themed-variants.test.ts +128 -0
  80. package/src/rules/icon-prefer-themed-variants.ts +70 -0
  81. package/src/rules/icon-validation.test.ts +10 -0
  82. package/src/rules/icon-validation.ts +4 -28
  83. package/src/rules/index.ts +18 -0
  84. package/src/rules/no-dangerous-functions.test.ts +83 -0
  85. package/src/rules/no-dangerous-functions.ts +155 -0
  86. package/src/rules/no-emoji-in-options.test.ts +157 -0
  87. package/src/rules/no-emoji-in-options.ts +105 -0
  88. package/src/rules/node-class-description-name-camelcase.test.ts +121 -0
  89. package/src/rules/node-class-description-name-camelcase.ts +114 -0
  90. package/src/rules/node-filename-against-convention.test.ts +115 -0
  91. package/src/rules/node-filename-against-convention.ts +76 -0
  92. package/src/rules/node-registration-complete.test.ts +87 -0
  93. package/src/rules/node-registration-complete.ts +79 -0
  94. package/src/rules/require-version.test.ts +90 -0
  95. package/src/rules/require-version.ts +62 -0
  96. package/src/rules/valid-author.test.ts +108 -0
  97. package/src/rules/valid-author.ts +100 -0
  98. package/src/rules/valid-peer-dependencies.test.ts +5 -0
  99. package/src/rules/valid-peer-dependencies.ts +5 -3
  100. package/src/utils/file-utils.ts +58 -11
  101. package/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,42 @@
1
+ import * as path from 'node:path';
2
+ import { isCredentialTypeClass, isFileType, createRule } from '../utils/index.js';
3
+ export const CredFilenameAgainstConventionRule = createRule({
4
+ name: 'cred-filename-against-convention',
5
+ meta: {
6
+ type: 'problem',
7
+ docs: {
8
+ description: 'Credential filename must match the credential class name',
9
+ },
10
+ messages: {
11
+ renameFile: 'Credential filename must match the class name "{{className}}". Rename file to "{{expected}}".',
12
+ },
13
+ schema: [],
14
+ },
15
+ defaultOptions: [],
16
+ create(context) {
17
+ if (!isFileType(context.filename, '.credentials.ts')) {
18
+ return {};
19
+ }
20
+ return {
21
+ ClassDeclaration(node) {
22
+ if (!isCredentialTypeClass(node)) {
23
+ return;
24
+ }
25
+ const classNameNode = node.id;
26
+ if (!classNameNode) {
27
+ return;
28
+ }
29
+ const className = classNameNode.name;
30
+ const actualBaseName = path.basename(context.filename, '.credentials.ts');
31
+ if (actualBaseName !== className) {
32
+ context.report({
33
+ node: classNameNode,
34
+ messageId: 'renameFile',
35
+ data: { className, expected: `${className}.credentials.ts` },
36
+ });
37
+ }
38
+ },
39
+ };
40
+ },
41
+ });
42
+ //# sourceMappingURL=cred-filename-against-convention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cred-filename-against-convention.js","sourceRoot":"","sources":["../../src/rules/cred-filename-against-convention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElF,MAAM,CAAC,MAAM,iCAAiC,GAAG,UAAU,CAAC;IAC3D,IAAI,EAAE,kCAAkC;IACxC,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EAAE,0DAA0D;SACvE;QACD,QAAQ,EAAE;YACT,UAAU,EACT,+FAA+F;SAChG;QACD,MAAM,EAAE,EAAE;KACV;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACb,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAAE,CAAC;YACtD,OAAO,EAAE,CAAC;QACX,CAAC;QAED,OAAO;YACN,gBAAgB,CAAC,IAAI;gBACpB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClC,OAAO;gBACR,CAAC;gBAED,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC;gBAC9B,IAAI,CAAC,aAAa,EAAE,CAAC;oBACpB,OAAO;gBACR,CAAC;gBAED,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC;gBACrC,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;gBAE1E,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;oBAClC,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI,EAAE,aAAa;wBACnB,SAAS,EAAE,YAAY;wBACvB,IAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,iBAAiB,EAAE;qBAC5D,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const IconPreferThemedVariantsRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingThemedVariants", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ //# sourceMappingURL=icon-prefer-themed-variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-prefer-themed-variants.d.ts","sourceRoot":"","sources":["../../src/rules/icon-prefer-themed-variants.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,4BAA4B,0JAqDvC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ import { isNodeTypeClass, isCredentialTypeClass, findClassProperty, findObjectProperty, isFileType, createRule, } from '../utils/index.js';
3
+ const messages = {
4
+ missingThemedVariants: 'Icon is defined as a single file. Provide both light and dark variants using the `{ light, dark }` form so the icon renders well on both themes.',
5
+ };
6
+ export const IconPreferThemedVariantsRule = createRule({
7
+ name: 'icon-prefer-themed-variants',
8
+ meta: {
9
+ type: 'suggestion',
10
+ docs: {
11
+ description: 'Encourage node and credential icons to provide light/dark variants instead of a single icon file',
12
+ },
13
+ messages,
14
+ schema: [],
15
+ },
16
+ defaultOptions: [],
17
+ create(context) {
18
+ if (!isFileType(context.filename, '.node.ts') &&
19
+ !isFileType(context.filename, '.credentials.ts')) {
20
+ return {};
21
+ }
22
+ const checkIconValue = (iconValue) => {
23
+ if (iconValue.type === TSESTree.AST_NODE_TYPES.Literal &&
24
+ typeof iconValue.value === 'string') {
25
+ context.report({
26
+ node: iconValue,
27
+ messageId: 'missingThemedVariants',
28
+ });
29
+ }
30
+ };
31
+ return {
32
+ ClassDeclaration(node) {
33
+ if (isNodeTypeClass(node)) {
34
+ const descriptionProperty = findClassProperty(node, 'description');
35
+ if (descriptionProperty?.value?.type !== TSESTree.AST_NODE_TYPES.ObjectExpression) {
36
+ return;
37
+ }
38
+ const iconProperty = findObjectProperty(descriptionProperty.value, 'icon');
39
+ if (iconProperty) {
40
+ checkIconValue(iconProperty.value);
41
+ }
42
+ }
43
+ else if (isCredentialTypeClass(node)) {
44
+ const iconProperty = findClassProperty(node, 'icon');
45
+ if (iconProperty?.value) {
46
+ checkIconValue(iconProperty.value);
47
+ }
48
+ }
49
+ },
50
+ };
51
+ },
52
+ });
53
+ //# sourceMappingURL=icon-prefer-themed-variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-prefer-themed-variants.js","sourceRoot":"","sources":["../../src/rules/icon-prefer-themed-variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EACN,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,UAAU,GACV,MAAM,mBAAmB,CAAC;AAE3B,MAAM,QAAQ,GAAG;IAChB,qBAAqB,EACpB,kJAAkJ;CAC1I,CAAC;AAEX,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACtD,IAAI,EAA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EAAE,MAAM,CAAC,CAAC;oBACrD,IAAI,YAAY,EAAE,KAAK,EAAE,CAAC;wBACzB,cAAc,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpC,CAAC;gBACF,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const IconValidationRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder" | "iconFileNotFound" | "iconNotSvg" | "lightDarkSame" | "invalidIconPath" | "addFileProtocol" | "changeExtension" | "similarIcon", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
1
+ export declare const IconValidationRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder" | "iconFileNotFound" | "lightDarkSame" | "invalidIconPath" | "addFileProtocol" | "similarIcon", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
2
  //# sourceMappingURL=icon-validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-validation.d.ts","sourceRoot":"","sources":["../../src/rules/icon-validation.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,kBAAkB,qSAkN7B,CAAC"}
1
+ {"version":3,"file":"icon-validation.d.ts","sourceRoot":"","sources":["../../src/rules/icon-validation.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,kBAAkB,kQA4L7B,CAAC"}
@@ -1,15 +1,13 @@
1
1
  import { TSESTree } from '@typescript-eslint/utils';
2
2
  import { dirname } from 'node:path';
3
- import { isNodeTypeClass, isCredentialTypeClass, findClassProperty, findObjectProperty, getStringLiteralValue, validateIconPath, findSimilarSvgFiles, isFileType, createRule, } from '../utils/index.js';
3
+ import { isNodeTypeClass, isCredentialTypeClass, findClassProperty, findObjectProperty, getStringLiteralValue, validateIconPath, findSimilarIconFiles, isFileType, createRule, } from '../utils/index.js';
4
4
  const messages = {
5
5
  iconFileNotFound: 'Icon file "{{ iconPath }}" does not exist',
6
- iconNotSvg: 'Icon file "{{ iconPath }}" must be an SVG file (end with .svg)',
7
6
  lightDarkSame: 'Light and dark icons cannot be the same file. Both point to "{{ iconPath }}"',
8
7
  invalidIconPath: 'Icon path "{{ iconPath }}" must use file: protocol and be a string',
9
8
  missingIcon: 'Node/Credential class must have an icon property defined',
10
9
  addPlaceholder: 'Add icon property with placeholder',
11
10
  addFileProtocol: "Add 'file:' protocol to icon path",
12
- changeExtension: "Change icon extension to '.svg'",
13
11
  similarIcon: "Use existing icon '{{ suggestedName }}'",
14
12
  };
15
13
  export const IconValidationRule = createRule({
@@ -17,7 +15,7 @@ export const IconValidationRule = createRule({
17
15
  meta: {
18
16
  type: 'problem',
19
17
  docs: {
20
- description: 'Validate node and credential icon files exist, are SVG format, and light/dark icons are different',
18
+ description: 'Validate node and credential icon files exist, use the file: protocol, and that light/dark icons are different',
21
19
  },
22
20
  messages,
23
21
  schema: [],
@@ -58,30 +56,11 @@ export const IconValidationRule = createRule({
58
56
  });
59
57
  return false;
60
58
  }
61
- if (!validation.isSvg) {
62
- const relativePath = iconPath.replace(/^file:/, '');
63
- const suggestions = [];
64
- const pathWithoutExt = relativePath.replace(/\.[^/.]+$/, '');
65
- const svgPath = `${pathWithoutExt}.svg`;
66
- suggestions.push({
67
- messageId: 'changeExtension',
68
- fix(fixer) {
69
- return fixer.replaceText(node, `"file:${svgPath}"`);
70
- },
71
- });
72
- context.report({
73
- node,
74
- messageId: 'iconNotSvg',
75
- data: { iconPath: relativePath },
76
- suggest: suggestions,
77
- });
78
- return false;
79
- }
80
59
  if (!validation.exists) {
81
60
  const relativePath = iconPath.replace(/^file:/, '');
82
61
  const suggestions = [];
83
- // Find similar SVG files in the same directory
84
- const similarFiles = findSimilarSvgFiles(relativePath, currentDir);
62
+ // Find similar icon files in the same directory
63
+ const similarFiles = findSimilarIconFiles(relativePath, currentDir);
85
64
  for (const similarFile of similarFiles) {
86
65
  suggestions.push({
87
66
  messageId: 'similarIcon',
@@ -1 +1 @@
1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oBAED,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC;qBAAM,IAAI,iBAAiB,EAAE,CAAC;oBAC9B,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;oBACrD,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC;wBAC1B,MAAM,WAAW,GAAiD,EAAE,CAAC;wBAErE,WAAW,CAAC,IAAI,CAAC;4BAChB,SAAS,EAAE,gBAAgB;4BAC3B,GAAG,CAAC,KAAK;gCACR,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gCACjC,MAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gCACrD,IAAI,YAAY,EAAE,CAAC;oCAClB,OAAO,KAAK,CAAC,eAAe,CAAC,YAAY,EAAE,iCAAiC,CAAC,CAAC;gCAC/E,CAAC;gCACD,OAAO,IAAI,CAAC;4BACb,CAAC;yBACD,CAAC,CAAC;wBAEH,OAAO,CAAC,MAAM,CAAC;4BACd,IAAI;4BACJ,SAAS,EAAE,aAAa;4BACxB,OAAO,EAAE,WAAW;yBACpB,CAAC,CAAC;wBACH,OAAO;oBACR,CAAC;oBAED,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -4,29 +4,36 @@ export declare const rules: {
4
4
  'no-restricted-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule<"restrictedImport" | "restrictedRequire" | "restrictedDynamicImport", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
5
5
  'credential-password-field': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingPasswordOption", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
6
6
  'no-deprecated-workflow-functions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedRequestFunction" | "deprecatedFunction" | "deprecatedType" | "deprecatedWithoutReplacement" | "suggestReplaceFunction" | "suggestReplaceType", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
7
+ 'no-emoji-in-options': import("@typescript-eslint/utils/ts-eslint").RuleModule<"emojiInOption", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
7
8
  'node-usable-as-tool': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingUsableAsTool", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
8
9
  'options-sorted-alphabetically': import("@typescript-eslint/utils/ts-eslint").RuleModule<"optionsNotSorted", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
9
10
  'package-name-convention': import("@typescript-eslint/utils/ts-eslint").RuleModule<"renameTo" | "invalidPackageName" | "missingName" | "defaultPlaceholderName", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
10
11
  'credential-test-required': import("@typescript-eslint/utils/ts-eslint").RuleModule<"addTemplate" | "missingCredentialTest", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
11
12
  'no-credential-reuse': import("@typescript-eslint/utils/ts-eslint").RuleModule<"didYouMean" | "useAvailable" | "credentialNotInPackage", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
13
+ 'no-dangerous-functions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noEval" | "noFunctionConstructor" | "noChildProcess", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
12
14
  'no-forbidden-lifecycle-scripts': import("@typescript-eslint/utils/ts-eslint").RuleModule<"forbiddenScript", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
13
15
  'no-http-request-with-manual-auth': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useHttpRequestWithAuthentication", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
14
16
  'no-overrides-field': import("@typescript-eslint/utils/ts-eslint").RuleModule<"overridesForbidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
15
17
  'no-runtime-dependencies': import("@typescript-eslint/utils/ts-eslint").RuleModule<"runtimeDependenciesForbidden", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
16
18
  'no-template-placeholders': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unresolvedPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
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>;
19
+ 'icon-validation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder" | "iconFileNotFound" | "lightDarkSame" | "invalidIconPath" | "addFileProtocol" | "similarIcon", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
20
+ 'icon-prefer-themed-variants': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingThemedVariants", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
18
21
  'resource-operation-pattern': import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooManyOperationsWithoutResources", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
19
22
  'credential-documentation-url': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidDocumentationUrl", [{
20
23
  allowUrls?: boolean;
21
24
  allowSlugs?: boolean;
22
25
  }], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
23
26
  'node-class-description-icon-missing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
27
+ 'node-class-description-name-camelcase': import("@typescript-eslint/utils/ts-eslint").RuleModule<"notCamelCase", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
24
28
  'cred-class-field-icon-missing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingIcon" | "addPlaceholder", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
25
29
  'cred-class-name-field-conventions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingSuffix" | "uppercaseFirstChar", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
26
30
  'cred-class-name-suffix': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingSuffix", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
27
31
  'cred-class-oauth2-naming': import("@typescript-eslint/utils/ts-eslint").RuleModule<"classNameMissingOAuth2" | "nameMissingOAuth2" | "displayNameMissingOAuth2", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
32
+ 'cred-filename-against-convention': import("@typescript-eslint/utils/ts-eslint").RuleModule<"renameFile", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
28
33
  'node-connection-type-literal': import("@typescript-eslint/utils/ts-eslint").RuleModule<"stringLiteralInInputs" | "stringLiteralInOutputs" | "unknownStringLiteralInInputs" | "unknownStringLiteralInOutputs", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
34
+ 'node-filename-against-convention': import("@typescript-eslint/utils/ts-eslint").RuleModule<"renameFile", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
29
35
  'node-operation-error-itemindex': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingItemIndex", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
36
+ 'node-registration-complete': import("@typescript-eslint/utils/ts-eslint").RuleModule<"nodeNotRegistered", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
30
37
  'missing-paired-item': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingPairedItem", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
31
38
  'no-builder-hint-leakage': import("@typescript-eslint/utils/ts-eslint").RuleModule<"wireExpression" | "connectionTypeLiteral", [{
32
39
  scope?: "builderHint" | "all";
@@ -36,6 +43,8 @@ export declare const rules: {
36
43
  'require-continue-on-fail': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingContinueOnFail", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
37
44
  'require-node-api-error': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNodeApiError" | "useNodeApiErrorInsteadOfGeneric", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
38
45
  'require-node-description-fields': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingField" | "missingFields", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
46
+ 'require-version': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingVersion" | "invalidVersion", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
47
+ 'valid-author': import("@typescript-eslint/utils/ts-eslint").RuleModule<"authorMissing" | "authorNameMissing" | "authorEmailMissing", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
39
48
  'valid-credential-references': import("@typescript-eslint/utils/ts-eslint").RuleModule<"didYouMean" | "credentialNotFound", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
40
49
  'valid-description': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingDescription" | "emptyDescription", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
41
50
  'valid-peer-dependencies': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingPeerDependencies" | "invalidPeerDependenciesType" | "missingN8nWorkflow" | "pinnedN8nWorkflow" | "forbiddenPeerDependency", [], 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":"AAuCA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CuB,CAAC"}
@@ -3,15 +3,19 @@ import { CredClassFieldIconMissingRule } from './cred-class-field-icon-missing.j
3
3
  import { CredClassNameFieldConventionsRule } from './cred-class-name-field-conventions.js';
4
4
  import { CredClassNameSuffixRule } from './cred-class-name-suffix.js';
5
5
  import { CredClassOAuth2NamingRule } from './cred-class-oauth2-naming.js';
6
+ import { CredFilenameAgainstConventionRule } from './cred-filename-against-convention.js';
6
7
  import { CredentialDocumentationUrlRule } from './credential-documentation-url.js';
7
8
  import { CredentialPasswordFieldRule } from './credential-password-field.js';
8
9
  import { CredentialTestRequiredRule } from './credential-test-required.js';
10
+ import { IconPreferThemedVariantsRule } from './icon-prefer-themed-variants.js';
9
11
  import { IconValidationRule } from './icon-validation.js';
10
12
  import { MissingPairedItemRule } from './missing-paired-item.js';
11
13
  import { N8nObjectValidationRule } from './n8n-object-validation.js';
12
14
  import { NoBuilderHintLeakageRule } from './no-builder-hint-leakage.js';
13
15
  import { NoCredentialReuseRule } from './no-credential-reuse.js';
16
+ import { NoDangerousFunctionsRule } from './no-dangerous-functions.js';
14
17
  import { NoDeprecatedWorkflowFunctionsRule } from './no-deprecated-workflow-functions.js';
18
+ import { NoEmojiInOptionsRule } from './no-emoji-in-options.js';
15
19
  import { NoForbiddenLifecycleScriptsRule } from './no-forbidden-lifecycle-scripts.js';
16
20
  import { NoHttpRequestWithManualAuthRule } from './no-http-request-with-manual-auth.js';
17
21
  import { NoOverridesFieldRule } from './no-overrides-field.js';
@@ -20,8 +24,11 @@ import { NoRestrictedImportsRule } from './no-restricted-imports.js';
20
24
  import { NoRuntimeDependenciesRule } from './no-runtime-dependencies.js';
21
25
  import { NoTemplatePlaceholdersRule } from './no-template-placeholders.js';
22
26
  import { NodeClassDescriptionIconMissingRule } from './node-class-description-icon-missing.js';
27
+ import { NodeClassDescriptionNameCamelCaseRule } from './node-class-description-name-camelcase.js';
23
28
  import { NodeConnectionTypeLiteralRule } from './node-connection-type-literal.js';
29
+ import { NodeFilenameAgainstConventionRule } from './node-filename-against-convention.js';
24
30
  import { NodeOperationErrorItemIndexRule } from './node-operation-error-itemindex.js';
31
+ import { NodeRegistrationCompleteRule } from './node-registration-complete.js';
25
32
  import { NodeUsableAsToolRule } from './node-usable-as-tool.js';
26
33
  import { OptionsSortedAlphabeticallyRule } from './options-sorted-alphabetically.js';
27
34
  import { PackageNameConventionRule } from './package-name-convention.js';
@@ -29,7 +36,9 @@ import { RequireCommunityNodeKeywordRule } from './require-community-node-keywor
29
36
  import { RequireContinueOnFailRule } from './require-continue-on-fail.js';
30
37
  import { RequireNodeApiErrorRule } from './require-node-api-error.js';
31
38
  import { RequireNodeDescriptionFieldsRule } from './require-node-description-fields.js';
39
+ import { RequireVersionRule } from './require-version.js';
32
40
  import { ResourceOperationPatternRule } from './resource-operation-pattern.js';
41
+ import { ValidAuthorRule } from './valid-author.js';
33
42
  import { ValidCredentialReferencesRule } from './valid-credential-references.js';
34
43
  import { ValidDescriptionRule } from './valid-description.js';
35
44
  import { ValidPeerDependenciesRule } from './valid-peer-dependencies.js';
@@ -40,26 +49,33 @@ export const rules = {
40
49
  'no-restricted-imports': NoRestrictedImportsRule,
41
50
  'credential-password-field': CredentialPasswordFieldRule,
42
51
  'no-deprecated-workflow-functions': NoDeprecatedWorkflowFunctionsRule,
52
+ 'no-emoji-in-options': NoEmojiInOptionsRule,
43
53
  'node-usable-as-tool': NodeUsableAsToolRule,
44
54
  'options-sorted-alphabetically': OptionsSortedAlphabeticallyRule,
45
55
  'package-name-convention': PackageNameConventionRule,
46
56
  'credential-test-required': CredentialTestRequiredRule,
47
57
  'no-credential-reuse': NoCredentialReuseRule,
58
+ 'no-dangerous-functions': NoDangerousFunctionsRule,
48
59
  'no-forbidden-lifecycle-scripts': NoForbiddenLifecycleScriptsRule,
49
60
  'no-http-request-with-manual-auth': NoHttpRequestWithManualAuthRule,
50
61
  'no-overrides-field': NoOverridesFieldRule,
51
62
  'no-runtime-dependencies': NoRuntimeDependenciesRule,
52
63
  'no-template-placeholders': NoTemplatePlaceholdersRule,
53
64
  'icon-validation': IconValidationRule,
65
+ 'icon-prefer-themed-variants': IconPreferThemedVariantsRule,
54
66
  'resource-operation-pattern': ResourceOperationPatternRule,
55
67
  'credential-documentation-url': CredentialDocumentationUrlRule,
56
68
  'node-class-description-icon-missing': NodeClassDescriptionIconMissingRule,
69
+ 'node-class-description-name-camelcase': NodeClassDescriptionNameCamelCaseRule,
57
70
  'cred-class-field-icon-missing': CredClassFieldIconMissingRule,
58
71
  'cred-class-name-field-conventions': CredClassNameFieldConventionsRule,
59
72
  'cred-class-name-suffix': CredClassNameSuffixRule,
60
73
  'cred-class-oauth2-naming': CredClassOAuth2NamingRule,
74
+ 'cred-filename-against-convention': CredFilenameAgainstConventionRule,
61
75
  'node-connection-type-literal': NodeConnectionTypeLiteralRule,
76
+ 'node-filename-against-convention': NodeFilenameAgainstConventionRule,
62
77
  'node-operation-error-itemindex': NodeOperationErrorItemIndexRule,
78
+ 'node-registration-complete': NodeRegistrationCompleteRule,
63
79
  'missing-paired-item': MissingPairedItemRule,
64
80
  'no-builder-hint-leakage': NoBuilderHintLeakageRule,
65
81
  'n8n-object-validation': N8nObjectValidationRule,
@@ -67,6 +83,8 @@ export const rules = {
67
83
  'require-continue-on-fail': RequireContinueOnFailRule,
68
84
  'require-node-api-error': RequireNodeApiErrorRule,
69
85
  'require-node-description-fields': RequireNodeDescriptionFieldsRule,
86
+ 'require-version': RequireVersionRule,
87
+ 'valid-author': ValidAuthorRule,
70
88
  'valid-credential-references': ValidCredentialReferencesRule,
71
89
  'valid-description': ValidDescriptionRule,
72
90
  'valid-peer-dependencies': ValidPeerDependenciesRule,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"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qC,EAAE,mCAAmC;IAC1E,uCAAuC,EAAE,qCAAqC;IAC9E,+BAA+B,EAAE,6BAA6B;IAC9D,mCAAmC,EAAE,iCAAiC;IACtE,wBAAwB,EAAE,uBAAuB;IACjD,0BAA0B,EAAE,yBAAyB;IACrD,kCAAkC,EAAE,iCAAiC;IACrE,8BAA8B,EAAE,6BAA6B;IAC7D,kCAAkC,EAAE,iCAAiC;IACrE,gCAAgC,EAAE,+BAA+B;IACjE,4BAA4B,EAAE,4BAA4B;IAC1D,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,iBAAiB,EAAE,kBAAkB;IACrC,cAAc,EAAE,eAAe;IAC/B,6BAA6B,EAAE,6BAA6B;IAC5D,mBAAmB,EAAE,oBAAoB;IACzC,yBAAyB,EAAE,yBAAyB;IACpD,4BAA4B,EAAE,4BAA4B;CAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const NoDangerousFunctionsRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noEval" | "noFunctionConstructor" | "noChildProcess", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ //# sourceMappingURL=no-dangerous-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-dangerous-functions.d.ts","sourceRoot":"","sources":["../../src/rules/no-dangerous-functions.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,wBAAwB,wLA0HnC,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ import { createRule, getModulePath, isDirectRequireCall, isRequireMemberCall, } from '../utils/index.js';
3
+ const { AST_NODE_TYPES } = TSESTree;
4
+ const CHILD_PROCESS_MODULES = new Set(['child_process', 'node:child_process']);
5
+ /**
6
+ * `child_process` functions that spawn OS processes and are therefore
7
+ * vulnerable to command injection when fed untrusted input.
8
+ */
9
+ const DANGEROUS_CHILD_PROCESS_FUNCTIONS = new Set([
10
+ 'exec',
11
+ 'execSync',
12
+ 'execFile',
13
+ 'execFileSync',
14
+ 'spawn',
15
+ 'spawnSync',
16
+ 'fork',
17
+ ]);
18
+ const isChildProcessModule = (node) => {
19
+ const modulePath = getModulePath(node);
20
+ return modulePath !== null && CHILD_PROCESS_MODULES.has(modulePath);
21
+ };
22
+ export const NoDangerousFunctionsRule = createRule({
23
+ name: 'no-dangerous-functions',
24
+ meta: {
25
+ type: 'problem',
26
+ docs: {
27
+ description: 'Disallow `eval`, the `Function` constructor, and `child_process` process-spawning functions (`exec`, `spawn`, etc.) in community nodes.',
28
+ },
29
+ messages: {
30
+ noEval: 'Use of `eval` is not allowed. It executes arbitrary code and is a common source of remote code execution vulnerabilities.',
31
+ noFunctionConstructor: 'Use of the `Function` constructor is not allowed. Like `eval`, it executes arbitrary code from strings.',
32
+ noChildProcess: 'Use of `{{ name }}` from `child_process` is not allowed. Spawning OS processes is not permitted in community nodes and can lead to command injection.',
33
+ },
34
+ schema: [],
35
+ },
36
+ defaultOptions: [],
37
+ create(context) {
38
+ // Local names bound to dangerous named imports, e.g. `import { exec as run }` -> `run`.
39
+ const dangerousLocalNames = new Map();
40
+ // Local names bound to the whole module, e.g. `import * as cp` or `const cp = require(...)`.
41
+ const namespaceNames = new Set();
42
+ const recordDestructuredModule = (pattern) => {
43
+ for (const property of pattern.properties) {
44
+ if (property.type !== AST_NODE_TYPES.Property ||
45
+ property.key.type !== AST_NODE_TYPES.Identifier ||
46
+ !DANGEROUS_CHILD_PROCESS_FUNCTIONS.has(property.key.name)) {
47
+ continue;
48
+ }
49
+ if (property.value.type === AST_NODE_TYPES.Identifier) {
50
+ dangerousLocalNames.set(property.value.name, property.key.name);
51
+ }
52
+ }
53
+ };
54
+ return {
55
+ ImportDeclaration(node) {
56
+ if (!CHILD_PROCESS_MODULES.has(node.source.value))
57
+ return;
58
+ for (const specifier of node.specifiers) {
59
+ if (specifier.type === AST_NODE_TYPES.ImportSpecifier &&
60
+ specifier.imported.type === AST_NODE_TYPES.Identifier &&
61
+ DANGEROUS_CHILD_PROCESS_FUNCTIONS.has(specifier.imported.name)) {
62
+ dangerousLocalNames.set(specifier.local.name, specifier.imported.name);
63
+ }
64
+ else if (specifier.type === AST_NODE_TYPES.ImportNamespaceSpecifier ||
65
+ specifier.type === AST_NODE_TYPES.ImportDefaultSpecifier) {
66
+ namespaceNames.add(specifier.local.name);
67
+ }
68
+ }
69
+ },
70
+ VariableDeclarator(node) {
71
+ if (node.init?.type !== AST_NODE_TYPES.CallExpression ||
72
+ !(isDirectRequireCall(node.init) || isRequireMemberCall(node.init)) ||
73
+ !isChildProcessModule(node.init.arguments[0] ?? null)) {
74
+ return;
75
+ }
76
+ if (node.id.type === AST_NODE_TYPES.ObjectPattern) {
77
+ recordDestructuredModule(node.id);
78
+ }
79
+ else if (node.id.type === AST_NODE_TYPES.Identifier) {
80
+ namespaceNames.add(node.id.name);
81
+ }
82
+ },
83
+ NewExpression(node) {
84
+ if (node.callee.type === AST_NODE_TYPES.Identifier && node.callee.name === 'Function') {
85
+ context.report({ node, messageId: 'noFunctionConstructor' });
86
+ }
87
+ },
88
+ CallExpression(node) {
89
+ const { callee } = node;
90
+ if (callee.type === AST_NODE_TYPES.Identifier) {
91
+ if (callee.name === 'eval') {
92
+ context.report({ node, messageId: 'noEval' });
93
+ return;
94
+ }
95
+ if (callee.name === 'Function') {
96
+ context.report({ node, messageId: 'noFunctionConstructor' });
97
+ return;
98
+ }
99
+ const originalName = dangerousLocalNames.get(callee.name);
100
+ if (originalName) {
101
+ context.report({ node, messageId: 'noChildProcess', data: { name: originalName } });
102
+ }
103
+ return;
104
+ }
105
+ if (callee.type === AST_NODE_TYPES.MemberExpression &&
106
+ !callee.computed &&
107
+ callee.object.type === AST_NODE_TYPES.Identifier &&
108
+ namespaceNames.has(callee.object.name) &&
109
+ callee.property.type === AST_NODE_TYPES.Identifier &&
110
+ DANGEROUS_CHILD_PROCESS_FUNCTIONS.has(callee.property.name)) {
111
+ context.report({
112
+ node,
113
+ messageId: 'noChildProcess',
114
+ data: { name: callee.property.name },
115
+ });
116
+ }
117
+ },
118
+ };
119
+ },
120
+ });
121
+ //# sourceMappingURL=no-dangerous-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-dangerous-functions.js","sourceRoot":"","sources":["../../src/rules/no-dangerous-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EACN,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC;AAEpC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAE/E;;;GAGG;AACH,MAAM,iCAAiC,GAAG,IAAI,GAAG,CAAC;IACjD,MAAM;IACN,UAAU;IACV,UAAU;IACV,cAAc;IACd,OAAO;IACP,WAAW;IACX,MAAM;CACN,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,CAAC,IAA0B,EAAW,EAAE;IACpE,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,UAAU,KAAK,IAAI,IAAI,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACL,WAAW,EACV,yIAAyI;SAC1I;QACD,QAAQ,EAAE;YACT,MAAM,EACL,2HAA2H;YAC5H,qBAAqB,EACpB,yGAAyG;YA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I,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;qBACpC,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const NoEmojiInOptionsRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"emojiInOption", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ //# sourceMappingURL=no-emoji-in-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-emoji-in-options.d.ts","sourceRoot":"","sources":["../../src/rules/no-emoji-in-options.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,oBAAoB,kJAoF/B,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ import { isNodeTypeClass, findClassProperty, getStringLiteralValue, isFileType, createRule, } from '../utils/index.js';
3
+ /**
4
+ * Matches emoji characters: pictographs (πŸ˜€, πŸš€, βœ‰οΈ, etc.) and regional
5
+ * indicator symbols that compose flag emoji (πŸ‡ΊπŸ‡Έ).
6
+ */
7
+ const EMOJI_REGEX = /(\p{Extended_Pictographic}|\p{Regional_Indicator})/gu;
8
+ /** Keys whose string values are surfaced to users as labels. */
9
+ const LABEL_KEYS = new Set(['name', 'displayName']);
10
+ export const NoEmojiInOptionsRule = createRule({
11
+ name: 'no-emoji-in-options',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Disallow emoji characters in node option name and displayName values',
16
+ },
17
+ messages: {
18
+ emojiInOption: 'Emoji characters are not allowed in "{{ key }}" values. Found: {{ emoji }}.',
19
+ },
20
+ schema: [],
21
+ },
22
+ defaultOptions: [],
23
+ create(context) {
24
+ if (!isFileType(context.filename, '.node.ts')) {
25
+ return {};
26
+ }
27
+ const checkLabelValue = (key, valueNode) => {
28
+ const value = getStringLiteralValue(valueNode);
29
+ if (value === null) {
30
+ return;
31
+ }
32
+ const matches = value.match(EMOJI_REGEX);
33
+ if (!matches) {
34
+ return;
35
+ }
36
+ context.report({
37
+ node: valueNode,
38
+ messageId: 'emojiInOption',
39
+ data: {
40
+ key,
41
+ emoji: [...new Set(matches)].join(' '),
42
+ },
43
+ });
44
+ };
45
+ const traverse = (node) => {
46
+ if (node.type === AST_NODE_TYPES.ObjectExpression) {
47
+ for (const property of node.properties) {
48
+ if (property.type === AST_NODE_TYPES.Property &&
49
+ property.key.type === AST_NODE_TYPES.Identifier &&
50
+ LABEL_KEYS.has(property.key.name)) {
51
+ checkLabelValue(property.key.name, property.value);
52
+ }
53
+ }
54
+ }
55
+ for (const key in node) {
56
+ if (key === 'parent') {
57
+ continue;
58
+ }
59
+ const child = node[key];
60
+ if (Array.isArray(child)) {
61
+ for (const item of child) {
62
+ if (item && typeof item === 'object' && 'type' in item) {
63
+ traverse(item);
64
+ }
65
+ }
66
+ }
67
+ else if (child && typeof child === 'object' && 'type' in child) {
68
+ traverse(child);
69
+ }
70
+ }
71
+ };
72
+ return {
73
+ ClassDeclaration(node) {
74
+ if (!isNodeTypeClass(node)) {
75
+ return;
76
+ }
77
+ const descriptionProperty = findClassProperty(node, 'description');
78
+ if (!descriptionProperty?.value) {
79
+ return;
80
+ }
81
+ traverse(descriptionProperty.value);
82
+ },
83
+ };
84
+ },
85
+ });
86
+ //# sourceMappingURL=no-emoji-in-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-emoji-in-options.js","sourceRoot":"","sources":["../../src/rules/no-emoji-in-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,UAAU,GACV,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AACH,MAAM,WAAW,GAAG,sDAAsD,CAAC;AAE3E,gEAAgE;AAChE,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CA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