Breaking
no-top-level-side-effects: Focus on mutations of globals, and remove it from theunopinionatedpreset (#3915) 24abac4- Unknown calls are no longer reported by default. Enable the new
checkUnknownCallsoption for stricter checking. - Mutations of globals, like
document.title = 'x'andObject.assign(globalThis, …), are now reported, also in declarations and default exports. You may see new reports.
- Unknown calls are no longer reported by default. Enable the new
Improvements
- Infer types from JSDoc
@type,@param, and@returnsannotations in rules that use type information (#3941) 2b4bfab - Handle template literals without expressions like strings in more rules (#3943) 8bd8c06
- Autofix more code that contains comments, while keeping the comments (#3939) 87baf82
- Fix autofixes in many rules that could produce broken code or wrong parentheses (#3917) fed7eac
- Make autofixes safer in many rules
- Fixes that can change behavior in rare cases are now suggestions, for example in
prefer-spread,prefer-math-min-max,prefer-modern-dom-apis, andprefer-switch.
- Fixes that can change behavior in rare cases are now suggestions, for example in
- Improve performance 175efaf 3dd8fd2
comment-content: Addignoreoption (#3950) 3fe046econsistent-function-scoping: Ignore functions in Vitest hoisted factories (#3905) 98912a9custom-error-definition: Ignore abstract TypeScript classes (#3934) ee3501fno-non-function-verb-prefix: Ignore shorthand destructuring (#3926) 76e5760no-top-level-side-effects: Recognize more config helpers (#3916) d459c51no-useless-coercion: Preserve boolean return types in TypeScript (#3904) bef1571prefer-array-some: Check.find()results used as booleans (#3913) c957bf3prefer-default-parameters: Skip unsafe logical OR fallbacks (#3951) bcec97aprefer-includes: Skip incompatible TypeScript search values (#3927) d66441aprefer-includes-over-repeated-comparisons: Report negated and typed loose comparisons (#3935) 6e21cb1prefer-includes-over-repeated-comparisons: Preserve TypeScript union narrowing (#3910) b5c479dprefer-literal-ascii: Preserve escaped trailing spaces in templates (#3911) 360094bprefer-minimal-ternary: Skip minimizations that break types (#3892) f022d6dprefer-modern-math-apis: Use suggestions for changes that can affect numeric results (#3914) 8af7c17prefer-simple-condition-first: Improvetypeofcomparisons and guards (#3948) ee3edf0prefer-simplified-conditions: Handle equivalent logical expressions (#3938) a0b2788prefer-simplified-conditions: Factor common terms in longer chains and static templates (#3942) 0d8c8bcprefer-smaller-scope: Check TypeScript type aliases (#3928) 290d922prefer-string-raw: Preserve TypeScript literal types in autofixes (#3912) 0611546prefer-ternary: Preserve consecutive early-return guards (#3945) 3fa840frequire-post-message-target-origin: Skip incompatible typed methods (#3925) 387194bthrow-new-error: Ignore calls that return functions (#3894) 5e35def