Repository navigation
Highlights
Run type-aware third-party ESLint plugins
Third-party and custom JavaScript ESLint plugins can now run type-aware rules on Rslint's Go TypeScript engine. Whether you rely on a community plugin that isn't built into Rslint (such as @tanstack/eslint-plugin-query) or custom typed rules in your own repo, they can read TypeScript type information through context.sourceCode.parserServices.
// rslint.config.ts
import { defineConfig } from '@rslint/core';
import pluginQuery from '@tanstack/eslint-plugin-query';
export default defineConfig([
{
languageOptions: {
parserOptions: { projectService: true },
},
plugins: {
'@tanstack/query': pluginQuery,
},
rules: {
// Type-aware rule: checks queryFn's return type
'@tanstack/query/no-void-query-fn': 'error',
},
},
]);(Third-party plugin guide · #2517 · #2648)
Turn on stricter rules without fixing every legacy error first
Adopting a strict rule on an existing codebase no longer requires cleaning up hundreds of old violations in one giant PR. You can now record your current error counts into rslint-suppressions.json and commit it alongside your config. Existing violations up to the recorded count stay silenced, while any new violation fails CI immediately.
# Baseline current errors for specific rules, or for every error-level rule
rslint --suppress-rule no-var
rslint --suppress-all
# Shrink or remove entries as you clean up legacy code
rslint --prune-suppressionsThe file format is compatible with ESLint's bulk suppressions, so you can reuse an existing eslint-suppressions.json directly via --suppressions-location. (Bulk suppressions guide · #2618)
32 new built-in Unicorn rules
This release adds 32 new built-in unicorn/* rules—including prefer-at, prefer-math-min-max, numeric-separators-style, no-useless-undefined, no-useless-else, consistent-assert, and more—and updates unicornPlugin.configs.recommended and promisePlugin.configs.recommended to match upstream presets (see upgrade notes below). (#2659)
Lower memory spikes and faster runs on large workspaces
Linting large monorepos and memory-constrained CI containers now uses less peak memory and finishes faster:
- Memory-aware project loading: Adapts how many TypeScript projects load concurrently to your machine's or container's available RAM, preventing memory spikes. (#2655 · #2666 · #2667)
- Lighter standalone files & JS plugins: Processes files outside
tsconfig.jsonin smaller batches instead of all at once, and scales JavaScript plugin workers only when needed. (#2656 · #2654 · #2664) - Faster hot rules: Cuts redundant type-checker work in
no-unsafe-assignment,no-unsafe-return,no-unsafe-argument,no-floating-promises, andimport/no-cycle. (#2635 · #2637 · #2638 · #2640)
Breaking Changes & Upgrade Notes
File-wide inline disable comments must use /* ... */
Inline rslint-disable / eslint-disable and rslint-enable / eslint-enable comments now match ESLint's exact syntax rules:
- No more
//for file-wide disables. Single-line// rslint-disableor// eslint-disablecomments are no longer treated as file-wide or range disables—switch them to/* ... */block comments (or use// rslint-disable-next-lineif you only meant one line). - Line directives stay on one line. Multiline
/* rslint-disable-line ... */comments are now ignored, and a multiline/* rslint-disable-next-line ... */comment suppresses the line right after its closing*/. - No
*wildcard. Leave the rule list empty (/* rslint-disable */) to disable all rules; a literal*is now treated as a rule name. - Spaces around
--for descriptions. Write/* rslint-disable no-console -- legacy logging */with whitespace on both sides of--.
// Before (no longer disables the rest of the file)
// rslint-disable no-console
// After: disable the rest of the file
/* rslint-disable no-console */
// Or disable just the next line
// rslint-disable-next-line no-console(Inline directives guide · #2604)
Expect new lint errors if you use the Unicorn recommended preset
unicornPlugin.configs.recommended now enables 53 additional unicorn/* rules at error severity (including both rules added in this release and previously available rules that were not yet enabled in the preset). It also turns off core ESLint's no-nested-ternary so unicorn/no-nested-ternary takes over, and promisePlugin.configs.recommended now explicitly sets 'promise/no-native': 'off'.
If upgrading fails CI with new Unicorn errors, you can either put rule overrides after the preset in your config, or run rslint --suppress-all to record the existing violations as a baseline and fix them over time. (Unicorn preset · #2659)
Existing rules that may report new or different findings
@typescript-eslint/no-unused-varsnow checks files without TypeScript type info. Previously, this rule silently skipped files outsidetsconfig.jsonand any config usingparserOptions: { project: false }. It no longer requires a TypeScript program, so expect real unused-variable errors to show up in standalone JS/TS files and config scripts that weren't checked before. (#2672 · #2676)no-restricted-importspatterns now follow.gitignorerules. Inno-restricted-importsand@typescript-eslint/no-restricted-imports,patterns[].groupnow uses.gitignorematching (matching ESLint). For example,shared/lib/**now matchesshared/lib/internalbut no longer matchesshared/libitself; trailing/directory patterns and!negations also follow.gitignoresemantics. Double-check your restricted import patterns after upgrading. (#2670)import/ordertreats aliased assets and workspace self-imports asinternal. Non-TS assets mapped viatsconfig.jsonpaths(such as~assets/icon.svg) and symlinked package self-references in workspaces (such as pnpm monorepos) are now classified asinternalinstead ofunknownorexternal. Runrslint --fixifimport/orderasks to reorder these imports. (#2662 · #2663)no-restricted-syntaxnow matches TypeScript AST nodes. Selectors targeting TypeScript syntax (such asTSAsExpression,TSEnumDeclaration, orTSInterfaceDeclaration) were previously skipped and now match as expected, which may surface new findings if your config already contains those selectors. (#2650 · #2629)- Custom JavaScript rules should guard
parserServices?.program. For files outside a configured TypeScript project (or withproject: false),context.sourceCode.parserServicesis now still populated with AST node maps whileparserServices.programisnull. CheckparserServices?.programbefore making type queries. (#2648) - Diagnostic wording and snapshot tests.
@typescript-eslint/no-unsafe-callnow matches typescript-eslint v8.74.0 wording and reportsfninstead of(fn)for parenthesized calls like(fn)()(#2677).no-class-assign,no-debugger,no-template-curly-in-string, andno-namespacealso align their message IDs, wording, and ranges with upstream ESLint (#2553).
What's Changed
Breaking Changes 🍭
New Features 🎉
- feat: add unicorn/prefer-bigint-literals by @fansenze in #2549
- feat(unicorn): add better-dom-traversing by @fansenze in #2548
- feat(unicorn): add prefer-math-min-max by @fansenze in #2547
- feat(unicorn): add prefer-array-index-of by @fansenze in #2546
- feat(unicorn): add prefer-code-point rule by @swwind in #2555
- feat(unicorn): add prefer-at rule by @fansenze in #2550
- feat(unicorn): add prefer-dom-node-text-content by @fansenze in #2551
- feat(unicorn): add numeric-separators-style rule by @fansenze in #2559
- feat(unicorn): add no-misrefactored-assignment by @fansenze in #2562
- feat(unicorn): add no-useless-recursion rule by @fansenze in #2558
- feat(unicorn): add prefer-iterator-zip rule by @fansenze in #2560
- feat(unicorn): add no-return-array-push rule by @fansenze in #2561
- feat(unicorn): add no-selector-as-dom-name rule by @yzh20060401 in #2566
- feat(unicorn): add no-useless-undefined rule by @fansenze in #2572
- feat(unicorn): add prefer-math-constants by @fansenze in #2575
- feat(unicorn): port no-accidental-bitwise-operator by @fansenze in #2574
- feat(unicorn): add no-invalid-file-input-accept rule by @fansenze in #2577
- feat(unicorn): add no-mismatched-map-key rule by @fansenze in #2573
- feat(unicorn): add no-array-sort-for-min-max rule by @fansenze in #2580
- feat(unicorn): port no-duplicate-loops by @fansenze in #2584
- feat(unicorn): add no-late-event-control rule by @fansenze in #2587
- feat(unicorn): add no-unnecessary-string-trim rule by @fansenze in #2576
- feat(unicorn): port prefer-math-abs by @fansenze in #2582
- feat(unicorn): add no-boolean-sort-comparator rule by @fansenze in #2581
- feat(unicorn): add no-unreadable-for-of-expression rule by @fansenze in #2593
- feat(unicorn): add no-unnecessary-splice rule by @fansenze in #2596
- feat(unicorn): add consistent-json-file-read rule by @fansenze in #2595
- feat(unicorn): add no-useless-else rule by @fansenze in #2594
- feat(unicorn): add consistent-assert rule by @HashemKhalifa in #2363
- feat(unicorn): add no-duplicate-logical-operands rule by @HashemKhalifa in #2611
- feat(unicorn): add no-duplicate-set-values rule by @HashemKhalifa in #2610
- feat(unicorn): add no-canvas-to-image rule by @yzh20060401 in #2620
- feat(cli): add bulk suppressions for existing lint errors by @fansenze in #2618
- feat: add standalone type services for JavaScript rules by @fansenze in #2517
- feat(typeservice): integrate type services into CLI, API, LSP, and plugin worker pool by @fansenze in #2648
- feat(presets): align unicorn and promise recommended presets with implemented rules by @fansenze in #2659
- feat(typescript-eslint): align no-base-to-string with upstream v8.74.0 by @fansenze in #2673
Performance 🚀
- perf(import): reuse prepared options in shared module resolution by @elecmonkey in #2487
- perf: replace x/text/collate with generated ASCII collation tables by @elecmonkey in #2544
- perf(no-unsafe-assignment): skip type queries for guaranteed safe senders by @fansenze in #2638
- perf(typescript/no-floating-promises): eliminate redundant type queries by @fansenze in #2640
- perf(vfs): track source BOM during ReadFile and preserve BOMSource by @fansenze in #2641
- perf(utils): cache TypeScriptProjectDiscovery ancestor chains and project references by @fansenze in #2644
- perf(loader): add lock-free identity fast path to frozenFileSystem by @fansenze in #2643
- perf(import/no-cycle): cache Program source lookups, exact-size ModuleGraph refs, and explore SCCs on demand by @fansenze in #2635
- perf(typescript): avoid redundant type and signature resolution in no-unsafe-return and no-unsafe-argument by @fansenze in #2637
- perf(linter,loader): schedule weighted Programs LPT with backfill and release load snapshots by @fansenze in #2655
- perf(loader,config): stream unbound source-only roots in bounded batches when cross-file AST rules are inactive by @fansenze in #2656
- perf(plugin,ipc): scale JS plugin worker pool by backlog and right-size shared memory by @fansenze in #2654
- perf(linter,plugin,ipc): decouple post-native scheduling, spread typed sessions, and LPT-window JS plugins by @fansenze in #2664
- perf(loader,plugin): shard frozen-FS caches and overlap CLI plugin worker prewarm by @fansenze in #2665
- perf(program,linter): right-size one-shot checker pools and reclaim non-anchor checkers by @fansenze in #2667
- perf(linter): scale Program admission memory budget to host and container limits by @fansenze in #2666
Bug Fixes 🐞
- fix: align rule diagnostics and port missing upstream JS suites by @elecmonkey in #2553
- fix(unicorn): handle typed operands in prefer-math-min-max by @fansenze in #2557
- fix: fix no-constant-condition behavior gaps and port upstream test suites by @elecmonkey in #2563
- fix: fix no-await-in-loop behavior gaps and port upstream test suites by @elecmonkey in #2567
- fix: fix constructor-super behavior gaps and port upstream test suites by @elecmonkey in #2554
- fix(typescript): fix no-base-to-string behavior gaps and port upstream test suite by @elecmonkey in #2569
- fix(typescript): fix prefer-promise-reject-errors behavior gaps and port upstream test suite by @elecmonkey in #2571
- fix(typescript): fix no-var-requires behavior gaps and port upstream test suite by @elecmonkey in #2578
- fix(typescript): fix consistent-return behavior gaps and port upstream test suite by @elecmonkey in #2586
- fix: fix array-callback-return behavior gaps and port upstream test suite by @elecmonkey in #2568
- fix(eslint): no-unused-vars recognize implicit classic JSX factory usage by @elecmonkey in #2590
- fix(typescript): fix consistent-generic-constructors behavior gaps and port upstream test suite by @elecmonkey in #2583
- fix(typescript): fix use-unknown-in-catch-callback-variable behavior gaps and port upstream test suite by @elecmonkey in #2585
- fix(typescript): fix no-confusing-void-expression behavior gaps and port upstream test suite by @elecmonkey in #2599
- fix(typescript): fix prefer-nullish-coalescing behavior gaps and port upstream test suite by @elecmonkey in #2606
- fix(typescript): no-unnecessary-condition false positive on ?. after literal index access in optional chain by @zatteo in #2627
- fix(no-restricted-syntax): match TypeScript assertion expression selectors by @zatteo in #2629
- fix(typescript): reduce no-unnecessary-condition false positives by @fansenze in #2634
- fix(no-restricted-syntax): resolve import specifier parent as ImportDeclaration by @fansenze in #2646
- fix(no-restricted-syntax): evaluate selectors against in-memory estree.Tree by @fansenze in #2650
- fix(typecheck): collect program diagnostics before native lint by @fansenze in #2653
- fix(jest,rstest): reject non-identifier receivers when parsing call chains by @fansenze in #2647
- fix(estree): support source-authored JSDoc types, import, and non-literal import() by @fansenze in #2668
- fix(import): use ImportResolver in import/order for non-TS assets and resolver settings by @fansenze in #2662
- fix(no-restricted-imports): match group patterns with gitignore semantics by @richardwellgood-byte in #2670
- fix(import): classify symlinked self-references as internal in import/order by @fansenze in #2663
- fix(typescript): drop type-info requirement from no-unused-vars by @fansenze in #2672
- fix(unicorn): ignore return undefined in getters for no-useless-undefined by @fansenze in #2678
- fix(typescript-eslint): align no-unsafe-call with upstream v8.74.0 by @fansenze in #2677
- fix(unicorn): align prefer-math-min-max with upstream v80.0.0 by @fansenze in #2679
- fix(no-unsafe-assignment): preserve contextual typing in sender fast path by @fansenze in #2680
- fix(scope,typescript): ignore JSDoc-reparsed syntax in scope builder and no-unused-vars by @fansenze in #2676
- fix(utils): bind ParseCache ASTs before publish and ensure script kind by @fansenze in #2683
Refactor 🔨
- refactor(test): add shared @rslint/rule-tester and migrate node tests by @elecmonkey in #2539
- refactor(test): define standard test case assertions by @elecmonkey in #2541
- refactor(test): migrate react-hooks tests to @rslint/rule-tester by @elecmonkey in #2543
- refactor(test): migrate rstest tests to @rslint/rule-tester by @elecmonkey in #2565
- refactor(test): migrate promise tests to @rslint/rule-tester by @elecmonkey in #2564
- refactor(test): migrate jsx-a11y tests to @rslint/rule-tester by @elecmonkey in #2570
- refactor(test): expose fixture paths to cases and migrate import tests to @rslint/rule-tester by @elecmonkey in #2601
- refactor(test): migrate jest tests to @rslint/rule-tester by @elecmonkey in #2616
- refactor(native,ipc): unify low-level shared-memory mapping primitives by @fansenze in #2652
- refactor(test): migrate react tests to @rslint/rule-tester by @elecmonkey in #2619
Document 📖
- docs(website): simplify Rspress configuration by @SoonIter in #2533
- docs: enable ESM output for website by @chenjiahan in #2591
Other Changes
- test: port missing upstream JS tests for nine ESLint core and typescript-eslint rules by @elecmonkey in #2552
- chore(unicorn): keep prefer-code-point opt-in by @fansenze in #2556
- chore(deps): update all patch dependencies by @renovate[bot] in #2370
- chore(ci): skip package checks for website changes by @chenjiahan in #2592
- ci: increase golangci-lint timeout to 20 minutes by @fansenze in #2597
- test: complete skipped rule cases and document intentional exclusions by @elecmonkey in #2579
- chore(deps): update module golang.org/x/sync to v0.25.0 by @renovate[bot] in #2623
- chore(deps): upgrade pnpm to 12.23.0 by @chenjiahan in #2632
- chore(deps): install Rstack agent skills with pnpm by @chenjiahan in #2633
- chore(deps): update module github.com/fxamacker/cbor/v2 to v2.10.0 by @renovate[bot] in #2622
- chore(deps): update module golang.org/x/sys to v0.50.0 by @renovate[bot] in #2624
- chore: reorder pnpm filters in build:website script by @fansenze in #2649
- test: mitigate Windows CI EBUSY failures in test cleanup and harnesses by @fansenze in #2651
- chore(deps): update dependency effector to v23.5.2 by @renovate[bot] in #2658
- chore(deps): update dependency @napi-rs/cli to ^3.11.1 by @renovate[bot] in #2657
- test(utils): probe immediate Windows Job memory limit by @fansenze in #2674
- ci: speed up Windows npm tests and fix test temp-dir EBUSY by @fansenze in #2681
New Contributors
- @yzh20060401 made their first contribution in #2566
- @zatteo made their first contribution in #2627
- @richardwellgood-byte made their first contribution in #2670
Full Changelog: v0.10.1...v0.11.0