eslint-config-complete 1.2.2 → 1.2.4

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 (39) hide show
  1. package/dist/base/base-eslint.d.ts +12 -0
  2. package/dist/base/base-eslint.d.ts.map +1 -0
  3. package/dist/base/base-eslint.js +670 -0
  4. package/dist/base/base-import-x.d.ts +12 -0
  5. package/dist/base/base-import-x.d.ts.map +1 -0
  6. package/dist/base/base-import-x.js +262 -0
  7. package/dist/base/base-jsdoc.d.ts +6 -0
  8. package/dist/base/base-jsdoc.d.ts.map +1 -0
  9. package/dist/base/base-jsdoc.js +212 -0
  10. package/dist/base/base-n.d.ts +7 -0
  11. package/dist/base/base-n.d.ts.map +1 -0
  12. package/dist/base/base-n.js +108 -0
  13. package/dist/base/base-stylistic.d.ts +6 -0
  14. package/dist/base/base-stylistic.d.ts.map +1 -0
  15. package/dist/base/base-stylistic.js +35 -0
  16. package/dist/base/base-typescript-eslint.d.ts +6 -0
  17. package/dist/base/base-typescript-eslint.d.ts.map +1 -0
  18. package/dist/base/base-typescript-eslint.js +479 -0
  19. package/dist/base/base-unicorn.d.ts +10 -0
  20. package/dist/base/base-unicorn.d.ts.map +1 -0
  21. package/dist/base/base-unicorn.js +203 -0
  22. package/dist/base.d.ts +8 -0
  23. package/dist/base.d.ts.map +1 -0
  24. package/{src → dist}/base.js +17 -30
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/monorepo.d.ts +6 -0
  28. package/dist/monorepo.d.ts.map +1 -0
  29. package/dist/monorepo.js +16 -0
  30. package/package.json +5 -3
  31. package/src/base/base-eslint.js +0 -850
  32. package/src/base/base-import-x.js +0 -312
  33. package/src/base/base-jsdoc.js +0 -276
  34. package/src/base/base-n.js +0 -150
  35. package/src/base/base-stylistic.js +0 -38
  36. package/src/base/base-typescript-eslint.js +0 -554
  37. package/src/base/base-unicorn.js +0 -246
  38. package/src/monorepo.js +0 -18
  39. /package/{src → dist}/index.js +0 -0
