@newsteam/eslint-config 1.2.15 → 1.2.17

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 (150) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -52
  4. package/dist/plugins/sort-react-dependency-arrays.d.ts +3 -2
  5. package/dist/plugins/sort-react-dependency-arrays.d.ts.map +1 -1
  6. package/dist/plugins/sort-react-dependency-arrays.js +95 -18
  7. package/dist/rules/array-function.d.ts +3 -0
  8. package/dist/rules/array-function.d.ts.map +1 -0
  9. package/dist/rules/array-function.js +56 -0
  10. package/dist/rules/css-modules.d.ts +3 -0
  11. package/dist/rules/css-modules.d.ts.map +1 -0
  12. package/dist/rules/css-modules.js +27 -0
  13. package/dist/rules/destructuring.d.ts +3 -0
  14. package/dist/rules/destructuring.d.ts.map +1 -0
  15. package/dist/rules/destructuring.js +39 -0
  16. package/dist/rules/eslint-comments.d.ts +3 -0
  17. package/dist/rules/eslint-comments.d.ts.map +1 -0
  18. package/dist/rules/eslint-comments.js +77 -0
  19. package/dist/rules/import-newlines.d.ts +3 -0
  20. package/dist/rules/import-newlines.d.ts.map +1 -0
  21. package/dist/rules/import-newlines.js +26 -0
  22. package/dist/rules/import-x.d.ts +3 -0
  23. package/dist/rules/import-x.d.ts.map +1 -0
  24. package/dist/rules/import-x.js +420 -0
  25. package/dist/{rules.d.ts → rules/index.d.ts} +1 -1
  26. package/dist/rules/index.d.ts.map +1 -0
  27. package/dist/{rules.js → rules/index.js} +51 -1
  28. package/dist/rules/next.d.ts +3 -0
  29. package/dist/rules/next.d.ts.map +1 -0
  30. package/dist/rules/next.js +140 -0
  31. package/dist/rules/no-unsanitized.d.ts +3 -0
  32. package/dist/rules/no-unsanitized.d.ts.map +1 -0
  33. package/dist/rules/no-unsanitized.js +38 -0
  34. package/dist/rules/no-useless-assign.d.ts +3 -0
  35. package/dist/rules/no-useless-assign.d.ts.map +1 -0
  36. package/dist/rules/no-useless-assign.js +20 -0
  37. package/dist/rules/node.d.ts +3 -0
  38. package/dist/rules/node.d.ts.map +1 -0
  39. package/dist/rules/node.js +305 -0
  40. package/dist/rules/perfectionist.d.ts +3 -0
  41. package/dist/rules/perfectionist.d.ts.map +1 -0
  42. package/dist/rules/perfectionist.js +94 -0
  43. package/dist/rules/promise.d.ts +3 -0
  44. package/dist/rules/promise.d.ts.map +1 -0
  45. package/dist/rules/promise.js +123 -0
  46. package/dist/rules/react-19-upgrade.d.ts +3 -0
  47. package/dist/rules/react-19-upgrade.d.ts.map +1 -0
  48. package/dist/rules/react-19-upgrade.js +20 -0
  49. package/dist/rules/react-compiler.d.ts +3 -0
  50. package/dist/rules/react-compiler.d.ts.map +1 -0
  51. package/dist/{plugins → rules}/react-compiler.js +7 -9
  52. package/dist/rules/react-hooks.d.ts +3 -0
  53. package/dist/rules/react-hooks.d.ts.map +1 -0
  54. package/dist/rules/react-hooks.js +163 -0
  55. package/dist/rules/react-perf.d.ts +3 -0
  56. package/dist/rules/react-perf.d.ts.map +1 -0
  57. package/dist/rules/react-perf.js +47 -0
  58. package/dist/rules/react-refresh.d.ts +3 -0
  59. package/dist/rules/react-refresh.d.ts.map +1 -0
  60. package/dist/rules/react-refresh.js +19 -0
  61. package/dist/rules/react.d.ts +3 -0
  62. package/dist/rules/react.d.ts.map +1 -0
  63. package/dist/rules/react.js +740 -0
  64. package/dist/rules/security.d.ts +3 -0
  65. package/dist/rules/security.d.ts.map +1 -0
  66. package/dist/rules/security.js +112 -0
  67. package/dist/rules/sort-react-dependency-arrays.d.ts +3 -0
  68. package/dist/rules/sort-react-dependency-arrays.d.ts.map +1 -0
  69. package/dist/rules/sort-react-dependency-arrays.js +12 -0
  70. package/dist/rules/stylistic.d.ts +3 -0
  71. package/dist/rules/stylistic.d.ts.map +1 -0
  72. package/dist/rules/stylistic.js +916 -0
  73. package/dist/rules/typescript.d.ts +3 -0
  74. package/dist/rules/typescript.d.ts.map +1 -0
  75. package/dist/{plugins → rules}/typescript.js +2 -1
  76. package/dist/rules/unicorn.d.ts +3 -0
  77. package/dist/rules/unicorn.d.ts.map +1 -0
  78. package/dist/rules/unicorn.js +998 -0
  79. package/dist/test/index.d.ts +2 -0
  80. package/dist/test/index.d.ts.map +1 -0
  81. package/dist/test/index.js +15 -0
  82. package/package.json +11 -13
  83. package/dist/plugins/array-function.d.ts +0 -3
  84. package/dist/plugins/array-function.d.ts.map +0 -1
  85. package/dist/plugins/array-function.js +0 -58
  86. package/dist/plugins/css-modules.d.ts +0 -3
  87. package/dist/plugins/css-modules.d.ts.map +0 -1
  88. package/dist/plugins/css-modules.js +0 -19
  89. package/dist/plugins/destructuring.d.ts +0 -3
  90. package/dist/plugins/destructuring.d.ts.map +0 -1
  91. package/dist/plugins/destructuring.js +0 -41
  92. package/dist/plugins/eslint-comments.d.ts +0 -3
  93. package/dist/plugins/eslint-comments.d.ts.map +0 -1
  94. package/dist/plugins/eslint-comments.js +0 -79
  95. package/dist/plugins/import-newlines.d.ts +0 -3
  96. package/dist/plugins/import-newlines.d.ts.map +0 -1
  97. package/dist/plugins/import-newlines.js +0 -28
  98. package/dist/plugins/import-x.d.ts +0 -3
  99. package/dist/plugins/import-x.d.ts.map +0 -1
  100. package/dist/plugins/import-x.js +0 -418
  101. package/dist/plugins/newline-destructuring.d.ts +0 -3
  102. package/dist/plugins/newline-destructuring.d.ts.map +0 -1
  103. package/dist/plugins/newline-destructuring.js +0 -26
  104. package/dist/plugins/next.d.ts +0 -3
  105. package/dist/plugins/next.d.ts.map +0 -1
  106. package/dist/plugins/next.js +0 -142
  107. package/dist/plugins/no-unsanitized.d.ts +0 -3
  108. package/dist/plugins/no-unsanitized.d.ts.map +0 -1
  109. package/dist/plugins/no-unsanitized.js +0 -40
  110. package/dist/plugins/no-useless-assign.d.ts +0 -3
  111. package/dist/plugins/no-useless-assign.d.ts.map +0 -1
  112. package/dist/plugins/no-useless-assign.js +0 -22
  113. package/dist/plugins/node.d.ts +0 -3
  114. package/dist/plugins/node.d.ts.map +0 -1
  115. package/dist/plugins/node.js +0 -307
  116. package/dist/plugins/perfectionist.d.ts +0 -3
  117. package/dist/plugins/perfectionist.d.ts.map +0 -1
  118. package/dist/plugins/perfectionist.js +0 -96
  119. package/dist/plugins/promise.d.ts +0 -3
  120. package/dist/plugins/promise.d.ts.map +0 -1
  121. package/dist/plugins/promise.js +0 -125
  122. package/dist/plugins/react-19-upgrade.d.ts +0 -3
  123. package/dist/plugins/react-19-upgrade.d.ts.map +0 -1
  124. package/dist/plugins/react-19-upgrade.js +0 -22
  125. package/dist/plugins/react-compiler.d.ts +0 -3
  126. package/dist/plugins/react-compiler.d.ts.map +0 -1
  127. package/dist/plugins/react-hooks.d.ts +0 -3
  128. package/dist/plugins/react-hooks.d.ts.map +0 -1
  129. package/dist/plugins/react-hooks.js +0 -165
  130. package/dist/plugins/react-perf.d.ts +0 -3
  131. package/dist/plugins/react-perf.d.ts.map +0 -1
  132. package/dist/plugins/react-perf.js +0 -49
  133. package/dist/plugins/react-refresh.d.ts +0 -3
  134. package/dist/plugins/react-refresh.d.ts.map +0 -1
  135. package/dist/plugins/react-refresh.js +0 -21
  136. package/dist/plugins/react.d.ts +0 -3
  137. package/dist/plugins/react.d.ts.map +0 -1
  138. package/dist/plugins/react.js +0 -738
  139. package/dist/plugins/security.d.ts +0 -3
  140. package/dist/plugins/security.d.ts.map +0 -1
  141. package/dist/plugins/security.js +0 -114
  142. package/dist/plugins/stylistic.d.ts +0 -3
  143. package/dist/plugins/stylistic.d.ts.map +0 -1
  144. package/dist/plugins/stylistic.js +0 -901
  145. package/dist/plugins/typescript.d.ts +0 -3
  146. package/dist/plugins/typescript.d.ts.map +0 -1
  147. package/dist/plugins/unicorn.d.ts +0 -3
  148. package/dist/plugins/unicorn.d.ts.map +0 -1
  149. package/dist/plugins/unicorn.js +0 -994
  150. package/dist/rules.d.ts.map +0 -1
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const securityPluginConfig: Linter.Config;
3
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/rules/security.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAwHzC,CAAC"}
@@ -0,0 +1,112 @@
1
+ import security from "eslint-plugin-security";
2
+ /*
3
+ * ESLint rules for Node Security
4
+ *
5
+ * https://github.com/nodesecurity/eslint-plugin-security
6
+ */
7
+ export const securityPluginConfig = {
8
+ plugins: {
9
+ security,
10
+ },
11
+ rules: {
12
+ /*
13
+ * Detects trojan source attacks that employ unicode bidi attacks to inject malicious code.
14
+ */
15
+ "security/detect-bidi-characters": "warn",
16
+ /*
17
+ * Detects calls to buffer with noAssert flag set
18
+ *
19
+ * From the Node.js API docs: "Setting noAssert to true skips validation
20
+ * of the offset. This allows the offset to be beyond the end of the Buffer."
21
+ *
22
+ */
23
+ "security/detect-buffer-noassert": "warn",
24
+ /*
25
+ * Detects instances of child_process & non-literal exec()
26
+ *
27
+ * https://blog.liftsecurity.io/2014/08/19/Avoid-Command-Injection-Node.js
28
+ */
29
+ "security/detect-child-process": "warn",
30
+ /*
31
+ * Detects object.escapeMarkup = false, which can be used with some
32
+ * template engines to disable escaping of HTML entities. This can lead
33
+ * to Cross-Site Scripting (XSS) vulnerabilities.
34
+ *
35
+ * https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
36
+ */
37
+ "security/detect-disable-mustache-escape": "warn",
38
+ /*
39
+ * Detects eval(variable) which can allow an attacker to run arbitary
40
+ * code inside your process.
41
+ *
42
+ * http://security.stackexchange.com/questions/94017/what-are-the-security-issues-with-eval-in-javascript
43
+ */
44
+ "security/detect-eval-with-expression": "warn",
45
+ /*
46
+ * Detects instances of new Buffer(argument) where argument is any non
47
+ * literal value.
48
+ *
49
+ * There wasn't any documentation on https://github.com/nodesecurity/eslint-plugin-security
50
+ * at the time of writing
51
+ */
52
+ "security/detect-new-buffer": "warn",
53
+ /*
54
+ * Detects Express csrf middleware setup before method-override
55
+ * middleware. This can allow GET requests (which are not checked by csrf)
56
+ * to turn into POST requests later.
57
+ *
58
+ * https://blog.liftsecurity.io/2013/09/07/bypass-connect-csrf-protection-by-abusing
59
+ */
60
+ "security/detect-no-csrf-before-method-override": "warn",
61
+ /*
62
+ * Detects variable in filename argument of fs calls, which might allow
63
+ * an attacker to access anything on your system.
64
+ *
65
+ * https://www.owasp.org/index.php/Path_Traversal
66
+ */
67
+ "security/detect-non-literal-fs-filename": "warn",
68
+ /*
69
+ * Detects RegExp(variable), which might allow an attacker to DOS your
70
+ * server with a long-running regular expression.
71
+ *
72
+ * https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
73
+ */
74
+ "security/detect-non-literal-regexp": "warn",
75
+ /*
76
+ * Detects require(variable), which might allow an attacker to load and
77
+ * run arbitrary code, or access arbitrary files on disk.
78
+ *
79
+ * http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm
80
+ */
81
+ "security/detect-non-literal-require": "warn",
82
+ /*
83
+ * Detects variable[key] as a left- or right-hand assignment operand.
84
+ *
85
+ * Turning this off for now because we like variable[key] too much
86
+ *
87
+ * https://blog.liftsecurity.io/2015/01/14/the-dangers-of-square-bracket-notation/
88
+ */
89
+ "security/detect-object-injection": "off",
90
+ /*
91
+ * Detects insecure comparisons (==, !=, !== and ===), which check input
92
+ * sequentially.
93
+ *
94
+ * https://snyk.io/blog/node-js-timing-attack-ccc-ctf/
95
+ */
96
+ "security/detect-possible-timing-attacks": "warn",
97
+ /*
98
+ * Detects if pseudoRandomBytes() is in use, which might not give you
99
+ * the randomness you need and expect.
100
+ *
101
+ * http://stackoverflow.com/questions/18130254/randombytes-vs-pseudorandombytes
102
+ */
103
+ "security/detect-pseudoRandomBytes": "warn",
104
+ /*
105
+ * Locates potentially unsafe regular expressions, which may take a very
106
+ * long time to run, blocking the event loop.
107
+ *
108
+ * https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
109
+ */
110
+ "security/detect-unsafe-regex": "warn",
111
+ },
112
+ };
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const sortReactDependenyArraysPluginConfig: Linter.Config;
3
+ //# sourceMappingURL=sort-react-dependency-arrays.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-react-dependency-arrays.d.ts","sourceRoot":"","sources":["../../src/rules/sort-react-dependency-arrays.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKrC,eAAO,MAAM,oCAAoC,EAAE,MAAM,CAAC,MAOzD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import sortReactDependencyArrays from "../plugins/sort-react-dependency-arrays.js";
2
+ /*
3
+ * Sorts react dependency arrays alphabetically.
4
+ */
5
+ export const sortReactDependenyArraysPluginConfig = {
6
+ plugins: {
7
+ "sort-react-dependency-arrays": sortReactDependencyArrays,
8
+ },
9
+ rules: {
10
+ "sort-react-dependency-arrays/sort": "warn",
11
+ },
12
+ };
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const stylisticPluginConfig: Linter.Config;
3
+ //# sourceMappingURL=stylistic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/rules/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MA6+B1C,CAAC"}