Skip to content

Releases: oxc-project/oxc

oxc crates_v0.102.0

08 Dec 11:53
Immutable release. Only release title and notes can be modified.
745873e

Choose a tag to compare

💥 BREAKING CHANGES

  • 083fea9 napi/parser: [BREAKING] Represent empty optional fields on JS side as null (#16411) (overlookmotel)

🚀 Features

  • 7a2afee parser: Add TS1174 error for classes extending multiple base classes (#15993) (sapphi-red)
  • da87812 semantic: Add TS2309 error for export assignment with other exports (#15992) (sapphi-red)
  • d6d2bcd minifier: Remove unused function calls that are marked by manual_pure_functions (#16534) (sapphi-red)
  • c90f053 minifier: Support . separated values for compress.treeshake.manualPureFunctions (#16529) (sapphi-red)
  • a607cc4 codegen: Preserve comments between CatchClause's param and body (#16167) (copilot-swe-agent)
  • 8c10694 semantic: Expose get_comment_at method (#16439) (camc314)
  • 3981e7a ast: Add get_comment_at to lookup a comment by span (#16438) (camc314)

🐛 Bug Fixes

  • 2c275bf transformer/styled-components: Named styled import doesn't work (#16573) (Dunqing)
  • 699406a napi/parser: Move ExportEntry::module_request field to first (#16412) (overlookmotel)
  • 12bd794 napi/parser: Move ExportEntry::module_request field to last (#16403) (overlookmotel)

⚡ Performance

  • 790beeb napi/parser: Do not remove extraneous options on JS side (#16447) (overlookmotel)

oxlint v1.32.0 & oxfmt v0.17.0

08 Dec 12:24
Immutable release. Only release title and notes can be modified.
203975f

Choose a tag to compare

Table of Contents

Oxlint v1.32.0

🚀 Features

  • 5c62c16 linter/plugins: Allow JS plugins to access globals (#16512) (Arsh)
  • ba7bd51 linter: Implement no-useless-return rule (#16388) (FMP1783)
  • fa605df linter: Fix arrow-body-style automatically (#16252) (Hamir Mahal)
  • 7584938 linter/plugins: Add ESLint compat mode to RuleTester (#16538) (overlookmotel)
  • b38c2d0 linter/plugins: Add SourceCode#lineStartIndices getter (#16510) (overlookmotel)
  • ba93ffc linter/plugins: Add SourceCode#tokensAndComments getter (#16503) (overlookmotel)
  • d2ca540 linter/plugins: Add SourceCode#isESTree property (#16499) (overlookmotel)
  • 9001234 linter: Add fix support for tsgolint diagnostics (#16344) (camc314)
  • 2d6bb85 editors: Toggle client after vscode config changing (#16162) (Liang Mi)
  • 0ec454c linter/plugins: Merge default options into options (#16358) (overlookmotel)

🐛 Bug Fixes

  • a806d74 linter: Use import type for ESTree in visitor.d.ts (#16472) (camc314)
  • 8933c84 linter: Fix jest/expect-expect rule docs. (#16550) (connorshea)
  • 1c08879 linter: Fix false positive in no-invalid-fetch-options for conditional expressions (#16570) (camc314)
  • 1a69b06 linter: Junit support for multiple files/errors/diagnostics (#16568) (Shrey Sudhir)
  • a7d435b linter/sort-keys: Preserve multi-line formatting in autofix (#16563) (camc314)
  • fd84dcc linter/plugins: RuleTester parser catch fatal errors (#16558) (overlookmotel)
  • ab4deb0 linter/plugins: Improve safety of options merging (#16549) (overlookmotel)
  • a58c76a linter: Fix the react/jsx-fragments rule config to take a string argument (#16175) (connorshea)
  • f7751cc linter/plugins: Fix TS types for RuleTester (#16546) (overlookmotel)
  • 6d33320 linter/plugins: Prevent user modifying the default config (#16545) (overlookmotel)
  • b4483c5 linter/plugins: Add config support skeleton to RuleTester (#16537) (overlookmotel)
  • 3a49158 linter/plugins: Improve TS types for tokens (#16502) (overlookmotel)
  • 0c14531 oxlint/lsp: Revalidate all known files after internal restart (#16407) (Sysix)
  • 2d3217e linter/plugins: Remove panics from lint_file and setup_configs (#16453) (overlookmotel)
  • 655341b linter/oxc: Not emit error when the threshold is zero and we haven't detected a barrel file (#16455) (Said Atrahouch)
  • b9f359f linter/no-var: Expand fix span to prevent conflicts with other rules (#16445) (camc314)
  • c6778f3 linter: Preserve original quote style in no-hex-escape fixer (#16410) (camc314)
  • 3ad913b linter: Improve rule docs page autofix description (#16281) (Hamir Mahal)
  • 0b7e00c linter: Handle keyword unary expressions in yoda rule fix (#16402) (camc314)
  • 5fd3096 lsp: Skip (un)registering file watcher when not dynamic watchers are supported (#16406) (Sysix)
  • 804144f lsp: Respect null as invalid settings for workspace/didChangeConfiguration (#16361) (Sysix)
  • 723a7e5 linter: Prevent invalid BigInt literal fix for exponential notation (#16401) (camc314)
  • 2589fb1 linter: Fix prefer_expect_resolves fixer for member expressions (#16393) (camc314)
  • 428c7cd linter: Wrap logical expressions in parentheses when fixing no-extra-boolean-cast (#16363) (camc314)
  • 3903567 linter: Skip prefer-string-raw in type annotations and .d.ts files (#16382) (camc314)
  • d490daa linter/func-names: Use centralized reserved keyword check and fix ancestor traversal (#16362) (camc314)
  • d846c53 tsgolint: Use expect when sending diagnostics (#16341) (camc314)
  • 114665d lsp: Watch for files when workspace folder is added & workspace/configuration is not supported (#16307) (Sysix)
  • f5d0ebb linter/func-names: Avoid suggesting reserved keywords as function names (#16352) (camc314)
  • d268135 linter/no-console-spaces: Preserve escape sequences in fixer output (#16349) (camc314)
  • b02c21a linter/valid-title: Preserve escape sequences in fixer output (#16348) (camc314)
  • 2373b76 linter/no-untyped-mock-factory: Fix fixer producing invalid syntax when newline exists after opening paren (#16351) (camc314)

⚡ Performance

  • 67cfa58 lsp: Avoid some clones (#16519) (Sysix)
  • 2a09665 oxlint/lsp: Store only LinterCodeAction instead of the complete DiagnosticReport (#16516) (Sysix)
  • 0ca9754 lsp: Avoid Uri to String and back to Uri conversion (#16470) (Sysix)
  • 2736636 lsp: Avoid cloning when revalidating diagnostics (#16469) (Sysix)
  • 793b989 linter/plugins: Move result-processing work off main JS thread (#16456) (overlookmotel)
  • 44dff7b linter/plugins: Skip serialization overhead when no errors (#16443) (overlookmotel)
  • 1aa2409 linter/plugins: Do not remove messageId field from DiagnosticReport before sending to Rust (#16442) (overlookmotel)
  • 5017db8 linter/plugins: Reduce calls to Path::to_string_lossy (#16429) (overlookmotel)
  • 194e357 linter: Use SmallVec for rule options (#16400) (Copilot)
  • e31b2bd linter: Only clone config if required (#16350) (overlookmotel)
  • 3026086 linter: Avoid cloning rule options (#16338) (overlookmotel)

📚 Documentation

  • fef77af linter: Fix jsx-a11y/img-redundant-alt configuration option names. (#16552) (connorshea)
  • c0766df linter: Add config option docs for unicorn/filename-case rule. (#16280) (connorshea)
  • e24aabd linter/plugins: Correct comment (#16559) (overlookmotel)
  • 514c724 linter: Fix the name of the IIFEs config option in eslint/max-lines-per-function (#16554) (connorshea)
  • 4d94438 linter/rules: Correct arrow body style options in documentation (#16509) (GRK)
  • 6bac4ec linter: Pull configuration struct doc comment when rendering config docs (#16288) (connorshea)
  • 8c85e08 linter/plugins: Add TODO comment (#16511) (overlookmotel)
  • a9b9298 linter/plugins: Add JSDoc comments to SourceCode properties (#16497) (overlookmotel)
  • 467cc1a linter/plugins: Improve comment on error branch (#16464) (overlookmotel)
  • 041b119 linter: Add config option docs to jest/consistent-test-it rule. (#16286) (connorshea)

🛡️ Security

  • d90ef9f deps: Update dependency rolldown to v1.0.0-beta.53 (#16428) (renovate[bot])

Oxfmt v0.17.0

🚀 Features

  • 3184f17 oxfmt: Pass filepath field to prettier formatting (#16591) (Yuji Sugiura)
  • 7bb3304 oxfmt: Pass populated config to prettier formatting (#16584) (leaysgur)
  • 69f84d2 oxfmt: Pass raw config to prettier formatting (#16582) (leaysgur)
  • a83a2ec oxfmt: Expose setupConfig(configJSON: string) napi callback (#16579) (leaysgur)
  • 930533f formatter: Convert single \r to \n in string and add a debug assertion to ensure that there is no \r in the text (#16531) (Dunqing)
  • af76b0e oxfmt: Support formatting HTML, YAML, GraphQL, Handlebars, Markdown, CSS files (#16524) (leaysgur)
  • 66b64ef oxfmt: Support formatting JSON files (#16523) (leaysgur)
  • 4767926 oxfmt: Prepare non-js/ts file support with prettier (#16480) (leaysgur)
  • 2b4ce5d oxfmt: Use dedicated format_by_xxx_formatter method by SourceType (#16417) (leaysgur)
  • 0867d2f oxfmt: Set up JS formatFile() function for Rust via napi (#16415) (leaysgur)
  • b6feb66 oxfmt: Rename embedded.ts with preparing formatFile() function (#16414) (leaysgur)
  • 80e6999 formatter: Add debug assertion to ensure that there is no empty content is passed in (#16475) (Dunqing)
  • 7374856 formatter/sort-imports: Support options.internalPattern (#16372) (leaysgur)
  • dd2cb62 oxfmt: Not error on explicit --write flag used (#16376) (leaysgur)

🐛 Bug Fixes

  • 267fadc formatter: Should not remove quotes for property keys that contains KATAKANA MIDDLE DOT (#16594) (Dunqing)
  • 06d6b43 formatter: Incorrectly treating a member chain with the test name as a test call expression (#16592) (Dunqing)
  • 50f3959 formatter: Should not expand the object pattern if its parent is an AssignmentPattern (#16590) (Dunqing)
  • 40b0134 formatter: Incorrect formatting of useImperativeHandle hook (#16533) (Dunqing)
  • 75393e7 formatter: Incorrect handling of CRLF for multiline block comment (#16528) (Dunqing)
  • ee0756b formatter: JSX text wrapping incorrect 2 (#16320) (Dunqing)
  • 36308b8 formatter: Fix indent for new expression with type cast (#16380) (leaysgur)

⚡ Performance

  • 6f16a8f formatter: Avoid using an indent with a empty content (#16474) (Dunqing)
  • 201c98f formatter: Early return when no comments need to be printed (#16432) (Dunqing)

oxc crates_v0.101.0

02 Dec 09:25
Immutable release. Only release title and notes can be modified.
701ab87

Choose a tag to compare

🚀 Features

  • 165f59d parser: Report empty expression in JSX attribute error (#16378) (leaysgur)

oxc crates_v0.100.0

01 Dec 15:08
Immutable release. Only release title and notes can be modified.
0872758

Choose a tag to compare

💥 BREAKING CHANGES

  • 74cf572 ast: [BREAKING] Make source field of TSImportType a StringLiteral (#16114) (copilot-swe-agent)
  • 43156ae ast: [BREAKING] Rename TSImportType argument field to source (#16110) (overlookmotel)
  • 934d873 napi: [BREAKING] Drop armv7-unknown-linux-musleabihf support (#16105) (Boshen)

🚀 Features

  • 669afe0 ast: Add Expression::is_jsx method (#16154) (Dunqing)
  • 17a8caa parser: Add diagnostic for JSX identifiers with hyphens (#16133) (camchenry)
  • 0549ae5 parser: Add diagnostic for expected ident after optional chain (#16132) (camchenry)
  • db839ae parser: Improve diagnostic for unexpected optional declarations (#16131) (camchenry)
  • bab4bc8 napi/parser: Add type annotations to parse-raw-worker test (#15998) (camc314)

🐛 Bug Fixes

  • f564687 isolated-declarations: Preserve variable declarations when type with same name is referenced in implements clause (#16328) (Copilot)
  • 35ed36c traverse: Fix panic when truncating non-ASCII variable names (#16265) (peter)
  • 9149a26 linter/plugins, napi/parser: Deep freeze visitor keys (#16293) (overlookmotel)
  • 6b54dab minifier: Incorrect non-null object condition simplification with && and || (#16161) (sapphi-red)
  • 9cc20a1 minifier: Avoid merging side effectful expressions to next assignment statement if the side effect may change the left hand side reference (#16165) (sapphi-red)
  • 91eb3f2 ast/estree: Convert TSImportType argument field to Literal (#16109) (overlookmotel)
  • 1199cee parser: Reject invalid modifiers on parameter properties with binding patterns (#16083) (camc314)
  • f376325 traverse: Remove console.log from build script (#16049) (overlookmotel)

⚡ Performance

  • 82d784f lexer: Reduce bounds checks in Lexer::get_string (#16317) (overlookmotel)
  • cc2f352 span: Add #[inline] to Atom methods (#16311) (overlookmotel)
  • ffca070 span: Add #[repr(transparent)] to Atom (#16310) (overlookmotel)
  • 02bdf90 linter/plugins, napi/parser: Reuse arrays in visitor keys (#16294) (overlookmotel)

📚 Documentation

  • 891e0b4 parser: Add note about falling back to parse TSType in TSImportType (#16119) (camc314)

oxlint v1.31.0 & oxfmt v0.16.0

01 Dec 15:30
Immutable release. Only release title and notes can be modified.
df24daf

Choose a tag to compare

Table of Contents

Oxlint v1.31.0

🚀 Features

  • 1651806 linter/plugins: Rule options (#16215) (Arsh)
  • 5da1a63 linter/plugins: Introduce RuleTester (#16206) (overlookmotel)
  • 41129ab linter/plugins: Implement languageOptions.parser (#16292) (overlookmotel)
  • 4b24825 linter: Implement no-restricted-types rule (#16276) (camc314)
  • 7150209 linter/plugins: Implement SourceCode#getNodeByRangeIndex (#16256) (overlookmotel)
  • 3226864 linter/plugins: Implement options merging (#16217) (overlookmotel)
  • cbb108a linter/plugins: Support default options (#16170) (overlookmotel)
  • 04a3a66 linter/plugins: Implement SourceCode#getTokenOrCommentAfter() (#16045) (Arsh)
  • 68b63d9 linter/plugins: Implement SourceCode#getTokenOrCommentBefore() (#16044) (Arsh)
  • 04d9454 linter/plugins: Implement SourceCode#getTokenByRangeStart() (#16043) (Arsh)
  • 7b8d578 linter/plugins: Implement SourceCode#getTokensBetween() (#16034) (Arsh)
  • 79c242f linter/plugins: Implement SourceCode#getLastTokensBetween() (#16033) (Arsh)
  • 1772078 linter/plugins: Implement SourceCode#getFirstTokenBetween() (#16032) (Arsh)
  • 21bb86d linter/plugins: Implement SourceCode#getFirstTokensBetween() (#16019) (Arsh)
  • 78f74b1 linter/plugins: Implement SourceCode#getLastTokenBetween() (#16008) (Arsh)
  • df0b948 linter/plugins: Implement SourceCode#getLastToken() (#16003) (Arsh)

🐛 Bug Fixes

  • decf2ad linter: Fix rule option docs for no-extra-boolean-cast, prefer-number-properties, and prefer-structured-clone (#16285) (connorshea)
  • cf249f5 linter/plugins: Fix message interpolation (#16300) (overlookmotel)
  • 9149a26 linter/plugins, napi/parser: Deep freeze visitor keys (#16293) (overlookmotel)
  • 71271ee linter: Fix typescript/no-empty-interface config option casing. (#16282) (connorshea)
  • 653fa6c oxlint/oxfmt/lsp: Tell client the real tool name & version (#16212) (Sysix)
  • 385e13e linter: Support both prefer-inline and preferInline for import/no-duplicates (#16275) (copilot-swe-agent)
  • efc08d3 linter: Fix config docs for no-return-assign and unicode-bom rules. (#16260) (connorshea)
  • dc96d3f linter: Correct docs to use string option for import/first rule. (#16264) (connorshea)
  • 15ce491 linter: Correct the default config options for the switch-exhaustiveness-check rule. (#16268) (connorshea)
  • 13f985c linter: Fix casing for unicorn/explicit-length-check config option. (#16269) (connorshea)
  • 0df1901 linter/plugins: Reset state after error during AST visitation (#16246) (overlookmotel)
  • 42e9dcc linter: Fix docs for consistent-type-specifier-style and consistent-type-definitions rules. (#16253) (connorshea)
  • 505ceb1 linter: Fix the radix rule docs to correctly render as a string-only config option (#16248) (connorshea)
  • 135cee6 oxlint/lsp: Run diagnostics after delayed worker initialization (#16244) (Sysix)
  • 78aa294 linter/plugins: Deep freeze options (#16218) (overlookmotel)
  • 123bffe linter/plugins: Handle zero-token files in SourceCode#getLastToken() (#16184) (Arsh)
  • 55fcfba linter: Add considerDefaultExhaustiveForUnions option to switch-exhaustiveness-check (#16204) (camc314)
  • 9cc20a1 minifier: Avoid merging side effectful expressions to next assignment statement if the side effect may change the left hand side reference (#16165) (sapphi-red)
  • 75249e0 linter/plugins: Handle non-UTF8 file paths (#16157) (overlookmotel)
  • 86fa667 linter/plugins: Improve type def for RuleMeta defaultOptions property (#16159) (overlookmotel)
  • d2b7dcb tsgolint: Improve lsp diagnostic when linting fails (#16115) (camc314)
  • 8810bd5 linter: Prevent conflicting fixes between prefer_number_properties and prefer_numeric_literals (#16113) (camc314)
  • 91eb3f2 ast/estree: Convert TSImportType argument field to Literal (#16109) (overlookmotel)
  • 2da2fc1 linter: Fix prefer-string-raw fixer producing invalid JS for non-ASCII strings (#16102) (camc314)
  • f5cb601 linter/plugins: Perform length checks before continuing loops (#16025) (Arsh)
  • e1c21ca linter/jsx-key: Implement missing options (#15731) (camc314)

⚡ Performance

  • 02bdf90 linter/plugins, napi/parser: Reuse arrays in visitor keys (#16294) (overlookmotel)
  • 714a91a linter/no-restricted-types: Skip running if config is empty (#16278) (camc314)
  • d3a34f8 linter/plugins: Optimize getTokens() and other methods (#16188) (Arsh)
  • c05db06 linter/plugins: Speed up initTokensWithComments (#16117) (overlookmotel)
  • 4846886 linter/plugins: Optimize merging of tokens and comments (#16071) (Arsh)
  • e232d35 linter/plugins: Recycle objects in token methods (#16068) (overlookmotel)

📚 Documentation

  • 55cf157 linter/plugins: Clarify comments (#16335) (overlookmotel)
  • 7613957 linter: Add config docs for typescript/ban-ts-comment rule (#16287) (connorshea)
  • e928732 linter/plugins: Fix JSDoc comment (#16295) (overlookmotel)
  • d4a1581 linter: Add a link to MDN for the no-proto rule. (#16213) (connorshea)
  • be36e36 linter/plugins: Fix JSDoc comment for loadPluginImpl (#16211) (overlookmotel)
  • 6d6e9c9 linter: Improve the docs for oxc/no-async-await rule. (#16181) (connorshea)
  • 0e1d38a linter/plugins: Clarify JSDoc comment for getTokensBetween (#16070) (overlookmotel)
  • 3ee22b2 linter/plugins: Fix JSDoc comments for tokens methods (#16063) (overlookmotel)
  • f257b5c linter/plugins: Clarify JSDoc comments for tokens methods (#16062) (overlookmotel)

Oxfmt v0.16.0

🚀 Features

  • 116e0d1 website: Auto generate oxfmt docs (#15985) (Boshen)
  • 862bdf7 oxfmt: Detect unsupported experimental options (take2) (#16088) (leaysgur)

🐛 Bug Fixes

  • b169e52 formatter: Correct printing of AsExpression and SatisfiesExpression (#16325) (leaysgur)
  • a07eec1 formatter: Incorrect indentation for class extends and implements (#16334) (Dunqing)
  • 5ad5435 formatter: Fix line comment after : inside ternary JSX (#16315) (leaysgur)
  • 75ac90c formatter: Comments in call arguments should be printed as-is (#16327) (Dunqing)
  • fd77568 formatter: Don't wrap parenthesis for yield expression if there is no leading comment (#16326) (Dunqing)
  • 8ccfb06 formatter: Should indent class extends and interface heritage when it is a member expression without type arguments (#16323) (Dunqing)
  • 0faa978 oxfmt: JsFormatEmbeddedCb types (#16324) (Brooooooklyn)
  • 2b8f982 formatter: JSX text wrapping incorrect (#16318) (Dunqing)
  • f3ffebe formatter: Should indent variable declarator if there is a trailing comment (#16243) (Dunqing)
  • 31d3186 formatter: Incorrect handling of directives with comments (#16235) (Dunqing)
  • ac8fcaf formatter: Add parens for new: private field expr (#16312) (leaysgur)
  • 653fa6c oxlint/oxfmt/lsp: Tell client the real tool name & version (#16212) (Sysix)
  • 380a0af formatter: Incorrect printing of class binding trailing comments (#16234) (Dunqing)
  • 0ca8154 formatter: Incorrect printing of trailing comments of callee when the call arguments are empty (#16232) (Dunqing)
  • ac3a92e formatter: Print comment in ternary jsx (#16224) (leaysgur)
  • e3a7388 formatter: Fix parens for static member chain (#16229) (leaysgur)
  • 55334c3 formatter: Incorrect printing of dangling comments in the if statement (#16228) (Dunqing)
  • 9096a63 formatter: Correct printing of trailing comments after the semicolon for class properties (#16225) (Dunqing)
  • 75fd568 formatter: Inconsistent union type output between two runs (#16222) (Dunqing)
  • cd70484 formatter: Should not add a hard space before function body (#16221) (Dunqing)
  • 9097167 formatter: Incorrect printing of union types with comments (#16205) (Dunqing)
  • 79b78b3 formatter: Template literal element should not be indented (#16189) (Dunqing)
  • 48d6ed2 formatter: Nested assignment pattern should not expand outer object pattern (#16160) (Dunqing)
  • 8f4137d formatter: Output is incorrect when using comments inside JSX which is the right hand-side of LogicalExpression (#16156) (Dunqing)
  • 85c3a10 formatter/sort_imports: Handle internal prefixes correctly (#16128) (leaysgur)
  • 38b7bc4 oxfmt: Make no-napi build work (#16134) (leaysgur)
  • 889d2e7 formatter: Handle poor layout for grouped call arguments (#16093) (Dunqing)
  • 14b0a6a oxfmt: Fix JS-ish file detection (#16092) (leaysgur)
  • 9706a1a oxfmt: Ignore unsupported options (#16085) (leaysgur)

oxc crates_v0.99.0

24 Nov 10:12
Immutable release. Only release title and notes can be modified.
7252123

Choose a tag to compare

💥 BREAKING CHANGES

  • cbb27fd ast: [BREAKING] Add TSGlobalDeclaration type (#15712) (overlookmotel)

🚀 Features

  • 0c1f82b linter/plugins: Add tokens property to Program (#16020) (overlookmotel)
  • 6cff132 span: Add Span::merge_within method (#15869) (sapphi-red)
  • 102365d allocator/vec: Add Vec::into_bump_slice method (#15770) (Dunqing)

🐛 Bug Fixes

  • e2ca770 codegen: Add support for printing type arguments in new expressions (#15963) (Ives van Hoorne)
  • 2bd3cb6 apps, editors, napi: Fix oxlint-disable comments (#16014) (overlookmotel)
  • 622cb5e parser: Preserve legal comments with @preserve/@license when preceded by other annotations (#15929) (copilot-swe-agent)
  • 7c46a9e transformer/tagged-template-transform: Handle \n escape sequences (#15830) (Dunqing)
  • f386efc minifier: Avoid generating invalid spans (#15778) (sapphi-red)
  • d4ff004 parser: Forbid invalid modifiers on module and global (#15723) (overlookmotel)
  • 2191ae9 semantic: Allow reserved keywords in typescript ambient contexts (#15495) (sapphi-red)
  • 7d1ebad isolated-declarations: Incorrect nested namespace output in isolated declarations (#15800) (copilot-swe-agent)

⚡ Performance

  • b4b0ed8 transformer/typescript: Reverse order of checks (#15722) (overlookmotel)

📚 Documentation

  • c81a331 data_structures: Doc comments on fields of Stack (#15793) (overlookmotel)
  • cfae31d allocator: Use allocator as var name in examples (#15781) (overlookmotel)

oxlint v1.30.0 & oxfmt v0.15.0

24 Nov 11:28
Immutable release. Only release title and notes can be modified.
bf9f469

Choose a tag to compare

Table of Contents

Oxlint v1.30.0

💥 BREAKING CHANGES

  • cbb27fd ast: [BREAKING] Add TSGlobalDeclaration type (#15712) (overlookmotel)

🚀 Features

  • 72660f7 linter: Support auto generate config document for tuple lint option (#15904) (Duc Nghiem Xuan)
  • 0c1f82b linter/plugins: Add tokens property to Program (#16020) (overlookmotel)
  • 9e61beb linter/plugins: Implement SourceCode#getFirstToken() (#16002) (Arsh)
  • 9a548dd linter/plugins: Implement SourceCode#getLastTokens() (#16000) (Arsh)
  • 0b6cb11 linter/plugins: Implement SourceCode#getFirstTokens() (#15976) (Arsh)
  • 166781e linter/plugins: Implement SourceCode#getTokenAfter() (#15973) (Arsh)
  • 6ae232b linter: Expose type errors via tsgolint (#15917) (camc314)
  • 2bfdd26 linter/plugins: Implement SourceCode#getTokensAfter() (#15971) (Arsh)
  • 45fffc1 linter/plugins: Implement SourceCode#getTokenBefore() (#15956) (Arsh)
  • 776e473 linter/plugins: Implement SourceCode#getTokensBefore() (#15955) (Arsh)
  • 595867a oxlint: Generate markdownDescription fields for oxlint JSON schema. (#15959) (connorshea)
  • 5569317 vscode: Add quick actions to status bar tooltip (#15962) (Sysix)
  • 986cac1 linter/plugins: Token-related SourceCode APIs (TS ESLint implementation) (#15861) (Arsh)
  • a21f9e4 linter: Implement unicorn/prefer-bigint-literals rule (#15923) (Michiel Vrins)
  • 4b9d8d2 linter/type-aware: Include range with tsconfig diagnostics (#15916) (camc314)
  • 220d01e editor: Improve the status bar item for the VS Code extension by adding a tooltip. (#15819) (connorshea)

🐛 Bug Fixes

  • 2bd3cb6 apps, editors, napi: Fix oxlint-disable comments (#16014) (overlookmotel)
  • 81f5360 linter/prefer-number-properties: Get fixer to replace entire call expr (#15979) (camc314)
  • e4ba07f language_server: Always write to memory file system (#15975) (Sysix)
  • a8a2032 linter: Support missing range for internal diagnostics (#15964) (camc314)
  • 619a226 oxlint/lsp: Don't register textDocument/formatting capability (#15882) (Sysix)
  • 6ab1a20 linter: Fix no_useless_spread producing invalid syntax when removing empty object spreads (#15905) (camc314)
  • be4b6df linter: Unicorn/prefer-string-replace-all incorrectly escapes backslashes (#15901) (camc314)
  • 9fa9ef2 linter: Gracefully fail when using import plugin, large file counf and JS plugins (#15864) (camc314)
  • c027398 linter/plugins: Correct bindings package names glob in TSDown config (#15871) (overlookmotel)
  • b622ef8 linter: Fix oxc/bad_array_method_on_arguments rule behavior. (#15854) (connorshea)
  • aa06c3f linter: Recognize NewExpression as value context in no-unused-private-class-members (#15843) (camc314)
  • e89c5ba typescript/prefer-namespace-keyword: Skip nested TSModuleDeclarations (#15806) (overlookmotel)
  • 646d020 linter/exhaustive-dependencies: Prevent is_callee_of_call_expr flag from leaking into nested expressions (#15832) (camc314)
  • 46bd6bd linter/plugins: Pin @typescript-eslint/scope-manager dependency (#15807) (overlookmotel)
  • fba31fa linter: Patch @typescript-eslint/scope manager (#15214) (Arsh)
  • 50307c1 linter/jest: Ignore expect identifier in argument position (#15785) (camc314)

⚡ Performance

  • 024b48a linter/plugins: Lazy-load tokens parsing code (#16011) (overlookmotel)
  • 15365c9 linter/plugins: Reduce var assignments (#15953) (overlookmotel)
  • 84d1f4f linter/plugins: Downgrade some checks to debug-only (#15922) (overlookmotel)
  • a49f704 linter/typescript: Avoid searching source text unless required (#15805) (overlookmotel)

📚 Documentation

  • ceffa5a linter: Add config option docs for various rules. (#16024) (connorshea)
  • 9a0ed13 linter: Fix config option docs for eslint/operator-assignment rule. (#16030) (connorshea)
  • 0b18005 linter: Add config docs generation for rules with Regex arguments (#15978) (connorshea)
  • 48d18e0 linter: Improve diagnostic message for promise/catch-or-return rule (#15980) (connorshea)
  • 6c72e84 linter: Use backticks for code elements across more rule diagnostics (#15958) (connorshea)
  • a63dad7 linter/plugins: Add comment (#15952) (overlookmotel)
  • 81ea642 vscode: Use markdownDescription for better formatting in VSCode Settings (#15889) (connorshea)
  • db6a110 linter/plugins: Fix JSDoc comment (#15884) (overlookmotel)
  • 1487271 linter: Add config option docs for jsdoc/require-param and jsdoc/require-returns rules (#15857) (connorshea)
  • fbf0fd4 linter/plugins: Add JSDoc comments to Plugin and Rule types (#15815) (overlookmotel)
  • ac5e4b5 linter/plugins: Add JSDoc comments and improve comments (#15814) (overlookmotel)
  • 9b7b083 linter: Fix error in curly "all" example (#15801) (camc314)
  • 65a3520 linter: Improve diagnostic for consistent-type-definitions rule. (#15752) (connorshea)

🛡️ Security

  • f9b9276 deps: Update dependency rolldown to v1.0.0-beta.51 (#15856) (renovate[bot])

Oxfmt v0.15.0

💥 BREAKING CHANGES

  • a937890 formatter: [BREAKING] Default to lineWidth: 100 (#15933) (leaysgur)
  • 03d5f5a formatter/sort-imports: [BREAKING] Change default order to natural with natord crate (#15828) (leaysgur)
  • cbb27fd ast: [BREAKING] Add TSGlobalDeclaration type (#15712) (overlookmotel)

🚀 Features

  • 7818e22 formatter/sort-imports: Support options.groups (#15831) (leaysgur)
  • f9a502c oxfmt: oxfmt --lsp support (#15765) (leaysgur)

🐛 Bug Fixes

  • 4817486 formatter: Revert FormatElement::BestFitting printing logic (#16028) (Dunqing)
  • 5562dd6 formatter: Incorrect formatting method chain with trailing comments (#16027) (Dunqing)
  • 6d14c8b formatter: Comments in export class decorators are printing incorrectly (#15897) (Dunqing)
  • 683c764 formatter: Correct a few minor mismatched typescript tests (#15894) (Dunqing)
  • c11cc07 formatter: Improve formatting for default type on type parameters (#15893) (Dunqing)
  • 0bff596 formatter: Handle JSX expresssion dangling comment (#15890) (leaysgur)
  • 16a9dc8 formatter: Inconsistent printing of class extends and interface extends (#15892) (Dunqing)
  • 300b496 formatter: Inconsistent CallExpression and NewExpression around member chain and logical expression (#15858) (Dunqing)

⚡ Performance

  • 65174cc formatter: Reduce the size of TextWidth to 4 byte (#15827) (Dunqing)
  • 4fe3aac formatter: Use ArenaVec and ArenaBox (#15420) (Dunqing)

oxc crates_v0.98.0

17 Nov 12:45
Immutable release. Only release title and notes can be modified.
c588bc5

Choose a tag to compare

💥 BREAKING CHANGES

  • ea51b0b napi: [BREAKING] Standardize function naming with sync suffixes (#15661) (Boshen)
  • b2af6b5 ast: [BREAKING] Remove AstKind for Argument (#13902) (taearls)

🚀 Features

  • 1b18457 transformer: Support tagged template expression with </script transformation (#15664) (Dunqing)
  • 77efb76 parser: Improve error message for invalid switch clauses (#15728) (sapphi-red)
  • 5691727 parser: Improve import source from error message (#15727) (sapphi-red)
  • b7404bc parser: Improve error message for missing function body (#15726) (sapphi-red)
  • 71c2fb0 parser: Improve error message when JSX is found while not enabled (#15725) (sapphi-red)
  • 56e7e44 minifier: Disable removal of unnecessary use strict directives for DCE (#15691) (sapphi-red)
  • 8a61cfd allocator, ast: Introduce UnstableAddress trait (#15700) (overlookmotel)
  • f5ce55a napi: Export all options using wildcard exports (Boshen)
  • 68703b9 minifier: Rotate binary expressions to remove parentheses (#15473) (sapphi-red)

🐛 Bug Fixes

  • c023ba6 semantic: Do not duplicate statements in temp Vec when binding TSModuleDeclarations (#15724) (overlookmotel)
  • d60ca81 parser: Reject import something 'source' (#15746) (sapphi-red)
  • e0728fa ast: Exclude comment end position from is_inside_comment check (#15753) (camc314)
  • 9f54a36 semantic: Error on \00 in strict mode (#15743) (sapphi-red)
  • 440a977 ast: Include rest properties when using get_binding_identifiers (#15710) (camc314)

⚡ Performance

  • 1f09d3c parser: Faster checking for invalid modifiers (#15717) (overlookmotel)
  • d8d4e31 ast: Use loop instead of recursion in TSModuleDeclarationBody::as_module_block_mut (#15713) (overlookmotel)

📚 Documentation

  • e033d50 ast: Clarify behavior of TSModuleDeclaration::has_use_strict_directive (#15730) (overlookmotel)
  • 9eda70f allocator: Improve docs for Address methods (#15697) (overlookmotel)

oxlint v1.29.0 & oxfmt v0.14.0

17 Nov 13:08
Immutable release. Only release title and notes can be modified.
ef4cc33

Choose a tag to compare

Table of Contents

Oxlint v1.29.0

🚀 Features

  • bce6154 linter/prefer-includes: Add rule (#15774) (camc314)
  • 5a66558 linter: Handle config docs for string/enum values and add config option docs for various rules. (#15759) (connorshea)
  • c199e38 linter: Implement config for all tsgolint rules supporting options (#15659) (camchenry)
  • 7598b3e linter: Allow configuring tsgolint rules (#15286) (camchenry)
  • e77f2ce vscode: Support oxlint --lsp (#15680) (Sysix)
  • e01c551 oxlint: Add --lsp flag to run the language server (#15611) (Sysix)
  • ac5c2ab lsp/fmt: Support ignore files & patterns (#15647) (Sysix)
  • e50a9bf linter: Add unicorn/prefer-response-static-json rule (#15692) (Mikhail Baev)
  • f5d9abb oxlint: Add enabled? column to --rules cli output (#15213) (Wren)
  • 6b5205c linter/plugins: Implement deprecated SourceCode#getJSDocComment method (#15653) (overlookmotel)
  • 5eccff1 linter/plugins: Implement deprecated SourceCode tokens methods (#15645) (overlookmotel)
  • 4c62ffa language_server: Add run_server helper for CLI tools (#15609) (Sysix)
  • 0d52a5e linter/plugins: Implement Context#parserOptions getter (#15632) (overlookmotel)
  • 287a538 linter/plugins: Implement Context#get* deprecated methods (#15606) (overlookmotel)
  • 84de1ca oxlint,oxfmt: Allow comments and also commas for vscode-json-ls (#15612) (leaysgur)
  • e763919 linter: Add test to enforce schema documentation for rules with configuration options (#15234) (Connor Shea)
  • 6cd0b5f linter/no-callback-in-promise: Add support for timeoutsErr option (#15507) (Li Wei)

🐛 Bug Fixes

  • 1decd57 linter/no-empty-named-blocks: Only search within node for comma token (#15751) (camc314)
  • 17c3d6d linter: Improve docs, diagnostic message, and implementation of typescript/consistent-indexed-object-style rule. (#15750) (connorshea)
  • 78a6df2 linter/no-empty-named-blocks: Skip comments when searching for token (#15735) (camc314)
  • 042befd linter/require-await: Skip comments when searching for token (#15734) (camc314)
  • 7a78220 linter/no-async-await: Skip comments when searching for token (#15733) (camc314)
  • 23b9ad1 linter/consistent-type-specifier-style: Skip comments when searching for token (#15732) (camc314)
  • 440a977 ast: Include rest properties when using get_binding_identifiers (#15710) (camc314)
  • 516d14e linter/no-namespace: Skip comments when searching for token (#15716) (camc314)
  • b5aaace linter/prefer-namespace-keyword: Skip comments when searching for token (#15715) (camc314)
  • 4eb9fa6 editor: Execute oxc.path.server in win32 with shell (#14203) (Sysix)
  • 9f991a4 linter: Reverse extends overrides priority (#14939) (Peter Wagenet)
  • 7c4a916 linter: Restores oxlint --rules -f=json functionality. (#15689) (Wren)
  • 24d00f4 linter/plugins: Add types for suggested fixes (#15636) (overlookmotel)
  • 257360f linter/plugins: Fill in TS type def for RuleMeta (#15629) (overlookmotel)
  • 81e179c linter: Allow file extensions without a dot in react/jsx-filename-extension rule (#15574) (Connor Shea)
  • 7a0e931 linter: Update the unicorn/prefer-add-event-listener rule with new JavaScript APIs (#15581) (connorshea)
  • bb5f8ca oxlint: Fix type annotation for big-endian (#15561) (Sysix)

⚡ Performance

  • e2a0997 linter/plugins: Recycle empty visitor object in ESLint compat mode (#15693) (overlookmotel)
  • 7528db4 language_server: Pass file content as a referenced String (#15568) (Sysix)
  • 54061e9 linter/plugins: Avoid implicit boolean coercion in initLines (#15641) (overlookmotel)
  • ccfd935 language_server: Avoid Mutex in ServerLinter (#15516) (Sysix)

📚 Documentation

  • 3ab750a linter: Clarify react-in-jsx-scope rule docs. (#15749) (connorshea)
  • a5feebc linter: oxlint-disable not eslint-disable (#15672) (overlookmotel)
  • 3d15805 linter: Reformat doc comments (#15670) (overlookmotel)
  • 16fcba6 linter: Remove "experimental" from description of stable features (#15669) (overlookmotel)
  • e62fd98 linter: Correct comment on what EnablePlugins does (#15668) (overlookmotel)
  • a25d31e linter: Fix grammar (#15666) (overlookmotel)
  • f5f452f linter: Add missing perf category (#15667) (overlookmotel)
  • 2c58952 linter: Add config docs for no-restricted-globals rule. (#15662) (connorshea)
  • a210b12 linter/plugins: Improve JSDoc comment for RuleOptionsSchema (#15642) (overlookmotel)
  • 3aabfac linter/plugins: Alter comments on FILE_CONTEXT used in ESLint-compat Context shim (#15605) (overlookmotel)
  • fd58aea linter: Fix a typo in the docs for react/no-is-mounted. (#15575) (Connor Shea)

Oxfmt v0.14.0

🚀 Features

  • 84de1ca oxlint,oxfmt: Allow comments and also commas for vscode-json-ls (#15612) (leaysgur)
  • 99823ad oxfmt: Print nothing for default(write) mode (#15583) (leaysgur)
  • 25a0163 formatter/sort_imports: Sort imports by Array<Array<string>> groups (#15578) (leaysgur)

🐛 Bug Fixes

  • bf20cf5 formatter: CRLF issue in the member chain (#15764) (Dunqing)
  • 5d688a0 formatter: Measuring multiline text in fits_text is incorrect (#15762) (Dunqing)
  • e306958 formatter: Regression case for test call (#15760) (Dunqing)
  • c42d983 formatter: Re-fix all cases that fail after AstNode::Argument was removed (#15676) (Dunqing)

⚡ Performance

  • d99a83f oxfmt: Use simdutf8 based read_to_string (#15614) (leaysgur)
  • 128e186 formatter/sort_imports: Precompute import metadata (#15580) (leaysgur)
  • cd31cc1 formatter/sort_imports: Use Vec::with_capacity for next_elements (#15579) (leaysgur)

📚 Documentation

oxlint v1.27.0 && oxfmt v0.12.0

10 Nov 12:04
b7d8d57

Choose a tag to compare

Oxlint v1.27.0

🚀 Features

  • 222a8f0 linter/plugins: Implement SourceCode#isSpaceBetween (#15498) (overlookmotel)
  • 2f9735d linter/plugins: Implement context.languageOptions (#15486) (overlookmotel)
  • bc731ff linter/plugins: Stub out all Context APIs (#15479) (overlookmotel)
  • 5822cb4 linter/plugins: Add extend method to FILE_CONTEXT (#15477) (overlookmotel)
  • 7b1e6f3 apps: Add pure rust binaries and release to github (#15469) (Boshen)
  • 2a89b43 linter: Introduce debug assertions after fixes to assert validity (#15389) (camc314)
  • ad3c45a editor: Add oxc.path.node option (#15040) (Sysix)

🐛 Bug Fixes

  • 6f3cd77 linter/no-var: Incorrect warning for blocks (#15504) (Hamir Mahal)
  • 6957fb9 linter/plugins: Do not allow access to Context#id in createOnce (#15489) (overlookmotel)
  • 7409630 linter/plugins: Allow access to cwd in createOnce in ESLint interop mode (#15488) (overlookmotel)
  • 732205e parser: Reject using / await using in a switch case / default clause (#15225) (sapphi-red)
  • a17ca32 linter/plugins: Replace Context class (#15448) (overlookmotel)
  • ecf2f7b language_server: Fail gracefully when tsgolint executable not found (#15436) (camc314)
  • 3c8d3a7 lang-server: Improve logging in failure case for tsgolint (#15299) (camc314)
  • ef71410 linter: Use jsx if source type is JS in fix debug assertion (#15434) (camc314)
  • e32bbf6 linter/no-var: Handle TypeScript declare keyword in fixer (#15426) (camc314)
  • 6565dbe linter/switch-case-braces: Skip comments when searching for : token (#15425) (camc314)
  • 85bd19a linter/prefer-class-fields: Insert value after type annotation in fixer (#15423) (camc314)
  • fde753e linter/plugins: Block access to context.settings in createOnce (#15394) (overlookmotel)
  • ddd9f9f linter/forward-ref-uses-ref: Dont suggest removing wrapper in invalid positions (#15388) (camc314)
  • dac2a9c linter/no-template-curly-in-string: Remove fixer (#15387) (camc314)
  • 989b8e3 linter/no-var: Only fix to const if the var has an initializer (#15385) (camc314)
  • cc403f5 linter/plugins: Return empty object for unimplemented parserServices (#15364) (magic-akari)

⚡ Performance

  • 25d577e language_server: Start tools in parallel (#15500) (Sysix)
  • 3c57291 linter/plugins: Optimize loops (#15449) (overlookmotel)
  • 3166233 linter/plugins: Remove Arcs (#15431) (overlookmotel)
  • 9de1322 linter/plugins: Lazily deserialize settings JSON (#15395) (overlookmotel)
  • 3049ec2 linter/plugins: Optimize deepFreezeSettings (#15392) (overlookmotel)
  • 444ebfd linter/plugins: Use single object for parserServices (#15378) (overlookmotel)

📚 Documentation

  • 97d2104 linter: Update comment in lint.rs about default value for tsconfig path (#15530) (Connor Shea)
  • 2c6bd9e linter: Always refer as "ES2015" instead of "ES6" (#15411) (sapphi-red)
  • a0c5203 linter/import/named: Update "ES7" comment in examples (#15410) (sapphi-red)
  • 3dc24b5 linter,minifier: Always refer as "ES Modules" instead of "ES6 Modules" (#15409) (sapphi-red)
  • 2ad77fb linter/no-this-before-super: Correct "Why is this bad?" section (#15408) (sapphi-red)
  • 57f0ce1 linter: Add backquotes where appropriate (#15407) (sapphi-red)

Oxfmt v0.12.0

🚀 Features

  • 3251000 oxfmt: Use prettier directly and bundle prettier (#15544) (Dunqing)
  • 7b1e6f3 apps: Add pure rust binaries and release to github (#15469) (Boshen)
  • 33ad374 oxfmt: Disable embedded formatting by default for alpha (#15402) (leaysgur)
  • 5708126 formatter/sort_imports: Add options.newlinesBetween (#15369) (leaysgur)
  • 2dfc3bd formatter: Remove Tag::StartVerbatim and Tag::EndVerbatim (#15370) (Dunqing)
  • 88c7530 formatter: Remove FormatElement::LocatedTokenText (#15367) (Dunqing)

🐛 Bug Fixes

  • d32d22e formatter: Correct FormatElement size check (#15461) (Dunqing)
  • b0f43f9 formatter: Test call difference (#15356) (Dunqing)
  • 01f20f3 formatter: Incorrect comment checking logic for grouping argument (#15354) (Dunqing)

⚡ Performance

  • f4b75b6 formatter: Pre-allocate enough space for the FormatElement buffer (#15422) (Dunqing)
  • 5a61189 formatter: Avoid unnecessary allocation for BinaryLikeExpression (#15467) (Dunqing)
  • 064f835 formatter: Optimize printing call arguments (#15464) (Dunqing)
  • 29f35b2 formatter: Reuse previous indent stack in FitsMeasurer (#15416) (Dunqing)
  • a6808a0 oxfmt: Use AllocatorPool to reuse allocator between threads (#15412) (leaysgur)
  • 2515045 formatter: Use CodeBuffer's built-in print_indent to print indentation (#15406) (Dunqing)
  • 681607b formatter: Check the Text to see whether it has multiple lines based on its width (#15405) (Dunqing)
  • b92deb4 formatter: Replace String buffer with byte-oriented CodeBuffer (#14752) (Boshen)
  • 963b87f formatter: Add text_without_whitespace for text that can never have whitespace (#15403) (Dunqing)
  • f30ce4b formatter: Optimize formatting literal string (#15380) (Dunqing)
  • 8f25a0e formatter: Memorize text width for FormatElement::Text (#15372) (Dunqing)
  • f913543 formatter: Avoid allocation for SyntaxTokenCowSlice (#15366) (Dunqing)
  • 98c9234 formatter: Optimize FormatElement::Token printing (#15365) (Dunqing)