@storm-software/eslint 0.107.2 → 0.107.3

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 (120) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-723HQUNP.js +14 -0
  3. package/dist/{chunk-V7TQDECV.js → chunk-E7T4SNH3.js} +2 -4
  4. package/dist/chunk-ESFBJFNU.cjs +149 -0
  5. package/dist/chunk-FTXILLLE.js +24 -0
  6. package/dist/chunk-JS7W7LMD.cjs +14 -0
  7. package/dist/chunk-KND2ZTLT.cjs +49 -0
  8. package/dist/chunk-LSG5T3ZK.js +313 -0
  9. package/dist/{chunk-CIGM5K4I.cjs → chunk-NFPQICLG.cjs} +2 -4
  10. package/dist/chunk-OGGLIE6C.cjs +24 -0
  11. package/dist/chunk-QDLKHXPX.cjs +11 -0
  12. package/dist/chunk-RTM5LCEB.js +149 -0
  13. package/dist/chunk-SHUYVCID.js +6 -0
  14. package/dist/chunk-TXTXUVRZ.cjs +313 -0
  15. package/dist/chunk-VJ6CKC4P.js +37 -0
  16. package/dist/chunk-Y67QTC5U.js +49 -0
  17. package/dist/chunk-YQQ366F7.cjs +37 -0
  18. package/dist/preset.cjs +153 -20182
  19. package/dist/preset.js +71 -20098
  20. package/dist/rules/import.cjs +292 -0
  21. package/dist/rules/import.d.cts +5 -0
  22. package/dist/rules/import.d.ts +5 -0
  23. package/dist/rules/import.js +292 -0
  24. package/dist/rules/jsx-a11y.cjs +341 -0
  25. package/dist/rules/jsx-a11y.d.cts +5 -0
  26. package/dist/rules/jsx-a11y.d.ts +5 -0
  27. package/dist/rules/jsx-a11y.js +341 -0
  28. package/dist/rules/react-hooks.cjs +15 -0
  29. package/dist/rules/react-hooks.d.cts +5 -0
  30. package/dist/rules/react-hooks.d.ts +5 -0
  31. package/dist/rules/react-hooks.js +15 -0
  32. package/dist/rules/react.cjs +689 -0
  33. package/dist/rules/react.d.cts +5 -0
  34. package/dist/rules/react.d.ts +5 -0
  35. package/dist/rules/react.js +689 -0
  36. package/dist/rules/storm.cjs +3 -3
  37. package/dist/rules/storm.js +2 -2
  38. package/dist/rules/ts-docs.cjs +7 -0
  39. package/dist/rules/ts-docs.d.cts +5 -0
  40. package/dist/rules/ts-docs.d.ts +5 -0
  41. package/dist/rules/ts-docs.js +7 -0
  42. package/dist/utils/banner-plugin.cjs +9 -0
  43. package/dist/utils/banner-plugin.d.cts +6 -0
  44. package/dist/utils/banner-plugin.d.ts +6 -0
  45. package/dist/utils/banner-plugin.js +9 -0
  46. package/dist/utils/constants.cjs +25 -0
  47. package/dist/utils/constants.d.cts +24 -0
  48. package/dist/utils/constants.d.ts +24 -0
  49. package/dist/utils/constants.js +25 -0
  50. package/dist/utils/create-flat-import-plugin.cjs +20 -0
  51. package/dist/utils/create-flat-import-plugin.d.cts +11 -0
  52. package/dist/utils/create-flat-import-plugin.d.ts +11 -0
  53. package/dist/utils/create-flat-import-plugin.js +20 -0
  54. package/dist/utils/format-config.cjs +7 -0
  55. package/dist/utils/format-config.d.cts +5 -0
  56. package/dist/utils/format-config.d.ts +5 -0
  57. package/dist/utils/format-config.js +7 -0
  58. package/dist/utils/get-file-banner.cjs +8 -0
  59. package/dist/utils/get-file-banner.d.cts +9 -0
  60. package/dist/utils/get-file-banner.d.ts +9 -0
  61. package/dist/utils/get-file-banner.js +8 -0
  62. package/dist/utils/ignores.cjs +7 -0
  63. package/dist/utils/ignores.d.cts +3 -0
  64. package/dist/utils/ignores.d.ts +3 -0
  65. package/dist/utils/ignores.js +7 -0
  66. package/dist/utils/index.cjs +33 -0
  67. package/dist/utils/index.d.cts +4 -0
  68. package/dist/utils/index.d.ts +4 -0
  69. package/dist/utils/index.js +33 -0
  70. package/package.json +1 -1
  71. package/dist/acorn-CCDA5Y7C.cjs +0 -3131
  72. package/dist/acorn-PTPZSZS6.js +0 -3131
  73. package/dist/angular-NDZ53HZT.js +0 -3014
  74. package/dist/angular-XXKPBORI.cjs +0 -3014
  75. package/dist/babel-7OKY5N6D.js +0 -7166
  76. package/dist/babel-ZAEH2MD6.cjs +0 -7166
  77. package/dist/chunk-2GN5RLNR.js +0 -55
  78. package/dist/chunk-BHJDUHOW.cjs +0 -84
  79. package/dist/chunk-GSOR5H2M.cjs +0 -4022
  80. package/dist/chunk-HXTIVITI.js +0 -4022
  81. package/dist/chunk-KOFZWJCN.js +0 -84
  82. package/dist/chunk-PWYAFNCE.cjs +0 -59
  83. package/dist/dist-3EJMVSVL.js +0 -15716
  84. package/dist/dist-GB3FBWYD.cjs +0 -15717
  85. package/dist/esm-HMD4VZC2.js +0 -1715
  86. package/dist/esm-KLBQYHBS.cjs +0 -1715
  87. package/dist/estree-4FZVBA3I.js +0 -4859
  88. package/dist/estree-TXEM7J44.cjs +0 -4859
  89. package/dist/execa-6ZJHRRGH.js +0 -2424
  90. package/dist/execa-RWXGY3AF.cjs +0 -2424
  91. package/dist/flow-LEJXBIDN.cjs +0 -28076
  92. package/dist/flow-TYUDSDMT.js +0 -28076
  93. package/dist/glimmer-BFX2N2PO.js +0 -3062
  94. package/dist/glimmer-CI4NLBJN.cjs +0 -3062
  95. package/dist/graphql-ATKH2UJU.js +0 -1355
  96. package/dist/graphql-F26LLKM2.cjs +0 -1355
  97. package/dist/html-DPSCSLFD.cjs +0 -3036
  98. package/dist/html-TQZJETBK.js +0 -3036
  99. package/dist/json5-2N47OU6X.cjs +0 -764
  100. package/dist/json5-DGCDZGKI.js +0 -764
  101. package/dist/jsonc-3RGXS4EK.js +0 -447
  102. package/dist/jsonc-H5JHBJWX.cjs +0 -447
  103. package/dist/markdown-ENFWQVL3.js +0 -3846
  104. package/dist/markdown-KDQOGP3N.cjs +0 -3846
  105. package/dist/meriyah-UO5W2QS6.js +0 -2720
  106. package/dist/meriyah-XW3PRYEN.cjs +0 -2720
  107. package/dist/multipart-parser-POHWNSZ2.cjs +0 -186
  108. package/dist/multipart-parser-ZBOXYK27.js +0 -186
  109. package/dist/postcss-ICZTIVVB.js +0 -5440
  110. package/dist/postcss-OH45GBM4.cjs +0 -5440
  111. package/dist/prettier-U5XWBEA6.js +0 -23559
  112. package/dist/prettier-UYPX4PW2.cjs +0 -23560
  113. package/dist/toml-NUWFIHJI.js +0 -509
  114. package/dist/toml-WFSEGMHQ.cjs +0 -509
  115. package/dist/typescript-6RS3BOJH.js +0 -14956
  116. package/dist/typescript-K6YYG6NX.cjs +0 -14956
  117. package/dist/yaml-DOGTEZV3.js +0 -4584
  118. package/dist/yaml-GNGUKHFM.cjs +0 -4584
  119. package/dist/yaml-UATHGD5B.cjs +0 -1119
  120. package/dist/yaml-XTDKP6DN.js +0 -1119
