@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
@@ -1,418 +0,0 @@
1
- import eslintImportX from "eslint-plugin-import-x";
2
- export const importXPlugin = [
3
- {
4
- plugins: {
5
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- don't have a choice
6
- "import-x": eslintImportX,
7
- },
8
- rules: {
9
- /*
10
- * In both Flow and TypeScript you can mark an import as a type-only
11
- * import by adding a "kind" marker to the import. Both languages
12
- * support two positions for marker.
13
- *
14
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
15
- */
16
- "import-x/consistent-type-specifier-style": [
17
- "warn",
18
- "prefer-top-level",
19
- ],
20
- /*
21
- * Ensure a default export is present, given a default import.
22
- *
23
- * BROKEN
24
- *
25
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/default.md
26
- */
27
- "import-x/default": "off",
28
- /*
29
- * Enforce a leading comment with the webpackChunkName for dynamic imports
30
- *
31
- * This is turned off for now because it doesn't work correctly. Says
32
- * that valid comments are invalid. Likely a bug in the plugin.
33
- *
34
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/dynamic-import-chunkname.md
35
- */
36
- "import-x/dynamic-import-chunkname": "off",
37
- /*
38
- * Report any invalid exports, i.e. re-export of the same name
39
- *
40
- * BROKEN
41
- *
42
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/export.md
43
- */
44
- "import-x/export": "off",
45
- /*
46
- * Ensure all exports appear after other statements
47
- *
48
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
49
- */
50
- "import-x/exports-last": "warn",
51
- /*
52
- * Ensure consistent use of file extension within the import path
53
- *
54
- * Turning this off since the future of node >= 16 requires extensions
55
- *
56
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
57
- */
58
- "import-x/extensions": "off",
59
- /*
60
- * Ensure all imports appear before other statements
61
- *
62
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
63
- */
64
- "import-x/first": "warn",
65
- /*
66
- * Prefer named exports to be grouped together in a single export declaration
67
- *
68
- * This is off for now because when you create anything that uses an interface
69
- * in Typescript, you have to export that interface otherwise you'll get an error
70
- * to the tune of:
71
- *
72
- * 'Default export of the module has or is using private name'
73
- *
74
- * As of the writing of this comment, you can't export your interface in the
75
- * group, because the typescript parser sees that as an undefined variable.
76
- * This means that the only option available is to export the interface and
77
- * members separately instead of in a group.
78
- *
79
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
80
- */
81
- "import-x/group-exports": "off",
82
- /*
83
- * Limit the maximum number of dependencies a module can have
84
- *
85
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
86
- */
87
- "import-x/max-dependencies": [
88
- "warn",
89
- {
90
- max: 25,
91
- },
92
- ],
93
- /*
94
- * Ensure named imports correspond to a named export in the remote file.
95
- *
96
- * Typescript takes care of this for us already, and @react-email/components bugs this out
97
- *
98
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md
99
- */
100
- "import-x/named": "off",
101
- /*
102
- * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
103
- *
104
- * BROKEN
105
- *
106
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
107
- */
108
- "import-x/namespace": "off",
109
- /*
110
- * Enforce a newline after import statements
111
- *
112
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
113
- */
114
- "import-x/newline-after-import": [
115
- "warn",
116
- {
117
- count: 2,
118
- },
119
- ],
120
- /*
121
- * Forbid import of modules using absolute paths
122
- *
123
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
124
- */
125
- "import-x/no-absolute-path": "warn",
126
- /*
127
- * Report AMD require and define calls.
128
- *
129
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
130
- */
131
- "import-x/no-amd": "warn",
132
- /*
133
- * Forbid anonymous values as default exports
134
- *
135
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
136
- */
137
- "import-x/no-anonymous-default-export": [
138
- "warn",
139
- {
140
- allowObject: true,
141
- },
142
- ],
143
- /*
144
- * Report CommonJS require calls and module.exports or exports.*.
145
- *
146
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
147
- */
148
- "import-x/no-commonjs": "warn",
149
- /*
150
- * Forbid a module from importing a module with a dependency path back to itself
151
- *
152
- * This rule doesn't work correctly, off for now
153
- *
154
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
155
- */
156
- "import-x/no-cycle": "off",
157
- /*
158
- * Forbid default exports
159
- *
160
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
161
- */
162
- "import-x/no-default-export": "warn",
163
- /*
164
- * Report imported names marked with @deprecated documentation tag
165
- *
166
- * BROKEN
167
- *
168
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-deprecated.md
169
- */
170
- "import-x/no-deprecated": "off",
171
- /*
172
- * Report repeated import of the same module in multiple places
173
- *
174
- * BROKEN
175
- *
176
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
177
- */
178
- "import-x/no-duplicates": "warn",
179
- /*
180
- * Forbid require() calls with expressions
181
- *
182
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
183
- */
184
- "import-x/no-dynamic-require": "warn",
185
- /*
186
- * Reports the use of empty named import blocks.
187
- *
188
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
189
- */
190
- "import-x/no-empty-named-blocks": "warn",
191
- /*
192
- * Forbid the use of extraneous packages
193
- *
194
- * Taken care of by node/no-extraneous-import because it works better
195
- *
196
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
197
- */
198
- "import-x/no-extraneous-dependencies": "off",
199
- /*
200
- * Forbid imports with CommonJS exports
201
- *
202
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-import-module-exports.md
203
- */
204
- "import-x/no-import-module-exports": "warn",
205
- /*
206
- * Prevent importing the submodules of other modules
207
- *
208
- * Off for now because organizing internal modules in parent modules makes sense to me
209
- *
210
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-internal-modules.md
211
- */
212
- "import-x/no-internal-modules": "off",
213
- /*
214
- * Forbid the use of mutable exports with var or let.
215
- *
216
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
217
- */
218
- "import-x/no-mutable-exports": "warn",
219
- /*
220
- * Report use of exported name as identifier of default export
221
- *
222
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
223
- */
224
- "import-x/no-named-as-default": "off",
225
- /*
226
- * Report use of exported name as property of default export
227
- *
228
- * Think this is bombing eslint with "heap limit Allocation failed"
229
- *
230
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
231
- */
232
- "import-x/no-named-as-default-member": "off",
233
- /*
234
- * Forbid named default exports
235
- *
236
- * This is off because named defaults are sometimes required in the new node >= 16 module system
237
- *
238
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
239
- */
240
- "import-x/no-named-default": "off",
241
- /*
242
- * Forbid named exports
243
- *
244
- * Off for now because named exports are fine
245
- *
246
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-export.md
247
- */
248
- "import-x/no-named-export": "off",
249
- /*
250
- * Report namespace imports
251
- *
252
- * Off for now because namespace imports are chilled
253
- *
254
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
255
- */
256
- "import-x/no-namespace": "off",
257
- /*
258
- * No Node.js builtin modules.
259
- *
260
- * Off for now since we're assuming that most code is nodejs code
261
- *
262
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-nodejs-modules.md
263
- */
264
- "import-x/no-nodejs-modules": "off",
265
- /*
266
- * Prevent importing packages through relative paths
267
- *
268
- * Off for now because we use relative imports
269
- *
270
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-packages.md
271
- */
272
- "import-x/no-relative-packages": "off",
273
- /*
274
- * Forbid importing modules from parent directories
275
- *
276
- * Off for now because doing something like a utils collection would become impossible
277
- *
278
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-parent-imports.md
279
- */
280
- "import-x/no-relative-parent-imports": "off",
281
- /*
282
- * Forbid importing a default export by a different name.
283
- *
284
- * BROKEN
285
- *
286
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-rename-default.md
287
- */
288
- "import-x/no-rename-default": "off",
289
- /*
290
- * Restrict which files can be imported in a given folder
291
- *
292
- * BROKEN
293
- *
294
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-restricted-paths.md
295
- */
296
- "import-x/no-restricted-paths": "off",
297
- /*
298
- * Forbid a module from importing itself
299
- *
300
- * BROKEN
301
- *
302
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
303
- */
304
- "import-x/no-self-import": "off",
305
- /*
306
- * Forbid unassigned imports
307
- *
308
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
309
- */
310
- "import-x/no-unassigned-import": [
311
- "warn",
312
- {
313
- allow: [
314
- "**/*.css",
315
- "**/*.scss",
316
- "@babel/polyfill",
317
- "@babel/register",
318
- "@total-typescript/ts-reset",
319
- "core-js/stable",
320
- "dotenv/config",
321
- "jasmine",
322
- "reflect-metadata",
323
- "regenerator-runtime/runtime",
324
- "server-only",
325
- ],
326
- },
327
- ],
328
- /*
329
- * Ensure imports point to a file/module that can be resolved.
330
- *
331
- * This rule has no way to resolve aliases of any kind - off for now
332
- *
333
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unresolved.md
334
- */
335
- "import-x/no-unresolved": "off",
336
- /*
337
- * Forbid modules without any export, and exports not imported by any modules
338
- *
339
- * Off because it doesn't currently support dynamic imports
340
- *
341
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
342
- */
343
- "import-x/no-unused-modules": "off",
344
- /*
345
- * Prevent unnecessary path segments in import and require statements
346
- *
347
- * BROKEN
348
- *
349
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
350
- */
351
- "import-x/no-useless-path-segments": "off",
352
- /*
353
- * Forbid webpack loader syntax in imports
354
- *
355
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
356
- */
357
- "import-x/no-webpack-loader-syntax": "warn",
358
- /*
359
- * Enforce a convention in module import order
360
- *
361
- * Leaving this to eslint-plugin-perfectionist
362
- *
363
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
364
- */
365
- "import-x/order": [
366
- "off",
367
- {
368
- groups: [
369
- "builtin",
370
- "external",
371
- "internal",
372
- "parent",
373
- "sibling",
374
- "index",
375
- "object",
376
- "type",
377
- ],
378
- "newlines-between": "always",
379
- pathGroups: [
380
- {
381
- group: "internal",
382
- pattern: "@src/**",
383
- },
384
- ],
385
- pathGroupsExcludedImportTypes: ["builtin"],
386
- },
387
- ],
388
- /*
389
- * Prefer a default export if module exports a single name
390
- *
391
- * Off for now because we don't prefer this
392
- *
393
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
394
- */
395
- "import-x/prefer-default-export": "off",
396
- /*
397
- * Enforce using namespace imports for specific modules, like react/react-dom, etc.
398
- *
399
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-namespace-import.md
400
- */
401
- "import-x/prefer-namespace-import": [
402
- "warn",
403
- {
404
- patterns: [
405
- "react",
406
- "react-dom",
407
- ],
408
- },
409
- ],
410
- /*
411
- * Report potentially ambiguous parse goal (script vs. module)
412
- *
413
- * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
414
- */
415
- "import-x/unambiguous": "warn",
416
- },
417
- },
418
- ];
@@ -1,3 +0,0 @@
1
- import type { Linter } from "eslint";
2
- export declare const newlineDestructuringPlugin: Linter.Config[];
3
- //# sourceMappingURL=newline-destructuring.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"newline-destructuring.d.ts","sourceRoot":"","sources":["../../src/plugins/newline-destructuring.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAqBrD,CAAC"}
@@ -1,26 +0,0 @@
1
- import newlineDestructuring from "eslint-plugin-newline-destructuring";
2
- /*
3
- * Eslint plugin for enforcing newlines in object destructuring assignment past a certain number of properties.
4
- *
5
- * https://www.npmjs.com/package/eslint-plugin-newline-destructuring
6
- */
7
- export const newlineDestructuringPlugin = [
8
- {
9
- plugins: {
10
- "newline-destructuring": newlineDestructuring,
11
- },
12
- rules: {
13
- /*
14
- * Enforce newlines in object destructuring assignment past a certain number of properties
15
- *
16
- * https://www.npmjs.com/package/eslint-plugin-newline-destructuring
17
- */
18
- "newline-destructuring/newline": [
19
- "warn",
20
- {
21
- items: 1,
22
- },
23
- ],
24
- },
25
- },
26
- ];
@@ -1,3 +0,0 @@
1
- import type { Linter } from "eslint";
2
- export declare const nextPlugin: Linter.Config[];
3
- //# sourceMappingURL=next.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/plugins/next.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOrC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EA2JrC,CAAC"}
@@ -1,142 +0,0 @@
1
- import { fixupPluginRules } from "@eslint/compat";
2
- import next from "@next/eslint-plugin-next";
3
- /*
4
- * Extra rules for Eslint
5
- *
6
- * https://www.npmjs.com/package/eslint-plugin-next
7
- */
8
- export const nextPlugin = [
9
- {
10
- plugins: {
11
- next: fixupPluginRules(next),
12
- },
13
- rules: {
14
- /*
15
- * Enforce font-display behavior with Google Fonts.
16
- *
17
- * https://nextjs.org/docs/messages/google-font-display
18
- */
19
- "next/google-font-display": "warn",
20
- /*
21
- * Ensure preconnect is used with Google Fonts.
22
- *
23
- * https://nextjs.org/docs/messages/google-font-preconnect
24
- */
25
- "next/google-font-preconnect": "warn",
26
- /*
27
- * Enforce id attribute on next/script components with inline content.
28
- *
29
- * https://nextjs.org/docs/messages/inline-script-id
30
- */
31
- "next/inline-script-id": "warn",
32
- /*
33
- * Prefer next/script component when using the inline script for Google Analytics.
34
- *
35
- * https://nextjs.org/docs/messages/next-script-for-ga
36
- */
37
- "next/next-script-for-ga": "warn",
38
- /*
39
- * Prevent assignment to the module variable.
40
- *
41
- * https://nextjs.org/docs/messages/no-assign-module-variable
42
- */
43
- "next/no-assign-module-variable": "warn",
44
- /*
45
- * Prevent client components from being async functions.
46
- *
47
- * https://nextjs.org/docs/messages/no-async-client-component
48
- */
49
- "next/no-async-client-component": "warn",
50
- /*
51
- * Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.
52
- *
53
- * https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
54
- */
55
- "next/no-before-interactive-script-outside-document": "warn",
56
- /*
57
- * Prevent manual stylesheet tags.
58
- *
59
- * https://nextjs.org/docs/messages/no-css-tags
60
- */
61
- "next/no-css-tags": "warn",
62
- /*
63
- * Prevent importing next/document outside of pages/_document.js.
64
- *
65
- * https://nextjs.org/docs/messages/no-document-import-in-page
66
- */
67
- "next/no-document-import-in-page": "warn",
68
- /*
69
- * Prevent duplicate usage of <Head> in pages/_document.js.
70
- *
71
- * https://nextjs.org/docs/messages/no-duplicate-head
72
- */
73
- "next/no-duplicate-head": "warn",
74
- /*
75
- * Prevent usage of <head> element.
76
- *
77
- * https://nextjs.org/docs/messages/no-head-element
78
- */
79
- "next/no-head-element": "warn",
80
- /*
81
- * Prevent usage of next/head in pages/_document.js.
82
- *
83
- * https://nextjs.org/docs/messages/no-head-import-in-document
84
- */
85
- "next/no-head-import-in-document": "warn",
86
- /*
87
- * Prevent usage of <a> elements to navigate to internal Next.js pages.
88
- *
89
- * https://nextjs.org/docs/messages/no-html-link-for-pages
90
- */
91
- "next/no-html-link-for-pages": "warn",
92
- /*
93
- * Prevent usage of <img> element due to slower LCP and higher bandwidth.
94
- *
95
- * https://nextjs.org/docs/messages/no-img-element
96
- */
97
- "next/no-img-element": "warn",
98
- /*
99
- * Prevent page-only custom fonts.
100
- *
101
- * https://nextjs.org/docs/messages/no-page-custom-font
102
- */
103
- "next/no-page-custom-font": "warn",
104
- /*
105
- * Prevent usage of next/script in next/head component.
106
- *
107
- * https://nextjs.org/docs/messages/no-script-component-in-head
108
- */
109
- "next/no-script-component-in-head": "warn",
110
- /*
111
- * Prevent usage of styled-jsx in pages/_document.js.
112
- *
113
- * https://nextjs.org/docs/messages/no-styled-jsx-in-document
114
- */
115
- "next/no-styled-jsx-in-document": "warn",
116
- /*
117
- * Prevent synchronous scripts.
118
- *
119
- * https://nextjs.org/docs/messages/no-sync-scripts
120
- */
121
- "next/no-sync-scripts": "warn",
122
- /*
123
- * Prevent usage of <title> with Head component from next/document.
124
- *
125
- * https://nextjs.org/docs/messages/no-title-in-document-head
126
- */
127
- "next/no-title-in-document-head": "warn",
128
- /*
129
- * Prevent common typos in Next.js's data fetching functions
130
- *
131
- * https://nextjs.org/docs/messages/no-typos
132
- */
133
- "next/no-typos": "warn",
134
- /*
135
- * Prevent duplicate polyfills from Polyfill.io.
136
- *
137
- * https://nextjs.org/docs/messages/no-unwanted-polyfillio
138
- */
139
- "next/no-unwanted-polyfillio": "warn",
140
- },
141
- },
142
- ];
@@ -1,3 +0,0 @@
1
- import type { Linter } from "eslint";
2
- export declare const noUnsanitizedPlugin: Linter.Config[];
3
- //# sourceMappingURL=no-unsanitized.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-unsanitized.d.ts","sourceRoot":"","sources":["../../src/plugins/no-unsanitized.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EA+B9C,CAAC"}
@@ -1,40 +0,0 @@
1
- /*
2
- * These rules disallow unsafe coding practices that may result into security
3
- * vulnerabilities. We will disallow assignments (e.g., to innerHTML) as well as
4
- * calls (e.g., to insertAdjacentHTML) without the use of a pre-defined escaping
5
- * function. The escaping functions must be called with a template string. The
6
- * function names are hardcoded as Sanitizer.escapeHTML and escapeHTML.
7
- *
8
- * https://www.npmjs.com/package/eslint-plugin-no-unsanitized
9
- */
10
- import { fixupPluginRules } from "@eslint/compat";
11
- import plugin from "eslint-plugin-no-unsanitized";
12
- export const noUnsanitizedPlugin = [
13
- {
14
- plugins: {
15
- "no-unsanitized": fixupPluginRules(plugin),
16
- },
17
- rules: {
18
- /*
19
- * The method rule in eslint-plugin-no-unsanitized perform basic security
20
- * checks for function calls. The idea of these checks is to ensure that
21
- * certain insecure coding patterns are avoided in your codebase. We
22
- * encourage developers to use HTML sanitizers or escapers to mitigate
23
- * those insecure patterns.
24
- *
25
- * https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/method.md
26
- */
27
- "no-unsanitized/method": "warn",
28
- /*
29
- * The property rule in eslint-plugin-no-unsanitized perform basic security
30
- * checks for property assignments. The idea of these checks is to ensure
31
- * that certain insecure coding patterns are avoided in your codebase.
32
- * We encourage developers to use HTML sanitizers or escapers to mitigate
33
- * those insecure patterns.
34
- *
35
- * https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/property.md
36
- */
37
- "no-unsanitized/property": "warn",
38
- },
39
- },
40
- ];
@@ -1,3 +0,0 @@
1
- import type { Linter } from "eslint";
2
- export declare const noUselessAssignPlugin: Linter.Config[];
3
- //# sourceMappingURL=no-useless-assign.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-useless-assign.d.ts","sourceRoot":"","sources":["../../src/plugins/no-useless-assign.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOrC,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAehD,CAAC"}