@seanblonien/eslint-config-base 1.0.11 → 1.0.13

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.
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import eslint from "@eslint/js";
3
3
  import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
4
4
  import stylistic from "@stylistic/eslint-plugin";
5
5
  import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
6
+ import functionalPlugin from "eslint-plugin-functional";
6
7
  import importXPlugin from "eslint-plugin-import-x";
7
8
  import sonarjsPlugin from "eslint-plugin-sonarjs";
8
9
  import sortPlugin from "eslint-plugin-sort";
@@ -78,16 +79,14 @@ var booleanNameConvention = new RegExp(
78
79
 
79
80
  // src/index.ts
80
81
  var config = [
81
- // Base recommended rules from ESLint
82
+ // Base configurations
82
83
  eslint.configs.recommended,
83
- // TypeScript recommended configs
84
84
  ...tseslint.configs.recommendedTypeChecked,
85
85
  ...tseslint.configs.stylisticTypeChecked,
86
86
  ...tseslint.configs.strict,
87
- // Apply stylistic rules with customized settings
87
+ // Plugin configurations
88
88
  stylistic.configs.customize({
89
89
  arrowParens: true,
90
- // jsx: true,
91
90
  braceStyle: "1tbs",
92
91
  commaDangle: "always-multiline",
93
92
  indent: 2,
@@ -95,15 +94,17 @@ var config = [
95
94
  quotes: "single",
96
95
  semi: true
97
96
  }),
98
- // Import plugin configuration
99
97
  importXPlugin.flatConfigs.recommended,
100
98
  importXPlugin.flatConfigs.typescript,
101
99
  sortPlugin.configs["flat/recommended"],
102
- // Code quality plugins
103
100
  unicornPlugin.configs.recommended,
104
101
  comments.recommended,
105
102
  sonarjsPlugin.configs.recommended,
106
- // General JavaScript/TypeScript configuration
103
+ // Functional programming rules
104
+ functionalPlugin.configs.externalTypeScriptRecommended,
105
+ functionalPlugin.configs.recommended,
106
+ functionalPlugin.configs.stylistic,
107
+ // Main configuration
107
108
  {
108
109
  files: ["**/*.{js,mjs,cjs,ts,tsx}"],
109
110
  languageOptions: {
@@ -130,44 +131,100 @@ var config = [
130
131
  "unused-imports": unusedImports
131
132
  },
132
133
  rules: {
133
- // --- Stylistic Rules ---
134
- // Core rules turned off in favor of stylistic rules
134
+ // === DISABLED CORE RULES (replaced by plugins) ===
135
+ // These core ESLint rules are disabled because we use enhanced versions from plugins:
135
136
  "quotes": "off",
137
+ // Replaced by @stylistic/quotes with better formatting options and JSX support
136
138
  "jsx-quotes": "off",
139
+ // Replaced by @stylistic/jsx-quotes for JSX-specific quote handling
137
140
  "func-call-spacing": "off",
141
+ // Replaced by @stylistic/function-call-spacing for consistent spacing
138
142
  "dot-notation": "off",
143
+ // Replaced by @typescript-eslint/dot-notation with TypeScript awareness
139
144
  "no-unused-expressions": "off",
145
+ // Replaced by @typescript-eslint/no-unused-expressions with better TS support
140
146
  "no-use-before-define": "off",
147
+ // Replaced by @typescript-eslint/no-use-before-define for TypeScript hoisting rules
141
148
  "default-param-last": "off",
149
+ // Replaced by @typescript-eslint/default-param-last with TS parameter awareness
142
150
  "no-redeclare": "off",
151
+ // Replaced by @typescript-eslint/no-redeclare for better type checking
143
152
  "no-shadow": "off",
144
- // Stylistic (overrides vs stylistic recommended)
145
- "quote-props": ["warn", "consistent-as-needed"],
153
+ // Replaced by @typescript-eslint/no-shadow for TypeScript variable shadowing
154
+ "spaced-comment": "off",
155
+ // Replaced by @stylistic/spaced-comment with more formatting options
156
+ "no-unused-vars": "off",
157
+ // Replaced by @typescript-eslint/no-unused-vars and unused-imports plugin
158
+ "@stylistic/no-unused-vars": "off",
159
+ // Replaced by unused-imports/no-unused-vars for better import handling
160
+ "sonarjs/no-unused-vars": "off",
161
+ // Replaced by unused-imports/no-unused-vars to avoid conflicts
162
+ "no-magic-numbers": "off",
163
+ // Replaced by @typescript-eslint/no-magic-numbers with TypeScript-aware exceptions
164
+ // === DISABLED PLUGIN RULES (intentionally turned off) ===
165
+ // Sort plugin rules (replaced by import-x/order):
166
+ "sort/imports": "off",
167
+ // Replaced by import-x/order which has better TypeScript support
168
+ "sort/object-properties": "off",
169
+ // Object property sorting is not required
170
+ "sort/string-unions": "off",
171
+ // String union sorting is not required
172
+ // Unicorn rules that are too restrictive or don't match our style:
173
+ "unicorn/prefer-global-this": "off",
174
+ // GlobalThis is not always preferred over window/global
175
+ "unicorn/prevent-abbreviations": "off",
176
+ // Common abbreviations (props, args, etc.) are acceptable
177
+ "unicorn/no-array-reduce": "off",
178
+ // Array.reduce is a valid and useful method
179
+ "unicorn/no-array-for-each": "off",
180
+ // Array.forEach is preferred over for...of in many cases
181
+ "unicorn/prefer-top-level-await": "off",
182
+ // Top-level await is not always appropriate
183
+ "unicorn/no-array-callback-reference": "off",
184
+ // Method references as callbacks are acceptable
185
+ "unicorn/prefer-switch": "off",
186
+ // Switch statements are banned (see no-restricted-syntax below)
187
+ "unicorn/prefer-object-from-entries": "off",
188
+ // Object.fromEntries is not always better
189
+ "unicorn/no-null": "off",
190
+ // Null is still a valid value in many contexts
191
+ // SonarJS rules that are disabled for various reasons:
192
+ "sonarjs/cognitive-complexity": "off",
193
+ // Replaced by core complexity rule which is simpler
194
+ "sonarjs/no-nested-functions": "off",
195
+ // Replaced by complexity rule, nested functions are sometimes needed
196
+ "sonarjs/function-return-type": "off",
197
+ // TypeScript handles return type checking better
198
+ "sonarjs/no-redundant-optional": "off",
199
+ // TypeScript handles optional types better
200
+ "sonarjs/no-commented-code": "off",
201
+ // Performance-intensive rule, commented code is sometimes useful
202
+ "sonarjs/todo-tag": "off",
203
+ // TODO comments are acceptable during development
204
+ "sonarjs/pseudo-random": "off",
205
+ // Math.random() is acceptable for non-cryptographic uses
206
+ "sonarjs/void-use": "off",
207
+ // Allow void operators for type assertions and async function annotations
208
+ "sonarjs/no-nested-conditional": "off",
209
+ // Replaced by no-nested-ternary rule
210
+ "sonarjs/no-hardcoded-passwords": "off",
211
+ "sonarjs/prefer-read-only-props": "off",
212
+ // Import and testing rules:
213
+ "import-x/no-named-as-default-member": "off",
214
+ // Named default exports are sometimes necessary
215
+ // === STYLISTIC & FORMATTING ===
146
216
  "@stylistic/quotes": ["warn", "single", { avoidEscape: true }],
147
217
  "@stylistic/jsx-quotes": ["warn", "prefer-single"],
148
- "@stylistic/jsx-one-expression-per-line": "off",
149
218
  "@stylistic/block-spacing": ["warn", "never"],
150
219
  "@stylistic/object-curly-newline": [
151
220
  "warn",
152
221
  { ObjectPattern: { multiline: true, consistent: true } }
153
222
  ],
154
- "object-property-newline": [
155
- "warn",
156
- { allowAllPropertiesOnSameLine: true }
157
- ],
158
- "function-call-argument-newline": ["warn", "consistent"],
159
- "no-multiple-empty-lines": ["warn", { max: 1, maxEOF: 1 }],
160
- "no-multi-spaces": "warn",
161
- "no-useless-rename": "warn",
162
- "arrow-spacing": "warn",
163
- "space-infix-ops": "warn",
164
223
  "@stylistic/operator-linebreak": [
165
224
  "warn",
166
225
  "after",
167
226
  { overrides: { "?": "before", ":": "before" } }
168
227
  ],
169
- "comma-style": ["warn", "last"],
170
- "complexity": ["warn", { max: 20 }],
171
228
  "@stylistic/max-len": [
172
229
  "warn",
173
230
  {
@@ -181,16 +238,6 @@ var config = [
181
238
  ignoreRegExpLiterals: true
182
239
  }
183
240
  ],
184
- "no-extra-parens": [
185
- "error",
186
- "all",
187
- {
188
- ignoreJSX: "all",
189
- // don’t complain about JSX parens
190
- enforceForArrowConditionals: false,
191
- nestedBinaryExpressions: false
192
- }
193
- ],
194
241
  "@stylistic/jsx-wrap-multilines": [
195
242
  "error",
196
243
  {
@@ -202,47 +249,154 @@ var config = [
202
249
  logical: "parens-new-line"
203
250
  }
204
251
  ],
252
+ "@stylistic/brace-style": ["warn", "1tbs", { allowSingleLine: true }],
253
+ "@stylistic/comma-dangle": ["warn", "always-multiline"],
254
+ "@stylistic/comma-spacing": "warn",
255
+ "@stylistic/function-call-spacing": ["error"],
256
+ "@stylistic/array-element-newline": ["warn", { multiline: true, consistent: true }],
257
+ "@stylistic/array-bracket-newline": ["warn", "consistent"],
258
+ "@stylistic/no-mixed-operators": ["warn", { allowSamePrecedence: true }],
259
+ "@stylistic/rest-spread-spacing": ["warn", "never"],
260
+ "@stylistic/spaced-comment": ["warn", "always", { line: { markers: ["!", "?", "-", "**"] } }],
261
+ "@stylistic/jsx-one-expression-per-line": "warn",
262
+ // === CODE QUALITY & STRUCTURE ===
263
+ // Complexity and size limits:
264
+ "complexity": ["warn", { max: 20 }],
265
+ // Warn when cyclomatic complexity exceeds 20
205
266
  "max-lines-per-function": ["error", 120],
206
- "max-lines": ["error", { max: 900, skipBlankLines: true }],
207
- "func-style": ["warn", "expression"],
267
+ // Error when functions exceed 120 lines
268
+ "max-lines": ["error", { max: 600, skipBlankLines: true }],
269
+ // Error when files exceed 900 lines
270
+ // Code style preferences:
271
+ "object-shorthand": ["warn", "always"],
272
+ // Use object shorthand ({ name } instead of { name: name })
273
+ "arrow-body-style": ["warn", "as-needed"],
274
+ // Use concise arrow functions when possible
275
+ "prefer-destructuring": "warn",
276
+ // Prefer destructuring for object/array access
277
+ "prefer-arrow-callback": "error",
278
+ // Prefer arrow functions for callbacks
279
+ "prefer-template": "warn",
280
+ // Use template literals instead of string concatenation
281
+ "one-var": ["error", "never"],
282
+ // Declare each variable separately
283
+ "no-bitwise": "error",
284
+ // Disallow bitwise operators (often used for obfuscation)
285
+ // Parentheses and expression clarity:
286
+ "no-extra-parens": [
287
+ "error",
288
+ "all",
289
+ {
290
+ ignoreJSX: "all",
291
+ // JSX requires parentheses for multi-line expressions
292
+ enforceForArrowConditionals: false,
293
+ // Allow parentheses in arrow conditionals
294
+ nestedBinaryExpressions: false
295
+ // Allow parentheses for clarity in nested expressions
296
+ }
297
+ ],
298
+ // === SECURITY & BEST PRACTICES ===
299
+ // Prevent dangerous code execution patterns:
300
+ "no-eval": "error",
301
+ // Disallows eval() which can execute arbitrary code
302
+ "no-implied-eval": "error",
303
+ // Catches indirect eval usage (setTimeout with string, etc.)
304
+ "no-new-func": "error",
305
+ // Prevents Function constructor which is similar to eval
306
+ "no-script-url": "error",
307
+ // Disallows javascript: URLs which are XSS vectors
308
+ // Error handling and promises:
309
+ "prefer-promise-reject-errors": "error",
310
+ // Ensures promises are rejected with Error objects
311
+ "no-throw-literal": "error",
312
+ // Prevents throwing non-Error objects (strings, numbers, etc.)
313
+ // Code quality and safety:
314
+ "no-unreachable-loop": "error",
315
+ // Catches loops with unreachable iterations
316
+ "no-unsafe-negation": "error",
317
+ // Prevents unsafe negation patterns that can cause bugs
318
+ "yoda": "error",
319
+ // Enforces consistent comparison order (variable == constant, not constant == variable)
320
+ // Promise constructor safety:
321
+ "no-promise-executor-return": "error",
322
+ // Prevents returning values from promise executor
323
+ "no-async-promise-executor": "error",
324
+ // Prevents async promise constructors (anti-pattern)
325
+ // === GENERAL JAVASCRIPT RULES ===
326
+ "quote-props": ["warn", "consistent-as-needed"],
327
+ "object-property-newline": ["warn", { allowAllPropertiesOnSameLine: true }],
328
+ "function-call-argument-newline": ["warn", "consistent"],
329
+ "no-multiple-empty-lines": ["warn", { max: 1, maxEOF: 1 }],
330
+ "no-multi-spaces": "warn",
331
+ "no-useless-rename": "warn",
332
+ "arrow-spacing": "warn",
333
+ "space-infix-ops": "warn",
334
+ "comma-style": ["warn", "last"],
335
+ "no-nested-ternary": "warn",
336
+ "no-unneeded-ternary": "warn",
337
+ "no-else-return": "error",
338
+ "no-console": "warn",
339
+ "no-useless-concat": "warn",
340
+ "no-new": "error",
341
+ "no-extra-semi": "error",
342
+ "no-implicit-coercion": ["warn", { allow: ["!!"] }],
343
+ "no-extra-boolean-cast": "warn",
208
344
  "padding-line-between-statements": [
209
345
  "error",
210
346
  {
211
- // Require a blank line after directive prologues ("use client", "use strict", etc.)
212
347
  blankLine: "always",
213
348
  prev: "directive",
214
349
  next: "*"
215
350
  },
216
351
  {
217
- // But we *don't* want to require blank lines between multiple directives
218
- // (so `"use client";` can be followed immediately by `"use strict";`)
219
352
  blankLine: "any",
220
353
  prev: "directive",
221
354
  next: "directive"
222
355
  },
223
356
  {
224
- // No blank line between import and import statements
225
357
  blankLine: "never",
226
358
  prev: "import",
227
359
  next: "import"
228
360
  }
229
361
  ],
230
- "object-shorthand": ["warn", "always"],
231
- "arrow-body-style": ["warn", "as-needed"],
232
- "prefer-destructuring": "warn",
233
- "prefer-arrow-callback": "error",
234
- "prefer-template": "warn",
235
- "one-var": ["error", "never"],
236
- "no-bitwise": "error",
237
- // TypeScript equivalents and customizations
362
+ // === TYPESCRIPT RULES ===
363
+ // Type safety & preferences
364
+ "@typescript-eslint/no-explicit-any": ["warn", { fixToUnknown: true }],
365
+ "@typescript-eslint/no-inferrable-types": ["warn", { ignoreParameters: true }],
366
+ "@typescript-eslint/prefer-nullish-coalescing": [
367
+ "warn",
368
+ { ignorePrimitives: { string: true } }
369
+ ],
370
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
371
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
372
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
373
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
374
+ "@typescript-eslint/ban-ts-comment": [
375
+ "error",
376
+ { "ts-expect-error": "allow-with-description", "ts-ignore": "allow-with-description" }
377
+ ],
378
+ "@typescript-eslint/no-empty-object-type": "warn",
379
+ "@typescript-eslint/no-unsafe-function-type": "warn",
380
+ "@typescript-eslint/no-wrapper-object-types": "warn",
381
+ "@typescript-eslint/array-type": ["warn", { default: "array" }],
382
+ "@typescript-eslint/no-unnecessary-condition": "warn",
383
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
384
+ "@typescript-eslint/no-floating-promises": "error",
385
+ "@typescript-eslint/await-thenable": "error",
386
+ "@typescript-eslint/prefer-readonly": "warn",
387
+ "@typescript-eslint/no-invalid-void-type": "error",
388
+ // Void types are valid in many contexts (e.g., Promise<void>)
389
+ "@typescript-eslint/no-misused-promises": "error",
390
+ // Too many false positives with promise handling
391
+ // TypeScript consistency
392
+ "@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
393
+ "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
394
+ "@typescript-eslint/consistent-type-definitions": ["error", "type"],
395
+ "@typescript-eslint/consistent-type-exports": "error",
396
+ "@typescript-eslint/method-signature-style": "error",
397
+ // TypeScript equivalents of core rules
238
398
  "@typescript-eslint/no-redeclare": "error",
239
399
  "@typescript-eslint/default-param-last": "error",
240
- "@typescript-eslint/require-await": "off",
241
- "no-return-await": "warn",
242
- "no-nested-ternary": "warn",
243
- "no-unneeded-ternary": "warn",
244
- "no-else-return": "warn",
245
- "no-constant-condition": "off",
246
400
  "@typescript-eslint/dot-notation": "error",
247
401
  "@typescript-eslint/no-unused-expressions": [
248
402
  "error",
@@ -256,14 +410,7 @@ var config = [
256
410
  "error",
257
411
  { variables: true, functions: false }
258
412
  ],
259
- "no-console": "warn",
260
- "no-useless-concat": "warn",
261
- "no-new": "error",
262
- "no-extra-semi": "error",
263
- "no-implicit-coercion": ["warn", { allow: ["!!"] }],
264
- "no-extra-boolean-cast": "warn",
265
- // Magic numbers
266
- "no-magic-numbers": "off",
413
+ "@typescript-eslint/no-shadow": "error",
267
414
  "@typescript-eslint/no-magic-numbers": [
268
415
  "error",
269
416
  {
@@ -274,44 +421,44 @@ var config = [
274
421
  ignore: [0, 1, -1, 2]
275
422
  }
276
423
  ],
277
- // More stylistic specifics
278
- "@stylistic/brace-style": ["warn", "1tbs", { allowSingleLine: true }],
279
- "@stylistic/comma-dangle": ["warn", "always-multiline"],
280
- "@stylistic/comma-spacing": "warn",
281
- "@stylistic/function-call-spacing": ["error"],
282
- // Naming
424
+ // Expressions and async
425
+ "@typescript-eslint/no-confusing-void-expression": [
426
+ "error",
427
+ { ignoreArrowShorthand: true }
428
+ ],
429
+ "@typescript-eslint/no-meaningless-void-operator": "error",
430
+ // TypeScript modern preferences
431
+ "@typescript-eslint/prefer-includes": "error",
432
+ "@typescript-eslint/prefer-optional-chain": "error",
433
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
434
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
435
+ // === NAMING CONVENTIONS ===
283
436
  "camelcase": ["warn", { allow: ["^_", "content_type", "reply_to"] }],
284
437
  "@typescript-eslint/naming-convention": [
285
438
  "warn",
286
- // Property naming rules
287
439
  {
288
440
  selector: "property",
289
441
  format: ["camelCase", "UPPER_CASE"],
290
442
  leadingUnderscore: "allow",
291
443
  filter: {
292
444
  regex: String.raw`^_|[- /?:{}@%]|Provider|Comp|^item$|^condition$|^container$|^Container$|^\d+$`,
293
- // ignore properties with dashes/slashes/spaces
294
445
  match: false
295
446
  }
296
447
  },
297
- // Variable-like naming rules
298
448
  {
299
449
  selector: "variableLike",
300
450
  format: ["camelCase", "UPPER_CASE", "PascalCase"],
301
451
  trailingUnderscore: "allow"
302
452
  },
303
- // Function variable naming rules
304
453
  {
305
454
  selector: "variable",
306
455
  format: ["camelCase", "PascalCase"],
307
456
  types: ["function"],
308
457
  filter: {
309
458
  regex: "^_|Comp|Provider|Stack|Wrapper|Root",
310
- // allowing for 'Component' parameter names
311
459
  match: false
312
460
  }
313
461
  },
314
- // Type naming rules
315
462
  {
316
463
  selector: "typeLike",
317
464
  format: ["PascalCase"],
@@ -320,12 +467,10 @@ var config = [
320
467
  match: false
321
468
  }
322
469
  },
323
- // Boolean naming rules
324
470
  {
325
471
  selector: ["variable", "property", "parameter", "typeProperty"],
326
472
  types: ["boolean"],
327
473
  format: ["UPPER_CASE", "PascalCase"],
328
- // must be PascalCase because prefix is trimmed
329
474
  prefix: booleanNamePrefixes,
330
475
  filter: {
331
476
  regex: booleanNameExceptions,
@@ -333,149 +478,86 @@ var config = [
333
478
  }
334
479
  }
335
480
  ],
336
- // TS type safety and preferences
337
- "@typescript-eslint/no-explicit-any": ["warn", { fixToUnknown: true }],
338
- "@typescript-eslint/no-inferrable-types": ["warn", { ignoreParameters: true }],
339
- "@typescript-eslint/no-shadow": "error",
340
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
341
- "@typescript-eslint/no-base-to-string": "off",
342
- "@typescript-eslint/prefer-nullish-coalescing": [
481
+ // === IMPORTS & EXPORTS ===
482
+ // Import path and structure validation:
483
+ "import-x/no-absolute-path": "warn",
484
+ // Prevent absolute paths in imports (should use relative or package imports)
485
+ "import-x/newline-after-import": ["warn", { count: 1 }],
486
+ // Require exactly one blank line after imports
487
+ "import-x/no-cycle": ["error", { maxDepth: 1, ignoreExternal: true }],
488
+ // Prevent circular dependencies
489
+ "import-x/order": [
343
490
  "warn",
344
- { ignorePrimitives: { string: true } }
345
- ],
346
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
347
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
348
- "@typescript-eslint/no-extra-non-null-assertion": "error",
349
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
350
- "@typescript-eslint/ban-ts-comment": [
351
- "error",
352
- { "ts-expect-error": "allow-with-description", "ts-ignore": "allow-with-description" }
353
- ],
354
- "@typescript-eslint/no-empty-object-type": "warn",
355
- "@typescript-eslint/no-unsafe-function-type": "warn",
356
- "@typescript-eslint/no-wrapper-object-types": "warn",
357
- "@typescript-eslint/array-type": ["warn", { default: "array" }],
358
- "@stylistic/array-element-newline": ["warn", { multiline: true, consistent: true }],
359
- "@stylistic/array-bracket-newline": ["warn", "consistent"],
360
- "@stylistic/no-mixed-operators": ["warn", { allowSamePrecedence: true }],
361
- "@stylistic/rest-spread-spacing": ["warn", "never"],
362
- "@typescript-eslint/no-unnecessary-condition": "warn",
363
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
364
- // TS consistency
365
- "@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
366
- "@typescript-eslint/consistent-type-assertions": [
367
- "error",
368
- { assertionStyle: "as" }
369
- ],
370
- "@typescript-eslint/consistent-type-definitions": ["error", "type"],
371
- "@typescript-eslint/consistent-type-exports": "error",
372
- "@typescript-eslint/method-signature-style": "error",
373
- // Expressions and async
374
- "@typescript-eslint/no-confusing-void-expression": [
375
- "error",
376
- { ignoreArrowShorthand: true }
491
+ {
492
+ "groups": [
493
+ "builtin",
494
+ // Node.js built-in modules
495
+ "external",
496
+ // Packages from node_modules
497
+ ["type", "internal"],
498
+ // Type imports, Absolute imports (often aliased like 'src/components')
499
+ "parent",
500
+ // Relative imports from parent directories (../)
501
+ "sibling",
502
+ // Relative imports from sibling directories (./)
503
+ "index",
504
+ // Index file imports (./index.js)
505
+ "object"
506
+ // Imports from object notation
507
+ ],
508
+ "newlines-between": "never"
509
+ }
377
510
  ],
378
- "@typescript-eslint/no-invalid-void-type": "off",
379
- "@typescript-eslint/no-meaningless-void-operator": "error",
380
- "@typescript-eslint/no-misused-promises": "off",
381
- "@typescript-eslint/no-var-requires": "off",
382
- // TS modern prefs
383
- "@typescript-eslint/prefer-includes": "error",
384
- "@typescript-eslint/prefer-optional-chain": "error",
385
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
386
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
387
- // --- Comment Formatting Rules ---
388
- "spaced-comment": "off",
389
- "@stylistic/spaced-comment": ["warn", "always", { line: { markers: ["!", "?", "-", "**"] } }],
390
- // --- Unused Variables & Imports Rules ---
391
- "no-unused-vars": "off",
392
- "@stylistic/no-unused-vars": "off",
393
- "sonarjs/no-unused-vars": "off",
511
+ // === UNUSED IMPORTS & VARIABLES ===
512
+ // Automatically remove unused imports:
394
513
  "unused-imports/no-unused-imports": "error",
514
+ // Error on unused imports (auto-fixable)
515
+ // Handle unused variables with underscore convention:
395
516
  "unused-imports/no-unused-vars": [
396
517
  "warn",
397
518
  {
398
519
  vars: "all",
520
+ // Check all variables
399
521
  varsIgnorePattern: "^_",
522
+ // Ignore variables starting with underscore
400
523
  args: "after-used",
524
+ // Only check arguments after the last used one
401
525
  argsIgnorePattern: "^_"
526
+ // Ignore arguments starting with underscore
402
527
  }
403
528
  ],
404
- // --- Banned API Rules ---
529
+ // === BANNED APIS ===
530
+ // Ban imperative array/object operations in favor of modern syntax:
405
531
  "ban/ban": [
406
532
  "warn",
407
533
  {
408
534
  name: ["*", "concat"],
409
- message: "Imperative operation: prefer use ES6 spread, i.e. [...items, newItem]"
535
+ message: "Array.concat is an imperative operation. Use ES6 spread syntax instead: [...items, newItem]"
410
536
  },
411
537
  {
412
538
  name: ["Object", "assign"],
413
- message: "Use the spread operator `{...obj}` instead"
539
+ message: "Object.assign is imperative. Use the spread operator instead: {...obj}"
414
540
  }
415
541
  ],
416
- // --- Code Structure Restrictions ---
417
- // No loops rule
542
+ // === CODE STRUCTURE RESTRICTIONS ===
543
+ // Enforce functional programming patterns:
418
544
  "no-loops/no-loops": "error",
419
- // Syntax restrictions
545
+ // Ban for/while/do-while loops, use array methods instead
546
+ // Enforce pattern-based conditional logic:
420
547
  "no-restricted-syntax": [
421
548
  "error",
422
549
  {
423
550
  selector: "SwitchStatement",
424
- message: "Switch statements are banned. Use `ts-pattern` instead."
551
+ message: "Switch statements are banned. Use `ts-pattern` library for pattern matching instead."
425
552
  }
426
553
  ],
427
- // --- ESLint Comments Rules ---
554
+ // === ESLINT COMMENTS ===
428
555
  "@eslint-community/eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }],
429
- // --- Testing Library Rules ---
556
+ // === TESTING LIBRARY ===
430
557
  "testing-library/no-render-in-lifecycle": ["error", { allowTestingFrameworkSetupHook: "beforeEach" }],
431
- "testing-library/no-unnecessary-act": "off",
432
- // --- Import Rules ---
433
- // Commented out rules kept for reference
434
- // 'import/no-default-export': 'warn',
435
- // 'import/no-restricted-paths': ['warn', { zones: restrictedPaths }], // Define restrictedPaths
436
- "import-x/no-named-as-default-member": "off",
437
- "import-x/no-absolute-path": "warn",
438
- "import-x/newline-after-import": ["warn", { count: 1 }],
439
- "import-x/no-cycle": ["error", { maxDepth: 1, ignoreExternal: true }],
440
- "import-x/order": [
441
- "warn",
442
- {
443
- "groups": [
444
- "builtin",
445
- // Node.js built-in modules
446
- "external",
447
- // Packages from node_modules
448
- ["type", "internal"],
449
- // Type imports, Absolute imports (often aliased like 'src/components')
450
- "parent",
451
- // Relative imports from parent directories (../)
452
- "sibling",
453
- // Relative imports from sibling directories (./)
454
- "index",
455
- // Index file imports (./index.js)
456
- "object"
457
- // Imports from object notation
458
- ],
459
- "newlines-between": "never"
460
- }
461
- ],
462
- // --- Sort Rules ---
463
- "sort/imports": "off",
464
- // use 'import-x/order' rule instead
465
- "sort/object-properties": "off",
558
+ // === SORTING ===
466
559
  "sort/type-properties": "warn",
467
- "sort/string-unions": "off",
468
- // --- Unicorn Rules ---
469
- "unicorn/prefer-global-this": "off",
470
- "unicorn/prevent-abbreviations": "off",
471
- "unicorn/no-array-reduce": "off",
472
- "unicorn/no-array-for-each": "off",
473
- "unicorn/prefer-top-level-await": "off",
474
- "unicorn/no-array-callback-reference": "off",
475
- "unicorn/prefer-switch": "off",
476
- "unicorn/no-abusive-eslint-disable": "off",
477
- "unicorn/prefer-object-from-entries": "off",
478
- "unicorn/no-null": "off",
560
+ // === UNICORN ===
479
561
  "unicorn/filename-case": [
480
562
  "warn",
481
563
  {
@@ -487,31 +569,10 @@ var config = [
487
569
  "unicorn/no-unused-properties": "warn",
488
570
  "unicorn/consistent-destructuring": "warn",
489
571
  "unicorn/no-useless-undefined": ["warn", { checkArguments: false }],
490
- // --- SonarJS Rules ---
572
+ // === SONARJS ===
491
573
  "sonarjs/no-duplicated-branches": "warn",
492
- "sonarjs/no-duplicate-string": "off",
493
- "sonarjs/deprecation": "off",
494
- "sonarjs/cognitive-complexity": "off",
495
- // use 'complexity' rule instead
496
- "sonarjs/no-nested-functions": "off",
497
- // use 'complexity' rule instead
498
- "sonarjs/function-return-type": "off",
499
- // use '@typescript-eslint/explicit-module-boundary-types' rule instead
500
- "sonarjs/no-redundant-optional": "off",
501
- // use '@typescript-eslint/no-redundant-optional' rule instead
502
- "sonarjs/no-commented-code": "off",
503
- // slow rule
504
- "sonarjs/todo-tag": "off",
505
- // eventually re-enable
506
- "sonarjs/pseudo-random": "off",
507
- "sonarjs/different-types-comparison": "off",
508
- // too many false positives
509
- "sonarjs/redundant-type-aliases": "off",
510
- "sonarjs/void-use": "off",
511
- // allow to annotate async functions not explicitly awaited
512
- "sonarjs/no-nested-conditional": "off",
513
- // use 'no-nested-ternary' rule instead
514
- "sonarjs/no-hardcoded-passwords": "off"
574
+ // === FUNCTIONAL ===
575
+ "functional/functional-parameters": ["error", { allowArgumentsKeyword: false, enforceParameterCount: false }]
515
576
  },
516
577
  settings: {
517
578
  "import-x/extensions": [".js", ".cjs", ".mjs"],
@@ -529,7 +590,19 @@ var config = [
529
590
  files: ["**/*.config.{ts,js,mjs,cjs}"],
530
591
  rules: {
531
592
  "@typescript-eslint/no-magic-numbers": "off",
532
- "@typescript-eslint/naming-convention": "off"
593
+ "@typescript-eslint/naming-convention": "off",
594
+ "functional/functional-parameters": "off"
595
+ }
596
+ },
597
+ // Test files overrides - functional rules too strict for test code
598
+ {
599
+ files: ["**/*.test.{ts,tsx,js,jsx}", "**/*.spec.{ts,tsx,js,jsx}", "**/tests/**", "**/__tests__/**"],
600
+ rules: {
601
+ "functional/no-expression-statements": "off",
602
+ "functional/no-return-void": "off",
603
+ "functional/no-let": "off",
604
+ "functional/functional-parameters": "off",
605
+ "functional/prefer-immutable-types": "off"
533
606
  }
534
607
  }
535
608
  ];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/boolean-naming.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-magic-numbers -- config file */\n/* eslint-disable @typescript-eslint/naming-convention -- config file */\nimport eslint from '@eslint/js';\n// @ts-expect-error - no types available\nimport comments from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';\nimport importXPlugin from 'eslint-plugin-import-x';\nimport sonarjsPlugin from 'eslint-plugin-sonarjs';\nimport sortPlugin from 'eslint-plugin-sort';\nimport testingLibraryPlugin from 'eslint-plugin-testing-library';\nimport unicornPlugin from 'eslint-plugin-unicorn';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globals from 'globals';\nimport tseslint from 'typescript-eslint';\n// @ts-expect-error - no types available\nimport noLoopsPlugin from 'eslint-plugin-no-loops';\n// @ts-expect-error - no types available\nimport banPlugin from 'eslint-plugin-ban';\nimport type { Linter } from 'eslint';\nimport { booleanNameExceptions, booleanNamePrefixes } from './boolean-naming';\n\ntype Plugin = typeof testingLibraryPlugin;\n\nconst config: Linter.Config[] = [\n // Base recommended rules from ESLint\n eslint.configs.recommended,\n\n // TypeScript recommended configs\n ...tseslint.configs.recommendedTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n ...tseslint.configs.strict,\n\n // Apply stylistic rules with customized settings\n stylistic.configs.customize({\n arrowParens: true,\n // jsx: true,\n braceStyle: '1tbs',\n commaDangle: 'always-multiline',\n indent: 2,\n quoteProps: 'consistent-as-needed',\n quotes: 'single',\n semi: true,\n }),\n\n // Import plugin configuration\n importXPlugin.flatConfigs.recommended,\n importXPlugin.flatConfigs.typescript,\n sortPlugin.configs['flat/recommended'],\n\n // Code quality plugins\n unicornPlugin.configs.recommended,\n (comments as { recommended: Linter.Config }).recommended,\n sonarjsPlugin.configs.recommended,\n\n // General JavaScript/TypeScript configuration\n {\n files: ['**/*.{js,mjs,cjs,ts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals: {\n ...globals.browser,\n ...globals.node,\n ...globals.es2025,\n ...globals.vitest,\n },\n parserOptions: {\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: true,\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n plugins: {\n 'no-loops': noLoopsPlugin as Plugin,\n 'ban': banPlugin as Plugin,\n 'testing-library': testingLibraryPlugin,\n 'unused-imports': unusedImports,\n },\n rules: {\n // --- Stylistic Rules ---\n // Core rules turned off in favor of stylistic rules\n 'quotes': 'off',\n 'jsx-quotes': 'off',\n 'func-call-spacing': 'off',\n 'dot-notation': 'off',\n 'no-unused-expressions': 'off',\n 'no-use-before-define': 'off',\n 'default-param-last': 'off',\n 'no-redeclare': 'off',\n 'no-shadow': 'off',\n\n // Stylistic (overrides vs stylistic recommended)\n 'quote-props': ['warn', 'consistent-as-needed'],\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@stylistic/jsx-quotes': ['warn', 'prefer-single'],\n '@stylistic/jsx-one-expression-per-line': 'off',\n '@stylistic/block-spacing': ['warn', 'never'],\n '@stylistic/object-curly-newline': [\n 'warn',\n { ObjectPattern: { multiline: true, consistent: true } },\n ],\n 'object-property-newline': [\n 'warn',\n { allowAllPropertiesOnSameLine: true },\n ],\n 'function-call-argument-newline': ['warn', 'consistent'],\n 'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 1 }],\n 'no-multi-spaces': 'warn',\n 'no-useless-rename': 'warn',\n 'arrow-spacing': 'warn',\n 'space-infix-ops': 'warn',\n '@stylistic/operator-linebreak': [\n 'warn',\n 'after',\n { overrides: { '?': 'before', ':': 'before' } },\n ],\n 'comma-style': ['warn', 'last'],\n 'complexity': ['warn', { max: 20 }],\n '@stylistic/max-len': [\n 'warn',\n {\n code: 100,\n comments: 120,\n ignoreUrls: true,\n ignoreTrailingComments: true,\n ignorePattern:\n String.raw`^.*eslint-(disable|enable).+|it\\(|ErrorCodes|@param|@return|^\\s*\\[[^\\]]+\\]:\\s*.+?;$`,\n ignoreTemplateLiterals: true,\n ignoreStrings: true,\n ignoreRegExpLiterals: true,\n },\n ],\n 'no-extra-parens': [\n 'error',\n 'all',\n {\n ignoreJSX: 'all', // don’t complain about JSX parens\n enforceForArrowConditionals: false,\n nestedBinaryExpressions: false,\n },\n ],\n '@stylistic/jsx-wrap-multilines': [\n 'error',\n {\n declaration: 'parens-new-line',\n assignment: 'parens-new-line',\n return: 'parens-new-line',\n arrow: 'parens-new-line',\n condition: 'parens-new-line',\n logical: 'parens-new-line',\n },\n ],\n 'max-lines-per-function': ['error', 120],\n 'max-lines': ['error', { max: 900, skipBlankLines: true }],\n 'func-style': ['warn', 'expression'],\n 'padding-line-between-statements': [\n 'error',\n {\n // Require a blank line after directive prologues (\"use client\", \"use strict\", etc.)\n blankLine: 'always',\n prev: 'directive',\n next: '*',\n },\n {\n // But we *don't* want to require blank lines between multiple directives\n // (so `\"use client\";` can be followed immediately by `\"use strict\";`)\n blankLine: 'any',\n prev: 'directive',\n next: 'directive',\n },\n {\n // No blank line between import and import statements\n blankLine: 'never',\n prev: 'import',\n next: 'import',\n },\n ],\n 'object-shorthand': ['warn', 'always'],\n 'arrow-body-style': ['warn', 'as-needed'],\n 'prefer-destructuring': 'warn',\n 'prefer-arrow-callback': 'error',\n 'prefer-template': 'warn',\n 'one-var': ['error', 'never'],\n 'no-bitwise': 'error',\n\n // TypeScript equivalents and customizations\n '@typescript-eslint/no-redeclare': 'error',\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/require-await': 'off',\n 'no-return-await': 'warn',\n 'no-nested-ternary': 'warn',\n 'no-unneeded-ternary': 'warn',\n 'no-else-return': 'warn',\n 'no-constant-condition': 'off',\n '@typescript-eslint/dot-notation': 'error',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTernary: true,\n allowTaggedTemplates: true,\n },\n ],\n '@typescript-eslint/no-use-before-define': [\n 'error',\n { variables: true, functions: false },\n ],\n 'no-console': 'warn',\n 'no-useless-concat': 'warn',\n 'no-new': 'error',\n 'no-extra-semi': 'error',\n 'no-implicit-coercion': ['warn', { allow: ['!!'] }],\n 'no-extra-boolean-cast': 'warn',\n\n // Magic numbers\n 'no-magic-numbers': 'off',\n '@typescript-eslint/no-magic-numbers': [\n 'error',\n {\n ignoreEnums: true,\n ignoreArrayIndexes: true,\n ignoreDefaultValues: true,\n ignoreTypeIndexes: true,\n ignore: [0, 1, -1, 2],\n },\n ],\n\n // More stylistic specifics\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/comma-dangle': ['warn', 'always-multiline'],\n '@stylistic/comma-spacing': 'warn',\n '@stylistic/function-call-spacing': ['error'],\n\n // Naming\n 'camelcase': ['warn', { allow: ['^_', 'content_type', 'reply_to'] }],\n '@typescript-eslint/naming-convention': [\n 'warn',\n // Property naming rules\n {\n selector: 'property',\n format: ['camelCase', 'UPPER_CASE'],\n leadingUnderscore: 'allow',\n filter: {\n regex: String.raw`^_|[- /?:{}@%]|Provider|Comp|^item$|^condition$|^container$|^Container$|^\\d+$`, // ignore properties with dashes/slashes/spaces\n match: false,\n },\n },\n // Variable-like naming rules\n {\n selector: 'variableLike',\n format: ['camelCase', 'UPPER_CASE', 'PascalCase'],\n trailingUnderscore: 'allow',\n },\n // Function variable naming rules\n {\n selector: 'variable',\n format: ['camelCase', 'PascalCase'],\n types: ['function'],\n filter: {\n regex: '^_|Comp|Provider|Stack|Wrapper|Root', // allowing for 'Component' parameter names\n match: false,\n },\n },\n // Type naming rules\n {\n selector: 'typeLike',\n format: ['PascalCase'],\n filter: {\n regex: '^_|_$',\n match: false,\n },\n },\n // Boolean naming rules\n {\n selector: ['variable', 'property', 'parameter', 'typeProperty'],\n types: ['boolean'],\n format: ['UPPER_CASE', 'PascalCase'], // must be PascalCase because prefix is trimmed\n prefix: booleanNamePrefixes,\n filter: {\n regex: booleanNameExceptions,\n match: false,\n },\n },\n ],\n\n // TS type safety and preferences\n '@typescript-eslint/no-explicit-any': ['warn', { fixToUnknown: true }],\n '@typescript-eslint/no-inferrable-types': ['warn', { ignoreParameters: true }],\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-unsafe-enum-comparison': 'off',\n '@typescript-eslint/no-base-to-string': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'warn',\n { ignorePrimitives: { string: true } },\n ],\n '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',\n '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',\n '@typescript-eslint/no-extra-non-null-assertion': 'error',\n '@typescript-eslint/no-confusing-non-null-assertion': 'error',\n '@typescript-eslint/ban-ts-comment': [\n 'error',\n { 'ts-expect-error': 'allow-with-description', 'ts-ignore': 'allow-with-description' },\n ],\n '@typescript-eslint/no-empty-object-type': 'warn',\n '@typescript-eslint/no-unsafe-function-type': 'warn',\n '@typescript-eslint/no-wrapper-object-types': 'warn',\n '@typescript-eslint/array-type': ['warn', { default: 'array' }],\n '@stylistic/array-element-newline': ['warn', { multiline: true, consistent: true }],\n '@stylistic/array-bracket-newline': ['warn', 'consistent'],\n '@stylistic/no-mixed-operators': ['warn', { allowSamePrecedence: true }],\n '@stylistic/rest-spread-spacing': ['warn', 'never'],\n '@typescript-eslint/no-unnecessary-condition': 'warn',\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',\n\n // TS consistency\n '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],\n '@typescript-eslint/consistent-type-assertions': [\n 'error',\n { assertionStyle: 'as' },\n ],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-exports': 'error',\n '@typescript-eslint/method-signature-style': 'error',\n\n // Expressions and async\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n { ignoreArrowShorthand: true },\n ],\n '@typescript-eslint/no-invalid-void-type': 'off',\n '@typescript-eslint/no-meaningless-void-operator': 'error',\n '@typescript-eslint/no-misused-promises': 'off',\n '@typescript-eslint/no-var-requires': 'off',\n\n // TS modern prefs\n '@typescript-eslint/prefer-includes': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-reduce-type-parameter': 'error',\n '@typescript-eslint/prefer-string-starts-ends-with': 'error',\n\n // --- Comment Formatting Rules ---\n 'spaced-comment': 'off',\n '@stylistic/spaced-comment': ['warn', 'always', { line: { markers: ['!', '?', '-', '**'] } }],\n\n // --- Unused Variables & Imports Rules ---\n 'no-unused-vars': 'off',\n '@stylistic/no-unused-vars': 'off',\n 'sonarjs/no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'warn',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n\n // --- Banned API Rules ---\n 'ban/ban': [\n 'warn',\n {\n name: ['*', 'concat'],\n message:\n 'Imperative operation: prefer use ES6 spread, i.e. [...items, newItem]',\n },\n {\n name: ['Object', 'assign'],\n message: 'Use the spread operator `{...obj}` instead',\n },\n ],\n\n // --- Code Structure Restrictions ---\n // No loops rule\n 'no-loops/no-loops': 'error',\n\n // Syntax restrictions\n 'no-restricted-syntax': [\n 'error',\n {\n selector: 'SwitchStatement',\n message:\n 'Switch statements are banned. Use `ts-pattern` instead.',\n },\n ],\n\n // --- ESLint Comments Rules ---\n '@eslint-community/eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }],\n\n // --- Testing Library Rules ---\n 'testing-library/no-render-in-lifecycle': ['error', { allowTestingFrameworkSetupHook: 'beforeEach' }],\n 'testing-library/no-unnecessary-act': 'off',\n\n // --- Import Rules ---\n // Commented out rules kept for reference\n // 'import/no-default-export': 'warn',\n // 'import/no-restricted-paths': ['warn', { zones: restrictedPaths }], // Define restrictedPaths\n 'import-x/no-named-as-default-member': 'off',\n 'import-x/no-absolute-path': 'warn',\n 'import-x/newline-after-import': ['warn', { count: 1 }],\n 'import-x/no-cycle': ['error', { maxDepth: 1, ignoreExternal: true }],\n 'import-x/order': ['warn',\n {\n 'groups': [\n 'builtin', // Node.js built-in modules\n 'external', // Packages from node_modules\n ['type', 'internal'], // Type imports, Absolute imports (often aliased like 'src/components')\n 'parent', // Relative imports from parent directories (../)\n 'sibling', // Relative imports from sibling directories (./)\n 'index', // Index file imports (./index.js)\n 'object', // Imports from object notation\n ],\n 'newlines-between': 'never',\n }],\n\n // --- Sort Rules ---\n 'sort/imports': 'off', // use 'import-x/order' rule instead\n 'sort/object-properties': 'off',\n 'sort/type-properties': 'warn',\n 'sort/string-unions': 'off',\n\n // --- Unicorn Rules ---\n 'unicorn/prefer-global-this': 'off',\n 'unicorn/prevent-abbreviations': 'off',\n 'unicorn/no-array-reduce': 'off',\n 'unicorn/no-array-for-each': 'off',\n 'unicorn/prefer-top-level-await': 'off',\n 'unicorn/no-array-callback-reference': 'off',\n 'unicorn/prefer-switch': 'off',\n 'unicorn/no-abusive-eslint-disable': 'off',\n 'unicorn/prefer-object-from-entries': 'off',\n 'unicorn/no-null': 'off',\n 'unicorn/filename-case': [\n 'warn',\n {\n cases: { camelCase: true, kebabCase: true },\n ignore: [/\\.(js|cjs)$/], // Keep ignoring JS/CJS if needed\n },\n ],\n 'unicorn/no-unused-properties': 'warn',\n 'unicorn/consistent-destructuring': 'warn',\n 'unicorn/no-useless-undefined': ['warn', { checkArguments: false }],\n\n // --- SonarJS Rules ---\n 'sonarjs/no-duplicated-branches': 'warn',\n 'sonarjs/no-duplicate-string': 'off',\n 'sonarjs/deprecation': 'off',\n 'sonarjs/cognitive-complexity': 'off', // use 'complexity' rule instead\n 'sonarjs/no-nested-functions': 'off', // use 'complexity' rule instead\n 'sonarjs/function-return-type': 'off', // use '@typescript-eslint/explicit-module-boundary-types' rule instead\n 'sonarjs/no-redundant-optional': 'off', // use '@typescript-eslint/no-redundant-optional' rule instead\n 'sonarjs/no-commented-code': 'off', // slow rule\n 'sonarjs/todo-tag': 'off', // eventually re-enable\n 'sonarjs/pseudo-random': 'off',\n 'sonarjs/different-types-comparison': 'off', // too many false positives\n 'sonarjs/redundant-type-aliases': 'off',\n 'sonarjs/void-use': 'off', // allow to annotate async functions not explicitly awaited\n 'sonarjs/no-nested-conditional': 'off', // use 'no-nested-ternary' rule instead\n 'sonarjs/no-hardcoded-passwords': 'off',\n },\n settings: {\n 'import-x/extensions': ['.js', '.cjs', '.mjs'],\n 'import-x/parsers': { 'typescript-eslint': ['.ts', '.tsx'] },\n 'import-x/resolver-next': [\n createTypeScriptImportResolver({\n alwaysTryTypes: true,\n bun: true,\n }),\n ],\n },\n },\n\n // Config files overrides\n {\n files: ['**/*.config.{ts,js,mjs,cjs}'],\n rules: {\n '@typescript-eslint/no-magic-numbers': 'off',\n '@typescript-eslint/naming-convention': 'off',\n },\n },\n];\n\n// Export shared utilities for use in other packages\nexport { booleanNameConvention, booleanNameExceptions, booleanNamePrefixes } from './boolean-naming';\n\nexport default config;\n\n/* eslint-enable @typescript-eslint/no-magic-numbers */\n/* eslint-enable @typescript-eslint/naming-convention */\n","/**\n * Combines an array of regex expressions into a single regex expression via the union operator.\n */\nconst concatElementsByRegexUnion = (elements: string[]) =>\n elements.reduce((element, accum, index) => `${accum}${index === 0 ? '' : '|'}${element}`, '');\n\n// Prefixes allowed at the start of a boolean variable/parameter name\nexport const booleanNamePrefixes = [\n 'is',\n 'as',\n 'are',\n 'was',\n 'should',\n 'has',\n 'can',\n 'did',\n 'will',\n 'use',\n 'does',\n 'show',\n 'allow',\n 'enabled',\n 'enable',\n 'disable',\n 'editable',\n 'refetch',\n 'destructive',\n 'hide',\n 'error',\n 'override',\n 'need',\n 'must',\n 'require',\n 'want',\n 'with',\n];\n// Regex for the rest of a boolean variable/parameter name (the part after the prefix)\nconst booleanNameSuffixes = '[A-Z]([A-Za-z]?)+';\n// Exceptions to the rule for allowable boolean variable/parameter names\nconst booleanNameExceptionsList = [\n '^_',\n '_$',\n '[- /?:{}@%]',\n '^[A-Z][a-z]*([A-Z][a-z]*)',\n '^item$',\n '^value$',\n '^condition$',\n '^container$',\n '^included',\n '^center$',\n '^debug$',\n '^concurrent',\n '^animated$',\n '^allow',\n '^visible',\n '^merge$',\n '^ssr$',\n '^multiSelect$',\n 'Shown$',\n '^enumerable$',\n '^configurable$',\n];\n// A singular regex string for the boolean name exceptions (instead of array of expressions)\nexport const booleanNameExceptions = concatElementsByRegexUnion(booleanNameExceptionsList);\n\n// The full boolean naming convetions regex\nexport const booleanNameConvention = new RegExp(\n `${concatElementsByRegexUnion(\n booleanNamePrefixes,\n )}|${booleanNameSuffixes}|${booleanNameExceptions}`,\n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,MAC7C,oBAAoB,EAAE,qBAAqB,CAAC,OAAO,MAAM,EAAE;AAAA,MAC3D,0BAA0B;AAAA,QACxB,+BAA+B;AAAA,UAC7B,gBAAgB;AAAA,UAChB,KAAK;AAAA,QACP,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA;AAAA,IACE,OAAO,CAAC,6BAA6B;AAAA,IACrC,OAAO;AAAA,MACL,uCAAuC;AAAA,MACvC,wCAAwC;AAAA,IAC1C;AAAA,EACF;AACF;AAKA,IAAO,gBAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/boolean-naming.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-magic-numbers, @typescript-eslint/naming-convention -- config file */\nimport eslint from '@eslint/js';\n// @ts-expect-error - no types available\nimport comments from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';\nimport functionalPlugin from 'eslint-plugin-functional';\nimport importXPlugin from 'eslint-plugin-import-x';\nimport sonarjsPlugin from 'eslint-plugin-sonarjs';\nimport sortPlugin from 'eslint-plugin-sort';\nimport testingLibraryPlugin from 'eslint-plugin-testing-library';\nimport unicornPlugin from 'eslint-plugin-unicorn';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globals from 'globals';\nimport tseslint from 'typescript-eslint';\n// @ts-expect-error - no types available\nimport noLoopsPlugin from 'eslint-plugin-no-loops';\n// @ts-expect-error - no types available\nimport banPlugin from 'eslint-plugin-ban';\nimport type { Linter } from 'eslint';\nimport { booleanNameExceptions, booleanNamePrefixes } from './boolean-naming';\n\ntype Plugin = typeof testingLibraryPlugin;\n\nconst config: Linter.Config[] = [\n // Base configurations\n eslint.configs.recommended,\n ...tseslint.configs.recommendedTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n ...tseslint.configs.strict,\n\n // Plugin configurations\n stylistic.configs.customize({\n arrowParens: true,\n braceStyle: '1tbs',\n commaDangle: 'always-multiline',\n indent: 2,\n quoteProps: 'consistent-as-needed',\n quotes: 'single',\n semi: true,\n }),\n importXPlugin.flatConfigs.recommended,\n importXPlugin.flatConfigs.typescript,\n sortPlugin.configs['flat/recommended'],\n unicornPlugin.configs.recommended,\n (comments as { recommended: Linter.Config }).recommended,\n sonarjsPlugin.configs.recommended,\n\n // Functional programming rules\n functionalPlugin.configs.externalTypeScriptRecommended,\n functionalPlugin.configs.recommended,\n functionalPlugin.configs.stylistic,\n\n // Main configuration\n {\n files: ['**/*.{js,mjs,cjs,ts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals: {\n ...globals.browser,\n ...globals.node,\n ...globals.es2025,\n ...globals.vitest,\n },\n parserOptions: {\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: true,\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n plugins: {\n 'no-loops': noLoopsPlugin as Plugin,\n 'ban': banPlugin as Plugin,\n 'testing-library': testingLibraryPlugin,\n 'unused-imports': unusedImports,\n },\n rules: {\n // === DISABLED CORE RULES (replaced by plugins) ===\n // These core ESLint rules are disabled because we use enhanced versions from plugins:\n 'quotes': 'off', // Replaced by @stylistic/quotes with better formatting options and JSX support\n 'jsx-quotes': 'off', // Replaced by @stylistic/jsx-quotes for JSX-specific quote handling\n 'func-call-spacing': 'off', // Replaced by @stylistic/function-call-spacing for consistent spacing\n 'dot-notation': 'off', // Replaced by @typescript-eslint/dot-notation with TypeScript awareness\n 'no-unused-expressions': 'off', // Replaced by @typescript-eslint/no-unused-expressions with better TS support\n 'no-use-before-define': 'off', // Replaced by @typescript-eslint/no-use-before-define for TypeScript hoisting rules\n 'default-param-last': 'off', // Replaced by @typescript-eslint/default-param-last with TS parameter awareness\n 'no-redeclare': 'off', // Replaced by @typescript-eslint/no-redeclare for better type checking\n 'no-shadow': 'off', // Replaced by @typescript-eslint/no-shadow for TypeScript variable shadowing\n 'spaced-comment': 'off', // Replaced by @stylistic/spaced-comment with more formatting options\n 'no-unused-vars': 'off', // Replaced by @typescript-eslint/no-unused-vars and unused-imports plugin\n '@stylistic/no-unused-vars': 'off', // Replaced by unused-imports/no-unused-vars for better import handling\n 'sonarjs/no-unused-vars': 'off', // Replaced by unused-imports/no-unused-vars to avoid conflicts\n 'no-magic-numbers': 'off', // Replaced by @typescript-eslint/no-magic-numbers with TypeScript-aware exceptions\n\n // === DISABLED PLUGIN RULES (intentionally turned off) ===\n // Sort plugin rules (replaced by import-x/order):\n 'sort/imports': 'off', // Replaced by import-x/order which has better TypeScript support\n 'sort/object-properties': 'off', // Object property sorting is not required\n 'sort/string-unions': 'off', // String union sorting is not required\n\n // Unicorn rules that are too restrictive or don't match our style:\n 'unicorn/prefer-global-this': 'off', // GlobalThis is not always preferred over window/global\n 'unicorn/prevent-abbreviations': 'off', // Common abbreviations (props, args, etc.) are acceptable\n 'unicorn/no-array-reduce': 'off', // Array.reduce is a valid and useful method\n 'unicorn/no-array-for-each': 'off', // Array.forEach is preferred over for...of in many cases\n 'unicorn/prefer-top-level-await': 'off', // Top-level await is not always appropriate\n 'unicorn/no-array-callback-reference': 'off', // Method references as callbacks are acceptable\n 'unicorn/prefer-switch': 'off', // Switch statements are banned (see no-restricted-syntax below)\n 'unicorn/prefer-object-from-entries': 'off', // Object.fromEntries is not always better\n 'unicorn/no-null': 'off', // Null is still a valid value in many contexts\n\n // SonarJS rules that are disabled for various reasons:\n 'sonarjs/cognitive-complexity': 'off', // Replaced by core complexity rule which is simpler\n 'sonarjs/no-nested-functions': 'off', // Replaced by complexity rule, nested functions are sometimes needed\n 'sonarjs/function-return-type': 'off', // TypeScript handles return type checking better\n 'sonarjs/no-redundant-optional': 'off', // TypeScript handles optional types better\n 'sonarjs/no-commented-code': 'off', // Performance-intensive rule, commented code is sometimes useful\n 'sonarjs/todo-tag': 'off', // TODO comments are acceptable during development\n 'sonarjs/pseudo-random': 'off', // Math.random() is acceptable for non-cryptographic uses\n 'sonarjs/void-use': 'off', // Allow void operators for type assertions and async function annotations\n 'sonarjs/no-nested-conditional': 'off', // Replaced by no-nested-ternary rule\n 'sonarjs/no-hardcoded-passwords': 'off',\n 'sonarjs/prefer-read-only-props': 'off',\n\n // Import and testing rules:\n 'import-x/no-named-as-default-member': 'off', // Named default exports are sometimes necessary\n\n // === STYLISTIC & FORMATTING ===\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@stylistic/jsx-quotes': ['warn', 'prefer-single'],\n '@stylistic/block-spacing': ['warn', 'never'],\n '@stylistic/object-curly-newline': [\n 'warn',\n { ObjectPattern: { multiline: true, consistent: true } },\n ],\n '@stylistic/operator-linebreak': [\n 'warn',\n 'after',\n { overrides: { '?': 'before', ':': 'before' } },\n ],\n '@stylistic/max-len': [\n 'warn',\n {\n code: 100,\n comments: 120,\n ignoreUrls: true,\n ignoreTrailingComments: true,\n ignorePattern: String.raw`^.*eslint-(disable|enable).+|it\\(|ErrorCodes|@param|@return|^\\s*\\[[^\\]]+\\]:\\s*.+?;$`,\n ignoreTemplateLiterals: true,\n ignoreStrings: true,\n ignoreRegExpLiterals: true,\n },\n ],\n '@stylistic/jsx-wrap-multilines': [\n 'error',\n {\n declaration: 'parens-new-line',\n assignment: 'parens-new-line',\n return: 'parens-new-line',\n arrow: 'parens-new-line',\n condition: 'parens-new-line',\n logical: 'parens-new-line',\n },\n ],\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/comma-dangle': ['warn', 'always-multiline'],\n '@stylistic/comma-spacing': 'warn',\n '@stylistic/function-call-spacing': ['error'],\n '@stylistic/array-element-newline': ['warn', { multiline: true, consistent: true }],\n '@stylistic/array-bracket-newline': ['warn', 'consistent'],\n '@stylistic/no-mixed-operators': ['warn', { allowSamePrecedence: true }],\n '@stylistic/rest-spread-spacing': ['warn', 'never'],\n '@stylistic/spaced-comment': ['warn', 'always', { line: { markers: ['!', '?', '-', '**'] } }],\n '@stylistic/jsx-one-expression-per-line': 'warn',\n\n // === CODE QUALITY & STRUCTURE ===\n // Complexity and size limits:\n 'complexity': ['warn', { max: 20 }], // Warn when cyclomatic complexity exceeds 20\n 'max-lines-per-function': ['error', 120], // Error when functions exceed 120 lines\n 'max-lines': ['error', { max: 600, skipBlankLines: true }], // Error when files exceed 900 lines\n\n // Code style preferences:\n 'object-shorthand': ['warn', 'always'], // Use object shorthand ({ name } instead of { name: name })\n 'arrow-body-style': ['warn', 'as-needed'], // Use concise arrow functions when possible\n 'prefer-destructuring': 'warn', // Prefer destructuring for object/array access\n 'prefer-arrow-callback': 'error', // Prefer arrow functions for callbacks\n 'prefer-template': 'warn', // Use template literals instead of string concatenation\n 'one-var': ['error', 'never'], // Declare each variable separately\n 'no-bitwise': 'error', // Disallow bitwise operators (often used for obfuscation)\n\n // Parentheses and expression clarity:\n 'no-extra-parens': [\n 'error',\n 'all',\n {\n ignoreJSX: 'all', // JSX requires parentheses for multi-line expressions\n enforceForArrowConditionals: false, // Allow parentheses in arrow conditionals\n nestedBinaryExpressions: false, // Allow parentheses for clarity in nested expressions\n },\n ],\n\n // === SECURITY & BEST PRACTICES ===\n // Prevent dangerous code execution patterns:\n 'no-eval': 'error', // Disallows eval() which can execute arbitrary code\n 'no-implied-eval': 'error', // Catches indirect eval usage (setTimeout with string, etc.)\n 'no-new-func': 'error', // Prevents Function constructor which is similar to eval\n 'no-script-url': 'error', // Disallows javascript: URLs which are XSS vectors\n\n // Error handling and promises:\n 'prefer-promise-reject-errors': 'error', // Ensures promises are rejected with Error objects\n 'no-throw-literal': 'error', // Prevents throwing non-Error objects (strings, numbers, etc.)\n\n // Code quality and safety:\n 'no-unreachable-loop': 'error', // Catches loops with unreachable iterations\n 'no-unsafe-negation': 'error', // Prevents unsafe negation patterns that can cause bugs\n 'yoda': 'error', // Enforces consistent comparison order (variable == constant, not constant == variable)\n\n // Promise constructor safety:\n 'no-promise-executor-return': 'error', // Prevents returning values from promise executor\n 'no-async-promise-executor': 'error', // Prevents async promise constructors (anti-pattern)\n\n // === GENERAL JAVASCRIPT RULES ===\n 'quote-props': ['warn', 'consistent-as-needed'],\n 'object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],\n 'function-call-argument-newline': ['warn', 'consistent'],\n 'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 1 }],\n 'no-multi-spaces': 'warn',\n 'no-useless-rename': 'warn',\n 'arrow-spacing': 'warn',\n 'space-infix-ops': 'warn',\n 'comma-style': ['warn', 'last'],\n 'no-nested-ternary': 'warn',\n 'no-unneeded-ternary': 'warn',\n 'no-else-return': 'error',\n 'no-console': 'warn',\n 'no-useless-concat': 'warn',\n 'no-new': 'error',\n 'no-extra-semi': 'error',\n 'no-implicit-coercion': ['warn', { allow: ['!!'] }],\n 'no-extra-boolean-cast': 'warn',\n 'padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n prev: 'directive',\n next: '*',\n },\n {\n blankLine: 'any',\n prev: 'directive',\n next: 'directive',\n },\n {\n blankLine: 'never',\n prev: 'import',\n next: 'import',\n },\n ],\n\n // === TYPESCRIPT RULES ===\n // Type safety & preferences\n '@typescript-eslint/no-explicit-any': ['warn', { fixToUnknown: true }],\n '@typescript-eslint/no-inferrable-types': ['warn', { ignoreParameters: true }],\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'warn',\n { ignorePrimitives: { string: true } },\n ],\n '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',\n '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',\n '@typescript-eslint/no-extra-non-null-assertion': 'error',\n '@typescript-eslint/no-confusing-non-null-assertion': 'error',\n '@typescript-eslint/ban-ts-comment': [\n 'error',\n { 'ts-expect-error': 'allow-with-description', 'ts-ignore': 'allow-with-description' },\n ],\n '@typescript-eslint/no-empty-object-type': 'warn',\n '@typescript-eslint/no-unsafe-function-type': 'warn',\n '@typescript-eslint/no-wrapper-object-types': 'warn',\n '@typescript-eslint/array-type': ['warn', { default: 'array' }],\n '@typescript-eslint/no-unnecessary-condition': 'warn',\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/await-thenable': 'error',\n '@typescript-eslint/prefer-readonly': 'warn',\n '@typescript-eslint/no-invalid-void-type': 'error', // Void types are valid in many contexts (e.g., Promise<void>)\n '@typescript-eslint/no-misused-promises': 'error', // Too many false positives with promise handling\n\n // TypeScript consistency\n '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],\n '@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as' }],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-exports': 'error',\n '@typescript-eslint/method-signature-style': 'error',\n\n // TypeScript equivalents of core rules\n '@typescript-eslint/no-redeclare': 'error',\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/dot-notation': 'error',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTernary: true,\n allowTaggedTemplates: true,\n },\n ],\n '@typescript-eslint/no-use-before-define': [\n 'error',\n { variables: true, functions: false },\n ],\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-magic-numbers': [\n 'error',\n {\n ignoreEnums: true,\n ignoreArrayIndexes: true,\n ignoreDefaultValues: true,\n ignoreTypeIndexes: true,\n ignore: [0, 1, -1, 2],\n },\n ],\n\n // Expressions and async\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n { ignoreArrowShorthand: true },\n ],\n '@typescript-eslint/no-meaningless-void-operator': 'error',\n\n // TypeScript modern preferences\n '@typescript-eslint/prefer-includes': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-reduce-type-parameter': 'error',\n '@typescript-eslint/prefer-string-starts-ends-with': 'error',\n\n // === NAMING CONVENTIONS ===\n 'camelcase': ['warn', { allow: ['^_', 'content_type', 'reply_to'] }],\n '@typescript-eslint/naming-convention': [\n 'warn',\n {\n selector: 'property',\n format: ['camelCase', 'UPPER_CASE'],\n leadingUnderscore: 'allow',\n filter: {\n regex: String.raw`^_|[- /?:{}@%]|Provider|Comp|^item$|^condition$|^container$|^Container$|^\\d+$`,\n match: false,\n },\n },\n {\n selector: 'variableLike',\n format: ['camelCase', 'UPPER_CASE', 'PascalCase'],\n trailingUnderscore: 'allow',\n },\n {\n selector: 'variable',\n format: ['camelCase', 'PascalCase'],\n types: ['function'],\n filter: {\n regex: '^_|Comp|Provider|Stack|Wrapper|Root',\n match: false,\n },\n },\n {\n selector: 'typeLike',\n format: ['PascalCase'],\n filter: {\n regex: '^_|_$',\n match: false,\n },\n },\n {\n selector: ['variable', 'property', 'parameter', 'typeProperty'],\n types: ['boolean'],\n format: ['UPPER_CASE', 'PascalCase'],\n prefix: booleanNamePrefixes,\n filter: {\n regex: booleanNameExceptions,\n match: false,\n },\n },\n ],\n\n // === IMPORTS & EXPORTS ===\n // Import path and structure validation:\n 'import-x/no-absolute-path': 'warn', // Prevent absolute paths in imports (should use relative or package imports)\n 'import-x/newline-after-import': ['warn', { count: 1 }], // Require exactly one blank line after imports\n 'import-x/no-cycle': ['error', { maxDepth: 1, ignoreExternal: true }], // Prevent circular dependencies\n 'import-x/order': ['warn',\n {\n 'groups': [\n 'builtin', // Node.js built-in modules\n 'external', // Packages from node_modules\n ['type', 'internal'], // Type imports, Absolute imports (often aliased like 'src/components')\n 'parent', // Relative imports from parent directories (../)\n 'sibling', // Relative imports from sibling directories (./)\n 'index', // Index file imports (./index.js)\n 'object', // Imports from object notation\n ],\n 'newlines-between': 'never',\n }],\n\n // === UNUSED IMPORTS & VARIABLES ===\n // Automatically remove unused imports:\n 'unused-imports/no-unused-imports': 'error', // Error on unused imports (auto-fixable)\n\n // Handle unused variables with underscore convention:\n 'unused-imports/no-unused-vars': [\n 'warn',\n {\n vars: 'all', // Check all variables\n varsIgnorePattern: '^_', // Ignore variables starting with underscore\n args: 'after-used', // Only check arguments after the last used one\n argsIgnorePattern: '^_', // Ignore arguments starting with underscore\n },\n ],\n\n // === BANNED APIS ===\n // Ban imperative array/object operations in favor of modern syntax:\n 'ban/ban': [\n 'warn',\n {\n name: ['*', 'concat'],\n message: 'Array.concat is an imperative operation. Use ES6 spread syntax instead: [...items, newItem]',\n },\n {\n name: ['Object', 'assign'],\n message: 'Object.assign is imperative. Use the spread operator instead: {...obj}',\n },\n ],\n\n // === CODE STRUCTURE RESTRICTIONS ===\n // Enforce functional programming patterns:\n 'no-loops/no-loops': 'error', // Ban for/while/do-while loops, use array methods instead\n\n // Enforce pattern-based conditional logic:\n 'no-restricted-syntax': [\n 'error',\n {\n selector: 'SwitchStatement',\n message: 'Switch statements are banned. Use `ts-pattern` library for pattern matching instead.',\n },\n ],\n\n // === ESLINT COMMENTS ===\n '@eslint-community/eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }],\n\n // === TESTING LIBRARY ===\n 'testing-library/no-render-in-lifecycle': ['error', { allowTestingFrameworkSetupHook: 'beforeEach' }],\n\n // === SORTING ===\n 'sort/type-properties': 'warn',\n\n // === UNICORN ===\n 'unicorn/filename-case': [\n 'warn',\n {\n cases: { camelCase: true, kebabCase: true },\n ignore: [/\\.(js|cjs)$/], // Keep ignoring JS/CJS if needed\n },\n ],\n 'unicorn/no-unused-properties': 'warn',\n 'unicorn/consistent-destructuring': 'warn',\n 'unicorn/no-useless-undefined': ['warn', { checkArguments: false }],\n\n // === SONARJS ===\n 'sonarjs/no-duplicated-branches': 'warn',\n\n // === FUNCTIONAL ===\n 'functional/functional-parameters': ['error', { allowArgumentsKeyword: false, enforceParameterCount: false }],\n },\n settings: {\n 'import-x/extensions': ['.js', '.cjs', '.mjs'],\n 'import-x/parsers': { 'typescript-eslint': ['.ts', '.tsx'] },\n 'import-x/resolver-next': [\n createTypeScriptImportResolver({\n alwaysTryTypes: true,\n bun: true,\n }),\n ],\n },\n },\n\n // Config files overrides\n {\n files: ['**/*.config.{ts,js,mjs,cjs}'],\n rules: {\n '@typescript-eslint/no-magic-numbers': 'off',\n '@typescript-eslint/naming-convention': 'off',\n 'functional/functional-parameters': 'off',\n },\n },\n\n // Test files overrides - functional rules too strict for test code\n {\n files: ['**/*.test.{ts,tsx,js,jsx}', '**/*.spec.{ts,tsx,js,jsx}', '**/tests/**', '**/__tests__/**'],\n rules: {\n 'functional/no-expression-statements': 'off',\n 'functional/no-return-void': 'off',\n 'functional/no-let': 'off',\n 'functional/functional-parameters': 'off',\n 'functional/prefer-immutable-types': 'off',\n },\n },\n];\n\n// Export shared utilities for use in other packages\nexport { booleanNameConvention, booleanNameExceptions, booleanNamePrefixes } from './boolean-naming';\n\nexport default config;\n\n/* eslint-enable @typescript-eslint/no-magic-numbers */\n/* eslint-enable @typescript-eslint/naming-convention */\n","/**\n * Combines an array of regex expressions into a single regex expression via the union operator.\n */\nconst concatElementsByRegexUnion = (elements: readonly string[]) =>\n elements.reduce((element, accum, index) => `${accum}${index === 0 ? '' : '|'}${element}`, '');\n\n// Prefixes allowed at the start of a boolean variable/parameter name\nexport const booleanNamePrefixes = [\n 'is',\n 'as',\n 'are',\n 'was',\n 'should',\n 'has',\n 'can',\n 'did',\n 'will',\n 'use',\n 'does',\n 'show',\n 'allow',\n 'enabled',\n 'enable',\n 'disable',\n 'editable',\n 'refetch',\n 'destructive',\n 'hide',\n 'error',\n 'override',\n 'need',\n 'must',\n 'require',\n 'want',\n 'with',\n];\n// Regex for the rest of a boolean variable/parameter name (the part after the prefix)\nconst booleanNameSuffixes = '[A-Z]([A-Za-z]?)+';\n// Exceptions to the rule for allowable boolean variable/parameter names\nconst booleanNameExceptionsList = [\n '^_',\n '_$',\n '[- /?:{}@%]',\n '^[A-Z][a-z]*([A-Z][a-z]*)',\n '^item$',\n '^value$',\n '^condition$',\n '^container$',\n '^included',\n '^center$',\n '^debug$',\n '^concurrent',\n '^animated$',\n '^allow',\n '^visible',\n '^merge$',\n '^ssr$',\n '^multiSelect$',\n 'Shown$',\n '^enumerable$',\n '^configurable$',\n];\n// A singular regex string for the boolean name exceptions (instead of array of expressions)\nexport const booleanNameExceptions = concatElementsByRegexUnion(booleanNameExceptionsList);\n\n// The full boolean naming convetions regex\nexport const booleanNameConvention = new RegExp(\n `${concatElementsByRegexUnion(\n booleanNamePrefixes,\n )}|${booleanNameSuffixes}|${booleanNameExceptions}`,\n).toString();\n"],"mappings":";AACA,OAAO,YAAY;AAEnB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,SAAS,sCAAsC;AAC/C,OAAO,sBAAsB;AAC7B,OAAO,mBAAmB;AAC1B,OAAO,mBAAmB;AAC1B,OAAO,gBAAgB;AACvB,OAAO,0BAA0B;AACjC,OAAO,mBAAmB;AAC1B,OAAO,mBAAmB;AAC1B,OAAO,aAAa;AACpB,OAAO,cAAc;AAErB,OAAO,mBAAmB;AAE1B,OAAO,eAAe;;;ACftB,IAAM,6BAA6B,CAAC,aAClC,SAAS,OAAO,CAAC,SAAS,OAAO,UAAU,GAAG,KAAK,GAAG,UAAU,IAAI,KAAK,GAAG,GAAG,OAAO,IAAI,EAAE;AAGvF,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,sBAAsB;AAE5B,IAAM,4BAA4B;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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ACpC,qCAAqC;AAAA,IACvC;AAAA,EACF;AACF;AAKA,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanblonien/eslint-config-base",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Sean Blonien's opinionated ESLint config for TypeScript projects",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,6 +38,7 @@
38
38
  "@typescript-eslint/parser": "^8.52.0",
39
39
  "eslint-import-resolver-typescript": "^4.4.4",
40
40
  "eslint-plugin-ban": "^2.0.0",
41
+ "eslint-plugin-functional": "^9.0.2",
41
42
  "eslint-plugin-import-x": "^4.16.1",
42
43
  "eslint-plugin-no-loops": "^0.4.0",
43
44
  "eslint-plugin-sonarjs": "^3.0.5",