v0.9.3
Highlights
Near-complete eslint-plugin-n support
Rslint now supports nearly all of eslint-plugin-n's rules and recommended presets through the native node/* namespace. The 38 supported rules cover dependency resolution, package publishing, deprecated APIs, and compatibility with configured Node.js versions. Use nodePlugin.configs.recommended for mixed CommonJS and ES module projects, or choose recommendedModule or recommendedScript explicitly.
import { defineConfig, nodePlugin } from '@rslint/core';
export default defineConfig([nodePlugin.configs.recommended]);Faster Rstest analysis
Rstest rules avoid redundant scans of mock factories and assertion pairs, and defer fix construction until needed. In a synthetic benchmark with 2,000 adjacent assertion pairs, rstest/prefer-called-exactly-once-with rule execution dropped from 289.8 ms to 4.2 ms. #2122, #2123, #2124, #2243
What's Changed
New Features 🎉
- feat(import): consider query strings in recommended preset by @chenjiahan in #2084
- feat(rstest): add prefer-called-with rule by @elecmonkey in #2085
- feat(rstest): add no-restricted-matchers rule by @elecmonkey in #2086
- feat: port rule promise/no-native by @fansenze in #2089
- feat(rstest): add prefer-strict-equal rule by @elecmonkey in #2093
- feat: add promise/prefer-await-to-callbacks by @fansenze in #2097
- feat: add promise/spec-only rule by @fansenze in #2094
- feat(rstest): add require-to-throw-message rule by @elecmonkey in #2092
- feat(rstest): add prefer-equality-matcher rule by @elecmonkey in #2091
- feat(rstest): add no-async-mock-factory rule by @elecmonkey in #2100
- feat: add node/hashbang rule by @fansenze in #2103
- feat: add node/no-exports-assign rule by @fansenze in #2108
- feat(tsgo): add config subcommand for final compiler options by @CPunisher in #2109
- feat: port rule unicorn/prefer-date-now by @shiyudesu in #2111
- feat: add node/no-extraneous-import rule by @fansenze in #2113
- feat(rstest): add consistent-test-it rule by @elecmonkey in #2110
- feat: port rule node/no-process-exit by @colinaaa in #2107
- feat: port node/no-extraneous-require by @fansenze in #2120
- feat(rstest): add rule prefer-comparison-matcher by @elecmonkey in #2121
- feat(rstest): add prefer-to-be rule by @elecmonkey in #2115
- feat(unicorn): add no-unreadable-iife rule by @HashemKhalifa in #2128
- feat: port rule unicorn/empty-brace-spaces by @shiyudesu in #2131
- feat: port rule react/no-unused-prop-types by @swwind in #2129
- feat(unicorn): implement prefer-set-size rule by @HashemKhalifa in #2134
- feat: port rule unicorn/number-literal-case by @shiyudesu in #2148
- feat: port rule unicorn/require-post-message-target-origin by @shiyudesu in #2144
- feat(react): add iframe-missing-sandbox rule by @swwind in #2145
- feat(node): add callback-return rule by @fansenze in #2152
- feat(rstest): add prefer-to-contain rule by @elecmonkey in #2127
- feat(unicorn): implement no-new-buffer rule by @HashemKhalifa in #2136
- feat(react): add jsx-curly-newline rule by @swwind in #2147
- feat(playground): support JS, JSX, and TSX source files by @elecmonkey in #2143
- feat(rstest): add no-unnecessary-assertion rule by @elecmonkey in #2149
- feat(node): add no-missing-import rule by @fansenze in #2154
- feat: add node/global-require rule by @fansenze in #2172
- feat: add node/handle-callback-err by @fansenze in #2174
- feat: add node/no-new-require rule by @fansenze in #2176
- feat: add node/exports-style rule by @fansenze in #2173
- feat: add node/no-mixed-requires rule by @fansenze in #2177
- feat: port rule node/no-callback-literal by @fansenze in #2175
- feat(rstest): add prefer-to-have-been-called rule by @elecmonkey in #2160
- feat(node): add no-path-concat rule by @fansenze in #2178
- feat: add node/no-process-env rule by @fansenze in #2180
- feat(node): add no-restricted-import rule by @fansenze in #2184
- feat: add node/no-top-level-await rule by @fansenze in #2179
- feat(playground): introduce dependency types support and allow
@rstest/coreby @elecmonkey in #2126 - feat: add node/no-deprecated-api rule by @fansenze in #2183
- feat: add node/no-sync rule by @fansenze in #2182
- feat: add node/no-unpublished-bin rule by @fansenze in #2181
- feat(rstest): add valid-expect-with-promise rule by @elecmonkey in #2151
- feat: add node/prefer-node-protocol rule by @fansenze in #2190
- feat: add node/no-restricted-require rule by @fansenze in #2189
- feat(rstest): add max-nested-describe rule by @elecmonkey in #2167
- feat(rstest): add unbound-method rule and align @typescript-eslint/unbound-method with upstream by @elecmonkey in #2155
- feat: add node/file-extension-in-import rule by @fansenze in #2188
- feat(unicorn): add no-useless-error-capture-stack-trace rule by @HashemKhalifa in #2203
- feat(unicorn): add no-array-reverse rule by @HashemKhalifa in #2198
- feat(unicorn): add no-array-sort rule by @HashemKhalifa in #2199
- feat(unicorn): add prefer-optional-catch-binding rule by @HashemKhalifa in #2208
- feat(unicorn): add no-zero-fractions rule by @HashemKhalifa in #2200
- feat(rstest): add no-duplicate-hooks rule by @elecmonkey in #2195
- feat: port rule unicorn/prefer-reflect-apply by @shiyudesu in #2210
- feat(jest,rstest): add prefer-lowercase-title rule by @elecmonkey in #2197
- feat: add node/no-missing-require rule by @fansenze in #2214
- feat: add node/no-unpublished-import by @fansenze in #2213
- feat(rstest): add prefer-to-have-length rule by @elecmonkey in #2196
- feat: add node/prefer-global/process by @fansenze in #2223
- feat: add node/prefer-global/text-decoder by @fansenze in #2220
- feat: add node/prefer-global/buffer rule by @fansenze in #2216
- feat(unicorn): add explicit-timer-delay rule by @HashemKhalifa in #2201
- feat(unicorn): add no-negation-in-equality-check rule by @HashemKhalifa in #2202
- feat: add node/prefer-promises/dns by @fansenze in #2227
- feat: add node/prefer-global/console rule by @fansenze in #2222
- feat(unicorn): add no-unnecessary-array-splice-count rule by @HashemKhalifa in #2205
- feat(unicorn): add prefer-dom-node-append rule by @HashemKhalifa in #2206
- feat(unicorn): add prefer-identifier-import-export-specifiers rule by @HashemKhalifa in #2207
- feat(rstest): add require-top-level-describe rule by @elecmonkey in #2215
- feat: add node/prefer-global/text-encoder by @fansenze in #2224
- feat: add node/prefer-global/url rule by @fansenze in #2226
- feat(rstest): add prefer-hooks-on-top rule by @elecmonkey in #2228
- feat(node): add prefer-promises/fs rule by @fansenze in #2231
- feat(rstest): add require-hook rule by @elecmonkey in #2229
- feat: add node/prefer-global/url-search-params by @fansenze in #2232
- feat(node): add no-unpublished-require rule by @fansenze in #2221
- feat: add node/no-unsupported-features/node-builtins rule by @fansenze in #2234
- feat(node): add no-unsupported-features/es-builtins by @fansenze in #2235
- feat(node): add no-unsupported-features/es-syntax by @fansenze in #2236
- feat(rstest): add prefer-to-have-been-called-times rule by @elecmonkey in #2230
- feat(rstest): add prefer-ending-with-an-expect rule by @elecmonkey in #2217
- feat(unicorn): add no-unnecessary-slice-end rule by @HashemKhalifa in #2204
- feat(unicorn): add prefer-global-number-constants rule by @HashemKhalifa in #2209
- feat(unicorn): add prefer-type-error rule by @HashemKhalifa in #2242
- feat: add Node.js recommended presets by @fansenze in #2241
Performance 🚀
- perf: reduce import cycle graph work by @fansenze in #2104
- perf(rstest): defer edits in five
rstest/rules by @elecmonkey in #2122 - perf(rstest): optimize
prefer-called-exactly-once-withinterval scans by @elecmonkey in #2124 - perf(rstest): make
no-async-mock-factorylinear in mock calls by @elecmonkey in #2123
Bug Fixes 🐞
- fix: correct no-var autofixes for deferred initializer calls by @fansenze in #2087
- fix(react): honor JSX pragma in display-name by @elecmonkey in #2095
- fix(utils): align glob code units and capture replacements by @fansenze in #2102
- fix(react): ignore abstract methods in no-is-mounted by @elecmonkey in #2106
- fix(react): align no-render-return-value with upstream by @elecmonkey in #2117
- fix: resolve projectService projects per lint target by @fansenze in #2105
- fix(react): align no-string-refs with upstream by @elecmonkey in #2118
- fix(tsgo): symbol data collect for anonymous type by @quininer in #2132
- fix(react): align jsx-curly-brace-presence with upstream by @elecmonkey in #2141
- fix(react): align jsx-props-no-multi-spaces with upstream by @elecmonkey in #2139
- fix: cover diagnostic loc by @CPunisher in #2157
- fix(react): align jsx-key with upstream by @elecmonkey in #2161
- fix(react): align jsx-no-target-blank with upstream by @elecmonkey in #2162
- fix: handle wrapped expressions in iframe sandbox checks by @fansenze in #2171
- fix(react): align jsx-fragments with upstream by @elecmonkey in #2140
- fix(playground): allow import cdn scripts in worker-src CSP by @swwind in #2187
- fix: support multi-slash rule names across runtime and tooling by @fansenze in #2211
- fix(node): honor fallback and fullySpecified resolver options by @fansenze in #2219
Refactor 🔨
- refactor: sync rule and TypeScript version metadata by @fansenze in #2078
- refactor: move shared accessor helpers into utils by @fansenze in #2090
- refactor: remove type extra by @CPunisher in #2156
- refactor: share file-level scope analysis across rules by @elecmonkey in #2164
- refactor(react): enforce shared scope analysis in helpers by @elecmonkey in #2165
- refactor: share project construction across lint scopes by @fansenze in #2191
- refactor: share API reference tracking across rules by @fansenze in #2193
- refactor: resolve lint projects from effective configuration by @fansenze in #2192
- refactor(utils): share package and module rule utilities by @fansenze in #2212
- refactor(jest): share call analysis across jest recommended rules by @elecmonkey in #2243
Document 📖
- docs: add rslint npm release preparation skill by @fansenze in #2096
- docs: require normalized tsgo fixture paths by @elecmonkey in #2099
- docs: prioritize shared tools when porting rules by @fansenze in #2101
- docs: document complete ESLint core rule coverage by @elecmonkey in #2133
- docs: remove rule prefixes from document titles by @elecmonkey in #2135
Other Changes
- chore: bump tsgo packages to 0.0.11 by @CPunisher in #2088
- ci: skip Darwin Go job on ordinary pull requests by @fansenze in #2112
- chore: update pull request template and skills by @chenjiahan in #2119
- chore: add third-party licenses and notices by @elecmonkey in #2130
- chore(ci): skip tests for docs and skill changes by @chenjiahan in #2137
- chore: remove unused website components and obsolete script by @chenjiahan in #2138
- chore(deps): remove unused dependencies and deduplicate lockfile by @chenjiahan in #2142
- chore: bump tsgo packages to 0.0.12 by @CPunisher in #2116
- chore: add docs writer skill and refresh installed skills by @chenjiahan in #2146
- chore: bump tsgo packages to 0.0.13 by @CPunisher in #2159
- chore: bump tsgo packages to 0.0.14 by @CPunisher in #2163
- ci: stabilize Windows npm test cleanup by @fansenze in #2186
- ci: report binary size change on pull requests by @elecmonkey in #2081
- ci: respect Windows runner limits in Go tests by @fansenze in #2225
New Contributors
- @HashemKhalifa made their first contribution in #2128
Full Changelog: v0.9.2...v0.9.3