@@ -1,246 +0,0 @@
1
- import ESLintPluginUnicorn from "eslint-plugin-unicorn";
2
- import tseslint from "typescript-eslint";
3
-
4
- /**
5
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/readme.md#rules
6
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
7
- */
8
- const NORMAL_RULES = {
9
- "unicorn/better-regex": "warn",
10
- "unicorn/catch-error-name": "warn",
11
-
12
- /** Disabled because it has too many false positives. */
13
- "unicorn/consistent-destructuring": "off",
14
-
15
- "unicorn/consistent-empty-array-spread": "warn",
16
- "unicorn/consistent-function-scoping": "warn",
17
- "unicorn/custom-error-definition": "warn",
18
- "unicorn/empty-brace-spaces": "off", // eslint-config-prettier
19
- "unicorn/error-message": "warn",
20
- "unicorn/escape-case": "warn",
21
- "unicorn/expiring-todo-comments": "warn",
22
- "unicorn/explicit-length-check": "warn",
23
-
24
- /** Disabled since projects may use different file naming conventions. */
25
- "unicorn/filename-case": "off",
26
-
27
- "unicorn/import-style": "warn",
28
- "unicorn/new-for-builtins": "warn",
29
-
30
- /**
31
- * Disabled because if a line breaks three or more ESLint rules, then it is useful to use a single
32
- * "eslint-disable" comment to make things more concise.
33
- */
34
- "unicorn/no-abusive-eslint-disable": "off",
35
-
36
- "unicorn/no-anonymous-default-export": "warn",
37
-
38
- /** Disabled since it is not helpful when using TypeScript. */
39
- "unicorn/no-array-callback-reference": "off",
40
-
41
- "unicorn/no-array-for-each": "warn",
42
- "unicorn/no-array-method-this-argument": "warn",
43
- "unicorn/no-array-push-push": "warn",
44
- "unicorn/no-array-reduce": "warn",
45
- "unicorn/no-await-expression-member": "warn",
46
- "unicorn/no-await-in-promise-methods": "warn",
47
- "unicorn/no-console-spaces": "warn",
48
- "unicorn/no-document-cookie": "warn",
49
- "unicorn/no-empty-file": "warn",
50
- "unicorn/no-for-loop": "warn",
51
- "unicorn/no-hex-escape": "warn",
52
- "unicorn/no-instanceof-array": "warn",
53
- "unicorn/no-invalid-fetch-options": "warn",
54
- "unicorn/no-invalid-remove-event-listener": "warn",
55
-
56
- /** Disabled because it is common to prefix variables with "new". */
57
- "unicorn/no-keyword-prefix": "off",
58
-
59
- "unicorn/no-length-as-slice-end": "warn",
60
- "unicorn/no-lonely-if": "warn",
61
- "unicorn/no-magic-array-flat-depth": "warn",
62
- "unicorn/no-negated-condition": "warn",
63
- "unicorn/no-negation-in-equality-check": "warn",
64
- "unicorn/no-nested-ternary": "off", // eslint-config-prettier
65
- "unicorn/no-new-array": "warn",
66
- "unicorn/no-new-buffer": "warn",
67
- "unicorn/no-null": "warn",
68
- "unicorn/no-object-as-default-parameter": "warn",
69
-
70
- /**
71
- * Disabled because using `process.exit` is common to exit command-line applications without
72
- * verbose output.
73
- */
74
- "unicorn/no-process-exit": "off",
75
-
76
- "unicorn/no-single-promise-in-promise-methods": "warn",
77
- "unicorn/no-static-only-class": "warn",
78
- "unicorn/no-thenable": "warn",
79
-
80
- /** Superseded by the `@typescript-eslint/no-this-alias` rule. */
81
- "unicorn/no-this-assignment": "off",
82
-
83
- "unicorn/no-typeof-undefined": "warn",
84
- "unicorn/no-unnecessary-await": "warn",
85
- "unicorn/no-unnecessary-polyfills": "warn",
86
- "unicorn/no-unreadable-array-destructuring": "warn",
87
- "unicorn/no-unreadable-iife": "warn",
88
- "unicorn/no-unused-properties": "warn",
89
- "unicorn/no-useless-fallback-in-spread": "warn",
90
- "unicorn/no-useless-length-check": "warn",
91
- "unicorn/no-useless-promise-resolve-reject": "warn",
92
- "unicorn/no-useless-spread": "warn",
93
- "unicorn/no-useless-switch-case": "warn",
94
-
95
- /** Disabled since it does not work properly with TypeScript. */
96
- "unicorn/no-useless-undefined": "off",
97
-
98
- "unicorn/no-zero-fractions": "warn",
99
- "unicorn/number-literal-case": "off", // eslint-config-prettier
100
- "unicorn/numeric-separators-style": "warn",
101
- "unicorn/prefer-add-event-listener": "warn",
102
- "unicorn/prefer-array-find": "warn",
103
- "unicorn/prefer-array-flat": "warn",
104
- "unicorn/prefer-array-flat-map": "warn",
105
- "unicorn/prefer-array-index-of": "warn",
106
- "unicorn/prefer-array-some": "warn",
107
- "unicorn/prefer-at": "warn",
108
- "unicorn/prefer-blob-reading-methods": "warn",
109
- "unicorn/prefer-code-point": "warn",
110
- "unicorn/prefer-date-now": "warn",
111
- "unicorn/prefer-default-parameters": "warn",
112
- "unicorn/prefer-dom-node-append": "warn",
113
- "unicorn/prefer-dom-node-dataset": "warn",
114
- "unicorn/prefer-dom-node-remove": "warn",
115
- "unicorn/prefer-dom-node-text-content": "warn",
116
- "unicorn/prefer-event-target": "warn",
117
- "unicorn/prefer-export-from": "warn",
118
- "unicorn/prefer-includes": "warn",
119
-
120
- /** Disabled because the rule is not compatible with TypeScript. */
121
- "unicorn/prefer-json-parse-buffer": "off",
122
-
123
- "unicorn/prefer-keyboard-event-key": "warn",
124
- "unicorn/prefer-logical-operator-over-ternary": "warn",
125
- "unicorn/prefer-math-trunc": "warn",
126
- "unicorn/prefer-modern-dom-apis": "warn",
127
- "unicorn/prefer-modern-math-apis": "warn",
128
- "unicorn/prefer-module": "warn",
129
- "unicorn/prefer-native-coercion-functions": "warn",
130
- "unicorn/prefer-negative-index": "warn",
131
- "unicorn/prefer-node-protocol": "warn",
132
- "unicorn/prefer-number-properties": "warn",
133
- "unicorn/prefer-object-from-entries": "warn",
134
- "unicorn/prefer-optional-catch-binding": "warn",
135
- "unicorn/prefer-prototype-methods": "warn",
136
- "unicorn/prefer-query-selector": "warn",
137
- "unicorn/prefer-reflect-apply": "warn",
138
- "unicorn/prefer-regexp-test": "warn",
139
- "unicorn/prefer-set-has": "warn",
140
- "unicorn/prefer-set-size": "warn",
141
- "unicorn/prefer-spread": "warn",
142
- "unicorn/prefer-string-raw": "warn",
143
- "unicorn/prefer-string-replace-all": "warn",
144
- "unicorn/prefer-string-slice": "warn",
145
- "unicorn/prefer-string-starts-ends-with": "warn",
146
- "unicorn/prefer-string-trim-start-end": "warn",
147
- "unicorn/prefer-structured-clone": "warn",
148
- "unicorn/prefer-switch": "warn",
149
- "unicorn/prefer-ternary": "warn",
150
- "unicorn/prefer-top-level-await": "warn",
151
- "unicorn/prefer-type-error": "warn",
152
-
153
- /** Disabled since it is common to use the variable name of "i". */
154
- "unicorn/prevent-abbreviations": "off",
155
-
156
- "unicorn/relative-url-style": "warn",
157
- "unicorn/require-array-join-separator": "warn",
158
- "unicorn/require-number-to-fixed-digits-argument": "warn",
159
-
160
- /** Disabled since it is not recommended by the plugin authors. */
161
- "unicorn/require-post-message-target-origin": "off",
162
-
163
- /** Disabled since string content enforcement is too project-specific. */
164
- "unicorn/string-content": "off",
165
-
166
- "unicorn/switch-case-braces": "warn",
167
- "unicorn/template-indent": "warn",
168
- "unicorn/text-encoding-identifier-case": "warn",
169
- "unicorn/throw-new-error": "warn",
170
- };
171
-
172
- /**
173
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/deprecated-rules.md
174
- * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
175
- */
176
- const DEPRECATED_RULES = {
177
- /** Disabled because this rule is deprecated. */
178
- "unicorn/import-index": "off",
179
-
180
- /** Disabled because this rule is deprecated. */
181
- "unicorn/no-array-instanceof": "off",
182
-
183
- /** Disabled because this rule is deprecated. */
184
- "unicorn/no-fn-reference-in-iterator": "off",
185
-
186
- /** Disabled because this rule is deprecated. */
187
- "unicorn/no-reduce": "off",
188
-
189
- /** Disabled because this rule is deprecated. */
190
- "unicorn/no-unsafe-regex": "off",
191
-
192
- /** Disabled because this rule is deprecated. */
193
- "unicorn/prefer-dataset": "off",
194
-
195
- /** Disabled because this rule is deprecated. */
196
- "unicorn/prefer-event-key": "off",
197
-
198
- /** Disabled because this rule is deprecated. */
199
- "unicorn/prefer-exponentiation-operator": "off",
200
-
201
- /** Disabled because this rule is deprecated. */
202
- "unicorn/prefer-flat-map": "off",
203
-
204
- /** Disabled because this rule is deprecated. */
205
- "unicorn/prefer-node-append": "off",
206
-
207
- /** Disabled because this rule is deprecated. */
208
- "unicorn/prefer-node-remove": "off",
209
-
210
- /** Disabled because this rule is deprecated. */
211
- "unicorn/prefer-object-has-own": "off",
212
-
213
- /** Disabled because this rule is deprecated. */
214
- "unicorn/prefer-replace-all": "off",
215
-
216
- /** Disabled because this rule is deprecated. */
217
- "unicorn/prefer-starts-ends-with": "off",
218
-
219
- /** Disabled because this rule is deprecated. */
220
- "unicorn/prefer-text-content": "off",
221
-
222
- /** Disabled because this rule is deprecated. */
223
- "unicorn/prefer-trim-start-end": "off",
224
-
225
- /** Disabled because this rule is deprecated. */
226
- "unicorn/regex-shorthand": "off",
227
- };
228
-
229
- /**
230
- * This ESLint config only contains rules from `eslint-plugin-unicorn`:
231
- * https://github.com/sindresorhus/eslint-plugin-unicorn
232
- *
233
- * Rules are separated into categories:
234
- * 1) Normal rules
235
- * 2) Deprecated rules
236
- */
237
- export const baseUnicorn = tseslint.config({
238
- plugins: {
239
- unicorn: ESLintPluginUnicorn,
240
- },
241
-
242
- rules: {
243
- ...NORMAL_RULES,
244
- ...DEPRECATED_RULES,
245
- },
246
- });
package/src/monorepo.js DELETED
@@ -1,18 +0,0 @@
1
- import tseslint from "typescript-eslint";
2
-
3
- /**
4
- * This ESLint config is meant to be used in monorepos that install dependencies at the root (in
5
- * addition to the `completeBase` config).
6
- */
7
- export const completeConfigMonorepo = tseslint.config({
8
- files: ["eslint.config.mjs"],
9
- rules: {
10
- // ESLint configs in monorepos often intentionally import from the "src" subdirectory (because
11
- // the config files are JavaScript so they cannot use tsconfig-paths).
12
- "@typescript-eslint/no-restricted-imports": "off",
13
-
14
- // ESLint configs in monorepos often intentionally import from the "packages" subdirectory
15
- // (because the config files are JavaScript so they cannot use tsconfig-paths).
16
- "import-x/no-relative-packages": "off",
17
- },
18
- });
File without changes