@wistia/oxlint-config 1.0.3 → 1.0.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/rules/base.mjs +6 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "packageManager": "yarn@4.14.1",
6
6
  "type": "module",
package/rules/base.mjs CHANGED
@@ -452,25 +452,10 @@ export const baseRules = {
452
452
 
453
453
  // Disallow reassigning function parameters
454
454
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-param-reassign.html
455
- 'eslint/no-param-reassign': [
456
- 'error',
457
- {
458
- props: true,
459
- ignorePropertyModificationsFor: [
460
- 'acc',
461
- 'accumulator',
462
- 'e',
463
- 'ctx',
464
- 'context',
465
- 'req',
466
- 'request',
467
- 'res',
468
- 'response',
469
- '$scope',
470
- 'staticContext',
471
- ],
472
- },
473
- ],
455
+ // Decision: props:false. Name-based allowlists are brittle and miss common
456
+ // patterns (state, draft, reply, event, config, options); property-level
457
+ // immutability is delegated to TypeScript's Readonly<T> at the call site.
458
+ 'eslint/no-param-reassign': ['error', { props: false }],
474
459
 
475
460
  // Disallow the unary operators ++ and --
476
461
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-plusplus.html
@@ -699,8 +684,8 @@ export const baseRules = {
699
684
 
700
685
  // Require following curly brace conventions
701
686
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/curly.html
702
- // Decision: stylistic choice best left to formatter
703
- 'eslint/curly': 'off',
687
+ // Decision: enforce curly braces for all control statements because even the `multiline` option can allow subtle bugs
688
+ 'eslint/curly': ['error', 'all'],
704
689
 
705
690
  // Require function names to match the name of the variable or property to which they are assigned
706
691
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/func-name-matching.html