@@ -0,0 +1,292 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-QDLKHXPX.cjs');
2
+
3
+ // src/rules/import.ts
4
+ var config = {
5
+ /**
6
+ * Disallow non-import statements appearing before import statements.
7
+ *
8
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
9
+ */
10
+ "import/first": "warn",
11
+ /**
12
+ * Require a newline after the last import/require.
13
+ *
14
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
15
+ */
16
+ "import/newline-after-import": "warn",
17
+ /**
18
+ * Disallow import of modules using absolute paths.
19
+ *
20
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
21
+ */
22
+ "import/no-absolute-path": "error",
23
+ /**
24
+ * Disallow default exports.
25
+ *
26
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
27
+ */
28
+ "import/no-default-export": "error",
29
+ /**
30
+ * Disallow the use of extraneous packages.
31
+ *
32
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
33
+ */
34
+ "import/no-extraneous-dependencies": [
35
+ "error",
36
+ {
37
+ includeInternal: true,
38
+ includeTypes: true
39
+ }
40
+ ],
41
+ /**
42
+ * Disallow mutable exports.
43
+ *
44
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
45
+ */
46
+ "import/no-mutable-exports": "error",
47
+ /**
48
+ * Disallow importing packages through relative paths.
49
+ *
50
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
51
+ */
52
+ "import/no-relative-packages": "warn",
53
+ /**
54
+ * Disallow a module from importing itself.
55
+ *
56
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
57
+ */
58
+ "import/no-self-import": "error",
59
+ /**
60
+ * Ensures that there are no useless path segments.
61
+ *
62
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
63
+ */
64
+ "import/no-useless-path-segments": [
65
+ "error"
66
+ ],
67
+ /**
68
+ * Enforce a module import order convention.
69
+ *
70
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
71
+ */
72
+ "import/order": [
73
+ "warn",
74
+ {
75
+ groups: [
76
+ "builtin",
77
+ "external",
78
+ "internal",
79
+ "parent",
80
+ "sibling",
81
+ "index"
82
+ // Relative index
83
+ ],
84
+ "newlines-between": "never"
85
+ }
86
+ ],
87
+ "import/extensions": [
88
+ "error",
89
+ "ignorePackages"
90
+ ],
91
+ "import/prefer-default-export": "off",
92
+ // Reports any imports that come after non-import statements
93
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
94
+ "import/no-duplicates": "error",
95
+ // ensure imports point to files/modules that can be resolved
96
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
97
+ "import/no-unresolved": "off",
98
+ // ensure named imports coupled with named exports
99
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
100
+ "import/named": "error",
101
+ // ensure default import coupled with default export
102
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
103
+ "import/default": "off",
104
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/namespace.md
105
+ "import/namespace": "off",
106
+ // Helpful warnings:
107
+ // disallow invalid exports, e.g. multiple defaults
108
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/export.md
109
+ "import/export": "error",
110
+ // do not allow a default import name to match a named export
111
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
112
+ "import/no-named-as-default": "error",
113
+ // warn on accessing default export property names that are also named exports
114
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
115
+ "import/no-named-as-default-member": "error",
116
+ // disallow use of jsdoc-marked-deprecated imports
117
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
118
+ "import/no-deprecated": "off",
119
+ // Forbid the use of extraneous packages
120
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
121
+ // paths are treated both as absolute paths, and relative to process.cwd()
122
+ // "import/no-extraneous-dependencies": [
123
+ // "error",
124
+ // {
125
+ // devDependencies: [
126
+ // "test/**", // tape, common npm pattern
127
+ // "tests/**", // also common npm pattern
128
+ // "spec/**", // mocha, rspec-like pattern
129
+ // "**/__tests__/**", // jest pattern
130
+ // "**/__mocks__/**", // jest pattern
131
+ // "test.{js,jsx}", // repos with a single test file
132
+ // "test-*.{js,jsx}", // repos with multiple top-level test files
133
+ // "**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
134
+ // "**/jest.config.js", // jest config
135
+ // "**/jest.setup.js", // jest setup
136
+ // "**/vue.config.js", // vue-cli config
137
+ // "**/webpack.config.js", // webpack config
138
+ // "**/webpack.config.*.js", // webpack config
139
+ // "**/rollup.config.js", // rollup config
140
+ // "**/rollup.config.*.js", // rollup config
141
+ // "**/gulpfile.js", // gulp config
142
+ // "**/gulpfile.*.js", // gulp config
143
+ // "**/Gruntfile{,.js}", // grunt config
144
+ // "**/protractor.conf.js", // protractor config
145
+ // "**/protractor.conf.*.js", // protractor config
146
+ // "**/karma.conf.js", // karma config
147
+ // "**/.eslintrc.js" // eslint config
148
+ // ],
149
+ // optionalDependencies: false
150
+ // }
151
+ // ],
152
+ // Module systems:
153
+ // disallow require()
154
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
155
+ "import/no-commonjs": "off",
156
+ // disallow AMD require/define
157
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-amd.md
158
+ "import/no-amd": "error",
159
+ // No Node.js builtin modules
160
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
161
+ // TODO: enable?
162
+ "import/no-nodejs-modules": "off",
163
+ // Style guide:
164
+ // disallow non-import statements appearing before import statements
165
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/imports-first.md
166
+ // deprecated: use `import/first`
167
+ "import/imports-first": "off",
168
+ // disallow namespace imports
169
+ // TODO: enable?
170
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-namespace.md
171
+ "import/no-namespace": "off",
172
+ // Restrict which files can be imported in a given folder
173
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
174
+ "import/no-restricted-paths": "off",
175
+ // Forbid modules to have too many dependencies
176
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
177
+ "import/max-dependencies": [
178
+ "warn",
179
+ {
180
+ max: 50
181
+ }
182
+ ],
183
+ // Forbid require() calls with expressions
184
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
185
+ "import/no-dynamic-require": "error",
186
+ // prevent importing the submodules of other modules
187
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
188
+ "import/no-internal-modules": [
189
+ "off",
190
+ {
191
+ allow: []
192
+ }
193
+ ],
194
+ // Warn if a module could be mistakenly parsed as a script by a consumer
195
+ // leveraging Unambiguous JavaScript Grammar
196
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/unambiguous.md
197
+ // this should not be enabled until this proposal has at least been *presented* to TC39.
198
+ // At the moment, it's not a thing.
199
+ "import/unambiguous": "off",
200
+ // Forbid Webpack loader syntax in imports
201
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
202
+ "import/no-webpack-loader-syntax": "error",
203
+ // Prevent unassigned imports
204
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md
205
+ // importing for side effects is perfectly acceptable, if you need side effects.
206
+ "import/no-unassigned-import": "off",
207
+ // Prevent importing the default as if it were named
208
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-default.md
209
+ "import/no-named-default": "error",
210
+ // Reports if a module's default export is unnamed
211
+ // https://github.com/import-js/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
212
+ "import/no-anonymous-default-export": [
213
+ "off",
214
+ {
215
+ allowArray: false,
216
+ allowArrowFunction: false,
217
+ allowAnonymousClass: false,
218
+ allowAnonymousFunction: false,
219
+ allowLiteral: false,
220
+ allowObject: false
221
+ }
222
+ ],
223
+ // This rule enforces that all exports are declared at the bottom of the file.
224
+ // https://github.com/import-js/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
225
+ // TODO: enable?
226
+ "import/exports-last": "off",
227
+ // Reports when named exports are not grouped together in a single export declaration
228
+ // or when multiple assignments to CommonJS module.exports or exports object are present
229
+ // in a single file.
230
+ // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
231
+ "import/group-exports": "off",
232
+ // Prohibit named exports. this is a terrible rule, do not use it.
233
+ // https://github.com/import-js/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
234
+ "import/no-named-export": "off",
235
+ /**
236
+ * Disallow cyclical dependencies between modules.
237
+ *
238
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
239
+ */
240
+ "import/no-cycle": [
241
+ "error",
242
+ {
243
+ maxDepth: "\u221E"
244
+ }
245
+ ],
246
+ // dynamic imports require a leading comment with a webpackChunkName
247
+ // https://github.com/import-js/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
248
+ "import/dynamic-import-chunkname": [
249
+ "off",
250
+ {
251
+ importFunctions: [],
252
+ webpackChunknameFormat: "[0-9a-zA-Z-_/.]+"
253
+ }
254
+ ],
255
+ // Use this rule to prevent imports to folders in relative parent paths.
256
+ // https://github.com/import-js/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
257
+ "import/no-relative-parent-imports": "off",
258
+ // Reports modules without any exports, or with unused exports
259
+ // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
260
+ // TODO: enable once it supports CJS
261
+ "import/no-unused-modules": [
262
+ "off",
263
+ {
264
+ ignoreExports: [],
265
+ missingExports: true,
266
+ unusedExports: true
267
+ }
268
+ ],
269
+ // Reports the use of import declarations with CommonJS exports in any module except for the main module.
270
+ // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md
271
+ "import/no-import-module-exports": [
272
+ "error",
273
+ {
274
+ exceptions: []
275
+ }
276
+ ],
277
+ // enforce a consistent style for type specifiers (inline or top-level)
278
+ // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md
279
+ // TODO, semver-major: enable (just in case)
280
+ "import/consistent-type-specifier-style": [
281
+ "off",
282
+ "prefer-inline"
283
+ ],
284
+ // Reports the use of empty named import blocks.
285
+ // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md
286
+ // TODO, semver-minor: enable
287
+ "import/no-empty-named-blocks": "off"
288
+ };
289
+ var import_default = config;
290
+
291
+
292
+ exports.default = import_default;
@@ -0,0 +1,5 @@
1
+ import { Linter } from 'eslint';
2
+
3
+ declare const config: Linter.RulesRecord;
4
+
5
+ export { config as default };
@@ -0,0 +1,5 @@
1
+ import { Linter } from 'eslint';
2
+
3
+ declare const config: Linter.RulesRecord;
4
+
5
+ export { config as default };
@@ -0,0 +1,292 @@
1
+ import "../chunk-SHUYVCID.js";
2
+
3
+ // src/rules/import.ts
4
+ var config = {
5
+ /**
6
+ * Disallow non-import statements appearing before import statements.
7
+ *
8
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
9
+ */
10
+ "import/first": "warn",
11
+ /**
12
+ * Require a newline after the last import/require.
13
+ *
14
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
15
+ */
16
+ "import/newline-after-import": "warn",
17
+ /**
18
+ * Disallow import of modules using absolute paths.
19
+ *
20
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
21
+ */
22
+ "import/no-absolute-path": "error",
23
+ /**
24
+ * Disallow default exports.
25
+ *
26
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
27
+ */
28
+ "import/no-default-export": "error",
29
+ /**
30
+ * Disallow the use of extraneous packages.
31
+ *
32
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
33
+ */
34
+ "import/no-extraneous-dependencies": [
35
+ "error",
36
+ {
37
+ includeInternal: true,
38
+ includeTypes: true
39
+ }
40
+ ],
41
+ /**
42
+ * Disallow mutable exports.
43
+ *
44
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
45
+ */
46
+ "import/no-mutable-exports": "error",
47
+ /**
48
+ * Disallow importing packages through relative paths.
49
+ *
50
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
51
+ */
52
+ "import/no-relative-packages": "warn",
53
+ /**
54
+ * Disallow a module from importing itself.
55
+ *
56
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
57
+ */
58
+ "import/no-self-import": "error",
59
+ /**
60
+ * Ensures that there are no useless path segments.
61
+ *
62
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
63
+ */
64
+ "import/no-useless-path-segments": [
65
+ "error"
66
+ ],
67
+ /**
68
+ * Enforce a module import order convention.
69
+ *
70
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
71
+ */
72
+ "import/order": [
73
+ "warn",
74
+ {
75
+ groups: [
76
+ "builtin",
77
+ "external",
78
+ "internal",
79
+ "parent",
80
+ "sibling",
81
+ "index"
82
+ // Relative index
83
+ ],
84
+ "newlines-between": "never"
85
+ }
86
+ ],
87
+ "import/extensions": [
88
+ "error",
89
+ "ignorePackages"
90
+ ],
91
+ "import/prefer-default-export": "off",
92
+ // Reports any imports that come after non-import statements
93
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
94
+ "import/no-duplicates": "error",
95
+ // ensure imports point to files/modules that can be resolved
96
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
97
+ "import/no-unresolved": "off",
98
+ // ensure named imports coupled with named exports
99
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
100
+ "import/named": "error",
101
+ // ensure default import coupled with default export
102
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
103
+ "import/default": "off",
104
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/namespace.md
105
+ "import/namespace": "off",
106
+ // Helpful warnings:
107
+ // disallow invalid exports, e.g. multiple defaults
108
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/export.md
109
+ "import/export": "error",
110
+ // do not allow a default import name to match a named export
111
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
112
+ "import/no-named-as-default": "error",
113
+ // warn on accessing default export property names that are also named exports
114
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
115
+ "import/no-named-as-default-member": "error",
116
+ // disallow use of jsdoc-marked-deprecated imports
117
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
118
+ "import/no-deprecated": "off",
119
+ // Forbid the use of extraneous packages
120
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
121
+ // paths are treated both as absolute paths, and relative to process.cwd()
122
+ // "import/no-extraneous-dependencies": [
123
+ // "error",
124
+ // {
125
+ // devDependencies: [
126
+ // "test/**", // tape, common npm pattern
127
+ // "tests/**", // also common npm pattern
128
+ // "spec/**", // mocha, rspec-like pattern
129
+ // "**/__tests__/**", // jest pattern
130
+ // "**/__mocks__/**", // jest pattern
131
+ // "test.{js,jsx}", // repos with a single test file
132
+ // "test-*.{js,jsx}", // repos with multiple top-level test files
133
+ // "**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
134
+ // "**/jest.config.js", // jest config
135
+ // "**/jest.setup.js", // jest setup
136
+ // "**/vue.config.js", // vue-cli config
137
+ // "**/webpack.config.js", // webpack config
138
+ // "**/webpack.config.*.js", // webpack config
139
+ // "**/rollup.config.js", // rollup config
140
+ // "**/rollup.config.*.js", // rollup config
141
+ // "**/gulpfile.js", // gulp config
142
+ // "**/gulpfile.*.js", // gulp config
143
+ // "**/Gruntfile{,.js}", // grunt config
144
+ // "**/protractor.conf.js", // protractor config
145
+ // "**/protractor.conf.*.js", // protractor config
146
+ // "**/karma.conf.js", // karma config
147
+ // "**/.eslintrc.js" // eslint config
148
+ // ],
149
+ // optionalDependencies: false
150
+ // }
151
+ // ],
152
+ // Module systems:
153
+ // disallow require()
154
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
155
+ "import/no-commonjs": "off",
156
+ // disallow AMD require/define
157
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-amd.md
158
+ "import/no-amd": "error",
159
+ // No Node.js builtin modules
160
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
161
+ // TODO: enable?
162
+ "import/no-nodejs-modules": "off",
163
+ // Style guide:
164
+ // disallow non-import statements appearing before import statements
165
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/imports-first.md
166
+ // deprecated: use `import/first`
167
+ "import/imports-first": "off",
168
+ // disallow namespace imports
169
+ // TODO: enable?
170
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-namespace.md
171
+ "import/no-namespace": "off",
172
+ // Restrict which files can be imported in a given folder
173
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
174
+ "import/no-restricted-paths": "off",
175
+ // Forbid modules to have too many dependencies
176
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
177
+ "import/max-dependencies": [
178
+ "warn",
179
+ {
180
+ max: 50
181
+ }
182
+ ],
183
+ // Forbid require() calls with expressions
184
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
185
+ "import/no-dynamic-require": "error",
186
+ // prevent importing the submodules of other modules
187
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
188
+ "import/no-internal-modules": [
189
+ "off",
190
+ {
191
+ allow: []
192
+ }
193
+ ],
194
+ // Warn if a module could be mistakenly parsed as a script by a consumer
195
+ // leveraging Unambiguous JavaScript Grammar
196
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/unambiguous.md
197
+ // this should not be enabled until this proposal has at least been *presented* to TC39.
198
+ // At the moment, it's not a thing.
199
+ "import/unambiguous": "off",
200
+ // Forbid Webpack loader syntax in imports
201
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
202
+ "import/no-webpack-loader-syntax": "error",
203
+ // Prevent unassigned imports
204
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md
205
+ // importing for side effects is perfectly acceptable, if you need side effects.
206
+ "import/no-unassigned-import": "off",
207
+ // Prevent importing the default as if it were named
208
+ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-default.md
209
+ "import/no-named-default": "error",
210
+ // Reports if a module's default export is unnamed
211
+ // https://github.com/import-js/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
212
+ "import/no-anonymous-default-export": [
213
+ "off",
214
+ {
215
+ allowArray: false,
216
+ allowArrowFunction: false,
217
+ allowAnonymousClass: false,
218
+ allowAnonymousFunction: false,
219
+ allowLiteral: false,
220
+ allowObject: false
221
+ }
222
+ ],
223
+ // This rule enforces that all exports are declared at the bottom of the file.
224
+ // https://github.com/import-js/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
225
+ // TODO: enable?
226
+ "import/exports-last": "off",
227
+ // Reports when named exports are not grouped together in a single export declaration
228
+ // or when multiple assignments to CommonJS module.exports or exports object are present
229
+ // in a single file.
230
+ // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
231
+ "import/group-exports": "off",
232
+ // Prohibit named exports. this is a terrible rule, do not use it.
233
+ // https://github.com/import-js/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
234
+ "import/no-named-export": "off",
235
+ /**
236
+ * Disallow cyclical dependencies between modules.
237
+ *
238
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
239
+ */
240
+ "import/no-cycle": [
241
+ "error",
242
+ {
243
+ maxDepth: "\u221E"
244
+ }
245
+ ],
246
+ // dynamic imports require a leading comment with a webpackChunkName
247
+ // https://github.com/import-js/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
248
+ "import/dynamic-import-chunkname": [
249
+ "off",
250
+ {
251
+ importFunctions: [],
252
+ webpackChunknameFormat: "[0-9a-zA-Z-_/.]+"
253
+ }
254
+ ],
255
+ // Use this rule to prevent imports to folders in relative parent paths.
256
+ // https://github.com/import-js/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
257
+ "import/no-relative-parent-imports": "off",
258
+ // Reports modules without any exports, or with unused exports
259
+ // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
260
+ // TODO: enable once it supports CJS
261
+ "import/no-unused-modules": [
262
+ "off",
263
+ {
264
+ ignoreExports: [],
265
+ missingExports: true,
266
+ unusedExports: true
267
+ }
268
+ ],
269
+ // Reports the use of import declarations with CommonJS exports in any module except for the main module.
270
+ // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md
271
+ "import/no-import-module-exports": [
272
+ "error",
273
+ {
274
+ exceptions: []
275
+ }
276
+ ],
277
+ // enforce a consistent style for type specifiers (inline or top-level)
278
+ // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md
279
+ // TODO, semver-major: enable (just in case)
280
+ "import/consistent-type-specifier-style": [
281
+ "off",
282
+ "prefer-inline"
283
+ ],
284
+ // Reports the use of empty named import blocks.
285
+ // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md
286
+ // TODO, semver-minor: enable
287
+ "import/no-empty-named-blocks": "off"
288
+ };
289
+ var import_default = config;
290
+ export {
291
+ import_default as default
292
+ };