Boshen
b92b2abc2b
feat(minifier): fold BigInt(1n) -> 1n ( #8270 )
2025-01-06 07:40:25 +00:00
renovate
676886fdab
chore(deps): update rust crates ( #8255 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [compact_str](https://redirect.github.com/ParkMyCar/compact_str ) | workspace.dependencies | patch | `0.8.0` -> `0.8.1` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust ) | workspace.dependencies | minor | `6.2.0` -> `6.3.0` |
| [insta](https://insta.rs/ ) ([source](https://redirect.github.com/mitsuhiko/insta )) | workspace.dependencies | minor | `1.41.1` -> `1.42.0` |
| [itertools](https://redirect.github.com/rust-itertools/itertools ) | workspace.dependencies | minor | `0.13.0` -> `0.14.0` |
| [petgraph](https://redirect.github.com/petgraph/petgraph ) | workspace.dependencies | minor | `0.6.5` -> `0.7.0` |
| [prettyplease](https://redirect.github.com/dtolnay/prettyplease ) | workspace.dependencies | patch | `0.2.25` -> `0.2.27` |
| [syn](https://redirect.github.com/dtolnay/syn ) | workspace.dependencies | patch | `2.0.93` -> `2.0.95` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/ ) ([source](https://redirect.github.com/Stebalien/tempfile )) | workspace.dependencies | minor | `3.14.0` -> `3.15.0` |
---
### Release Notes
<details>
<summary>ParkMyCar/compact_str (compact_str)</summary>
### [`v0.8.1`](https://redirect.github.com/ParkMyCar/compact_str/compare/v0.8.0...v0.8.1 )
[Compare Source](https://redirect.github.com/ParkMyCar/compact_str/compare/v0.8.0...v0.8.1 )
</details>
<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>
### [`v6.3.0`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#630---2025-01-05 )
[Compare Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.2.0...v6.3.0 )
- \[Added] Builders for some non-exhaustive structs \[[#​688](https://redirect.github.com/sunng87/handlebars-rust/issues/688 )]
- \[Changed] `and` and `or` helper now accepts multiple parameters \[[#​687](https://redirect.github.com/sunng87/handlebars-rust/issues/687 )]
- \[Changed] MSRV is now 1.73
</details>
<details>
<summary>mitsuhiko/insta (insta)</summary>
### [`v1.42.0`](https://redirect.github.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1420 )
[Compare Source](https://redirect.github.com/mitsuhiko/insta/compare/1.41.1...1.42.0 )
- Text snapshots no longer contain `snapshot_type: text` in their metadata. For
context, we originally added this in the prior release (1.41.0) to support
binary snapshots, but some folks disliked the diff noise on any snapshot
changes, and the maintainers' weighted votes favored reverting. I apologize
that this will cause some additional churn for those who used `cargo test --force-update-snapshots` to update their snapshots to the 1.41 format;
running this again with 1.42 will remove those metadata entries. To confirm:
this doesn't affect whether snapshot tests pass or fail — the worst impact is
some additional diffs in metadata. [#​690](https://redirect.github.com/mitsuhiko/insta/issues/690 )
- Pending snapshots are no longer removed throughout the workspace by
`cargo-insta` before running tests. Instead, running a test will overwrite or
remove its own pending snapshot. To remove all pending snapshots, use `cargo
insta reject` or run tests with `--unreferenced=delete`. [#​651](https://redirect.github.com/mitsuhiko/insta/issues/651 )
- `insta::internals::SettingsBindDropGuard` (returned from
`Settings::bind_to_scope`) no longer implements `Send`. This was incorrect and
any tests relying on this behavior where not working properly. Fixes [#​694](https://redirect.github.com/mitsuhiko/insta/issues/694 ) in
[#​695](https://redirect.github.com/mitsuhiko/insta/issues/695 ) by [@​jalil-salame](https://redirect.github.com/jalil-salame )
</details>
<details>
<summary>rust-itertools/itertools (itertools)</summary>
### [`v0.14.0`](https://redirect.github.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0140 )
[Compare Source](https://redirect.github.com/rust-itertools/itertools/compare/v0.13.0...v0.14.0 )
##### Breaking
- Increased MSRV to 1.63.0 ([#​960](https://redirect.github.com/rust-itertools/itertools/issues/960 ))
- Removed generic parameter from `cons_tuples` ([#​988](https://redirect.github.com/rust-itertools/itertools/issues/988 ))
##### Added
- Added `array_combinations` ([#​991](https://redirect.github.com/rust-itertools/itertools/issues/991 ))
- Added `k_smallest_relaxed` and variants ([#​925](https://redirect.github.com/rust-itertools/itertools/issues/925 ))
- Added `next_array` and `collect_array` ([#​560](https://redirect.github.com/rust-itertools/itertools/issues/560 ))
- Implemented `DoubleEndedIterator` for `FilterOk` ([#​948](https://redirect.github.com/rust-itertools/itertools/issues/948 ))
- Implemented `DoubleEndedIterator` for `FilterMapOk` ([#​950](https://redirect.github.com/rust-itertools/itertools/issues/950 ))
##### Changed
- Allow `Q: ?Sized` in `Itertools::contains` ([#​971](https://redirect.github.com/rust-itertools/itertools/issues/971 ))
- Improved hygiene of `chain!` ([#​943](https://redirect.github.com/rust-itertools/itertools/issues/943 ))
- Improved `into_group_map_by` documentation ([#​1000](https://redirect.github.com/rust-itertools/itertools/issues/1000 ))
- Improved `tree_reduce` documentation ([#​955](https://redirect.github.com/rust-itertools/itertools/issues/955 ))
- Improved discoverability of `merge_join_by` ([#​966](https://redirect.github.com/rust-itertools/itertools/issues/966 ))
- Improved discoverability of `take_while_inclusive` ([#​972](https://redirect.github.com/rust-itertools/itertools/issues/972 ))
- Improved documentation of `find_or_last` and `find_or_first` ([#​984](https://redirect.github.com/rust-itertools/itertools/issues/984 ))
- Prevented exponentially large type sizes in `tuple_combinations` ([#​945](https://redirect.github.com/rust-itertools/itertools/issues/945 ))
- Added `track_caller` attr for `asser_equal` ([#​976](https://redirect.github.com/rust-itertools/itertools/issues/976 ))
##### Notable Internal Changes
- Fixed clippy lints ([#​956](https://redirect.github.com/rust-itertools/itertools/issues/956 ), [#​987](https://redirect.github.com/rust-itertools/itertools/issues/987 ), [#​1008](https://redirect.github.com/rust-itertools/itertools/issues/1008 ))
- Addressed warnings within doctests ([#​964](https://redirect.github.com/rust-itertools/itertools/issues/964 ))
- CI: Run most tests with miri ([#​961](https://redirect.github.com/rust-itertools/itertools/issues/961 ))
- CI: Speed up "cargo-semver-checks" action ([#​938](https://redirect.github.com/rust-itertools/itertools/issues/938 ))
- Changed an instance of `default_features` in `Cargo.toml` to `default-features` ([#​985](https://redirect.github.com/rust-itertools/itertools/issues/985 ))
</details>
<details>
<summary>petgraph/petgraph (petgraph)</summary>
### [`v0.7.0`](https://redirect.github.com/petgraph/petgraph/blob/HEAD/RELEASES.rst#Version-070-2024-12-31 )
[Compare Source](https://redirect.github.com/petgraph/petgraph/compare/petgraph@v0.6.6...petgraph@v0.7.0 )
\==========================
- Re-released version 0.6.6 with the correct version number, as it included a major update to an exposed crate (`#664`\_).
### [`v0.6.6`](https://redirect.github.com/petgraph/petgraph/blob/HEAD/RELEASES.rst#Version-066-2024-12-31---yanked )
[Compare Source](https://redirect.github.com/petgraph/petgraph/compare/petgraph@v0.6.5...petgraph@v0.6.6 )
\===================================
- Add graph6 format encoder and decoder (`#658`\_)
- Dynamic Topological Sort algorithm support (`#675`\_)
- Add `UndirectedAdaptor` (`#695`\_)
- Add `LowerHex` and `UpperHex` implementations for `Dot` (`#687`\_)
- Make `serde` support more complete (`#550`\_)
- Process multiple edges in the Floyd-Warshall implementation (`#685`\_)
- Update `fixedbitset` to 0.5.7 (`#664`\_)
- Fix `immediately_dominated_by` function called on root of graph returns root itself (`#670`\_)
- Fix adjacency matrix for `Csr` and `List` (`#648`\_)
- Fix clippy warnings (`#701`\_)
- Add performance note to the `all_simple_paths` function documentation (`#693`\_)
.. \_`#658`: [https://github.com/petgraph/petgraph/pull/658 ](https://redirect.github.com/petgraph/petgraph/pull/658 )
.. \_`#675`: [https://github.com/petgraph/petgraph/pull/675 ](https://redirect.github.com/petgraph/petgraph/pull/675 )
.. \_`#695`: [https://github.com/petgraph/petgraph/pull/695 ](https://redirect.github.com/petgraph/petgraph/pull/695 )
.. \_`#687`: [https://github.com/petgraph/petgraph/pull/687 ](https://redirect.github.com/petgraph/petgraph/pull/687 )
.. \_`#550`: [https://github.com/petgraph/petgraph/pull/550 ](https://redirect.github.com/petgraph/petgraph/pull/550 )
.. \_`#685`: [https://github.com/petgraph/petgraph/pull/685 ](https://redirect.github.com/petgraph/petgraph/pull/685 )
.. \_`#664`: [https://github.com/petgraph/petgraph/pull/664 ](https://redirect.github.com/petgraph/petgraph/pull/664 )
.. \_`#670`: [https://github.com/petgraph/petgraph/pull/670 ](https://redirect.github.com/petgraph/petgraph/pull/670 )
.. \_`#648`: [https://github.com/petgraph/petgraph/pull/648 ](https://redirect.github.com/petgraph/petgraph/pull/648 )
.. \_`#701`: [https://github.com/petgraph/petgraph/pull/701 ](https://redirect.github.com/petgraph/petgraph/pull/701 )
.. \_`#693`: [https://github.com/petgraph/petgraph/pull/693 ](https://redirect.github.com/petgraph/petgraph/pull/693 )
</details>
<details>
<summary>dtolnay/prettyplease (prettyplease)</summary>
### [`v0.2.27`](https://redirect.github.com/dtolnay/prettyplease/releases/tag/0.2.27 )
[Compare Source](https://redirect.github.com/dtolnay/prettyplease/compare/0.2.26...0.2.27 )
- Avoid trailing '.' on non-macro float literals ([#​89](https://redirect.github.com/dtolnay/prettyplease/issues/89 ))
### [`v0.2.26`](https://redirect.github.com/dtolnay/prettyplease/releases/tag/0.2.26 )
[Compare Source](https://redirect.github.com/dtolnay/prettyplease/compare/0.2.25...0.2.26 )
- Synthesize parentheses for precedence ([#​88](https://redirect.github.com/dtolnay/prettyplease/issues/88 ))
</details>
<details>
<summary>dtolnay/syn (syn)</summary>
### [`v2.0.95`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.95 )
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.94...2.0.95 )
- Fix parenthesization of struct literals in let-chains ([#​1832](https://redirect.github.com/dtolnay/syn/issues/1832 ))
### [`v2.0.94`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.94 )
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.93...2.0.94 )
- Expression precedence fixes ([#​1811](https://redirect.github.com/dtolnay/syn/issues/1811 ), [#​1812](https://redirect.github.com/dtolnay/syn/issues/1812 ), [#​1813](https://redirect.github.com/dtolnay/syn/issues/1813 ), [#​1814](https://redirect.github.com/dtolnay/syn/issues/1814 ), [#​1815](https://redirect.github.com/dtolnay/syn/issues/1815 ), [#​1816](https://redirect.github.com/dtolnay/syn/issues/1816 ), [#​1818](https://redirect.github.com/dtolnay/syn/issues/1818 ), [#​1819](https://redirect.github.com/dtolnay/syn/issues/1819 ), [#​1820](https://redirect.github.com/dtolnay/syn/issues/1820 ), [#​1825](https://redirect.github.com/dtolnay/syn/issues/1825 ), [#​1826](https://redirect.github.com/dtolnay/syn/issues/1826 ), [#​1827](https://redirect.github.com/dtolnay/syn/issues/1827 ), [#​1828](https://redirect.github.com/dtolnay/syn/issues/1828 ), [#​1829](https://redirect.github.com/dtolnay/syn/issues/1829 ), [#​1830](https://redirect.github.com/dtolnay/syn/issues/1830 ))
</details>
<details>
<summary>Stebalien/tempfile (tempfile)</summary>
### [`v3.15.0`](https://redirect.github.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3150 )
[Compare Source](https://redirect.github.com/Stebalien/tempfile/compare/v3.14.0...v3.15.0 )
Re-seed the per-thread RNG from system randomness when we repeatedly fail to create temporary files ([#​314](https://redirect.github.com/Stebalien/tempfile/issues/314 )). This resolves a potential DoS vector ([#​178](https://redirect.github.com/Stebalien/tempfile/issues/178 )) while avoiding `getrandom` in the common case where it's necessary. The feature is optional but enabled by default via the `getrandom` feature.
For libc-free builds, you'll either need to disable this feature or opt-in to a different [`getrandom` backend](https://redirect.github.com/rust-random/getrandom?tab=readme-ov-file#opt-in-backends ).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 11am on monday" in timezone Asia/Shanghai, Automerge - "before 11am on monday" in timezone Asia/Shanghai.
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions ) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44NS4wIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2025-01-06 03:07:53 +00:00
camc314
a4df3874c5
feat(minifier): compress loose equals undefined ( #8268 )
2025-01-06 02:21:28 +00:00
camc314
f000596edf
feat(minifier): minify call expressionsto Number ( #8267 )
2025-01-06 02:21:28 +00:00
camc314
092aeafdc0
feat(minifier): flatten spread args in call expressions ( #8266 )
2025-01-06 02:21:27 +00:00
camc314
04ec38dc47
feat(minifier): remove unused arrow function expressions ( #8262 )
2025-01-06 02:21:26 +00:00
camc314
e446c15619
feat(minifier): improve minimizing unary not expressions ( #8261 )
2025-01-06 02:21:26 +00:00
camc314
62a2644e07
fix(minifier): handle arrow fn expressions correctly in is_in_boolean_context ( #8260 )
...
`var k = () => !!x` was incorrectly being minified to `var k = () => x`
2025-01-06 02:21:25 +00:00
camc314
7f19211736
feat(minifier): minimize unary expression statements ( #8256 )
...
`delete` cannot be minified as it may have side effect.
2025-01-06 02:21:24 +00:00
camc314
b6d16f4d80
fix(codegen): print parenthesis on negative bigint lit when neccessary ( #8258 )
...
closes #8257
i couldn't really write a test for this, as it only happens when codegen + minifier are used together.
Regression should be prevented by the 262 suite in #8256 (failed CI run before i implemented this fix: https://github.com/oxc-project/oxc/actions/runs/12621310419/job/35168016825 )
2025-01-06 02:21:24 +00:00
renovate[bot]
6a97e29c19
chore(deps): update crate-ci/typos action to v1.29.4 ( #8265 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [crate-ci/typos](https://redirect.github.com/crate-ci/typos ) | action
| minor | `v1.28.3` -> `v1.29.4` |
---
### Release Notes
<details>
<summary>crate-ci/typos (crate-ci/typos)</summary>
###
[`v1.29.4`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.4 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.3...v1.29.4 )
#### \[1.29.4] - 2025-01-03
###
[`v1.29.3`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.3 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.2...v1.29.3 )
#### \[1.29.3] - 2025-01-02
###
[`v1.29.2`](https://redirect.github.com/crate-ci/typos/compare/v1.29.1...v1.29.2 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.1...v1.29.2 )
###
[`v1.29.1`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.1 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.0...v1.29.1 )
#### \[1.29.1] - 2025-01-02
##### Fixes
- Don't correct `deriver`
###
[`v1.29.0`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.0 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.28.4...v1.29.0 )
#### \[1.29.0] - 2024-12-31
##### Features
- Updated the dictionary with the [December
2024](https://redirect.github.com/crate-ci/typos/issues/1156 ) changes
##### Performance
- Sped up dictionary lookups
###
[`v1.28.4`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.28.4 )
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.28.3...v1.28.4 )
#### \[1.28.4] - 2024-12-16
##### Features
- `--format sarif` support
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - "before 11am on monday" in timezone Asia/Shanghai.
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44NS4wIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2025-01-05 22:13:32 +00:00
Boshen
cec63e2119
feat(minifier): {} evals to f64::NaN
2025-01-05 23:09:57 +08:00
Boshen
4d8a08d2ac
feat(minifier): improve constant evaluation ( #8252 )
2025-01-05 12:41:57 +00:00
Boshen
e84f267a39
feat(minifier): compress more property keys ( #8253 )
2025-01-05 07:20:56 +00:00
camc314
d1224f95ce
feat(minifier): improve minimizing conditional expressions ( #8251 )
2025-01-05 04:14:02 +00:00
camc314
91b42defb5
test(minifier): enable some passing tests ( #8250 )
2025-01-05 04:14:01 +00:00
camc314
3c534aeb5a
refactor(linter): refactor LintBuilder to prep for nested configs ( #8034 )
...
More simplification/preparations for nested configurations:
1. renames `LinterBuilder` to `ConfigStoreBuilder`
2. moves the `options` logic out of `LintBuilder`
3. make `ConfigStoreBuilder::build()` return a result (currently always returns OK, but it will return errors when nested config is implemented
The next steps to implement nested config which i hope to do in the next week are:
1. refactor the `from_oxlintrc` to accept a file path
2. introduce a new method on `ConfigStoreBuilder` (name TBC) that walks all child directories, collecting `.oxlintrc` files. these will be put into `ConfigStore` as a hash map of path > config.
2025-01-05 04:08:26 +00:00
Boshen
65f46f5409
feat(minifier): constant fold String.fromCharCode ( #8248 )
2025-01-04 23:22:32 +08:00
Boshen
0845162372
refactor(minifier): clean up ReplaceKnownMethods
2025-01-04 21:57:20 +08:00
Boshen
bd8d677352
feat(minifier): minimize ~undefined, ~null, ~true, ~false ( #8247 )
2025-01-04 13:34:53 +00:00
Boshen
f73dc9ea9b
feat(minifier): constant fold 'x'.toString() and true.toString() ( #8246 )
2025-01-04 21:28:26 +08:00
Boshen
fd5af73a22
feat(minifier): minimize Number constructor ( #8245 )
2025-01-04 09:56:03 +00:00
Boshen
2f52f333fa
feat(minifier): minsize !!!foo ? bar : baz -> foo ? baz : bar ( #8244 )
2025-01-04 09:10:22 +00:00
Boshen
7c7f5d7af9
refactor(minifier): clean up peephole_fold_constants
2025-01-04 16:57:08 +08:00
Boshen
ce2b5a994b
chore(minifier): disable RemoveUnusedCode ( #8243 )
...
A lot of edge cases fail in test262 and monitor-oxc.
2025-01-04 08:49:20 +00:00
Boshen
d2f8eaa842
fix(minifier): fix panic in peephole_minimize_conditions ( #8242 )
...
https://github.com/oxc-project/monitor-oxc caught some crashes.
Make things safer by returning falling back to true.
2025-01-04 07:56:21 +00:00
Boshen
ad9a0a9c4a
feat(mininifier): minimize variants of a instanceof b == true ( #8241 )
2025-01-04 06:04:52 +00:00
Boshen
ccdc039f54
feat(minifier): always put literals on the rhs of equal op 1==x => x==1 ( #8240 )
2025-01-04 04:07:54 +00:00
Boshen
bf0fbcea6e
refactor(minifier): improve constant fold numbers ( #8239 )
...
Ported esbuild's implementation
2025-01-04 03:30:20 +00:00
Cameron
39353b22e9
feat(minifier): improve minimizing conditionals ( #8238 )
2025-01-04 08:36:54 +08:00
camc314
c90fc16bba
feat(minifier): restore conditional minification and fix edge case ( #8235 )
...
This restore's the changes made in #8233 , but fixing the edge cases.
If the conditional expression is not a child of an `IfStatementTest`, `WhileStatementTest`, `DoWhileStatementText` or `ExpressionStatementExpression`, we must coerce the test to a boolean.
2025-01-03 14:20:42 +00:00
Boshen
6c8ee9fdef
feat(minifier): remove last redundant return statement ( #8234 )
2025-01-03 12:24:57 +00:00
Boshen
a698deff51
fix(minifier): fix incorrect return value for (x ? true : y) ( #8233 )
...
Need to check if the return value is used or not:
```
function foo() {
return foo ? true : bar; // no transformed
}
foo ? true : bar; // transformed to `foo || bar;`
```
2025-01-03 11:58:28 +00:00
Boshen
e00e3804b9
chore(napi/parser): publish oxc_parser_napi
2025-01-03 19:43:54 +08:00
camc314
62f8fba98c
refactor(minifier): move all conditional minification logic to minimze_conditions ( #8231 )
...
@Boshen feel free to close this one if you want. 🙂
https://github.com/oxc-project/oxc/pull/8229 compresses some conditionals
this PR moves compression of all conditionals into the same place
2025-01-03 11:20:56 +00:00
Boshen
51f47926ef
feat(minifier): minimize foo ? foo : bar and foo ? bar : foo ( #8229 )
2025-01-03 10:55:59 +00:00
Boshen
0e14bd8cab
chore(napi/parser): publish oxc_parser_napi
...
closes #8118
2025-01-03 18:13:12 +08:00
Boshen
6e2ec17d51
feat(minifier): statement fusion switch cases; improved minimize exit poitns ( #8228 )
2025-01-03 10:07:04 +00:00
Boshen
574a2428fd
feat(minifier): minimize all variants of typeof x == 'undefined' ( #8227 )
2025-01-03 07:05:55 +00:00
Boshen
2041477f51
feat(minifier): fold if(x)return;y -> if(!x)y ( #8226 )
2025-01-03 05:24:53 +00:00
Alexander S.
2f9fab9172
refactor(linter): remove remapping for plugin name in diagnostics ( #8223 )
...
came across this code.
I do not think this is practicable in the real world. Many projects areo
migrating from jest to vitest and are currently installing both,
So we can't really tell what plugin name should be outputted.
The same is for typescript <-> eslint and our newest candidate:
2da4365fbe/crates/oxc_linter/src/config/rules.rs (L163-L165)
2025-01-03 11:40:26 +08:00
Alexander S.
37d31ecef9
fix(tasks/lint_rules): sync unicorn rules with eslint rules ( #8224 )
...
👀 promise/spec-only is implemented but not found in their rules
👀 unicorn/consistent-existence-index-check is implemented but not found
in their rules
👀 unicorn/prefer-math-min-max is implemented but not found in their
rules
> [!WARNING]
> This comment is maintained by CI. Do not edit this comment directly.
> To update comment template, see
https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules
This is tracking issue for `eslint-plugin-unicorn`.
There are 120(+ 17 deprecated) rules.
- 24/113 recommended rules are remaining as TODO
- 7/7 not recommended rules are remaining as TODO
To get started, run the following command:
```sh
just new-unicorn-rule <RULE_NAME>
```
Then register the rule in `crates/oxc_linter/src/rules.rs` and also
`declare_all_lint_rules` at the bottom.
## Recommended rules
<details open>
<summary>
✨ : 89, 🚫 : 0 / total: 113
</summary>
| Status | Name | Docs |
| :----: | :--- | :--- |
| | unicorn/better-regex |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/better-regex.md
|
| ✨ | unicorn/catch-error-name |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/catch-error-name.md
|
| ✨ | unicorn/consistent-empty-array-spread |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-empty-array-spread.md
|
| ✨ | unicorn/consistent-function-scoping |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-function-scoping.md
|
| ✨ | unicorn/empty-brace-spaces |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/empty-brace-spaces.md
|
| ✨ | unicorn/error-message |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/error-message.md
|
| ✨ | unicorn/escape-case |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/escape-case.md
|
| | unicorn/expiring-todo-comments |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/expiring-todo-comments.md
|
| ✨ | unicorn/explicit-length-check |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/explicit-length-check.md
|
| ✨ | unicorn/filename-case |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/filename-case.md
|
| | unicorn/import-style |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/import-style.md
|
| ✨ | unicorn/new-for-builtins |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/new-for-builtins.md
|
| ✨ | unicorn/no-abusive-eslint-disable |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-abusive-eslint-disable.md
|
| ✨ | unicorn/no-anonymous-default-export |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-anonymous-default-export.md
|
| | unicorn/no-array-callback-reference |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-callback-reference.md
|
| ✨ | unicorn/no-array-for-each |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-for-each.md
|
| | unicorn/no-array-method-this-argument |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-method-this-argument.md
|
| | unicorn/no-array-push-push |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-push-push.md
|
| ✨ | unicorn/no-array-reduce |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-array-reduce.md
|
| ✨ | unicorn/no-await-expression-member |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-await-expression-member.md
|
| ✨ | unicorn/no-await-in-promise-methods |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-await-in-promise-methods.md
|
| ✨ | unicorn/no-console-spaces |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-console-spaces.md
|
| ✨ | unicorn/no-document-cookie |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-document-cookie.md
|
| ✨ | unicorn/no-empty-file |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-empty-file.md
|
| | unicorn/no-for-loop |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-for-loop.md
|
| ✨ | unicorn/no-hex-escape |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-hex-escape.md
|
| ✨ | unicorn/no-instanceof-array |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-instanceof-array.md
|
| | unicorn/no-invalid-fetch-options |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-invalid-fetch-options.md
|
| ✨ | unicorn/no-invalid-remove-event-listener |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-invalid-remove-event-listener.md
|
| ✨ | unicorn/no-length-as-slice-end |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-length-as-slice-end.md
|
| ✨ | unicorn/no-lonely-if |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-lonely-if.md
|
| ✨ | unicorn/no-magic-array-flat-depth |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-magic-array-flat-depth.md
|
| ✨ | unicorn/no-negated-condition |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-negated-condition.md
|
| ✨ | unicorn/no-negation-in-equality-check |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-negation-in-equality-check.md
|
| ✨ | unicorn/no-nested-ternary |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-nested-ternary.md
|
| ✨ | unicorn/no-new-array |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-new-array.md
|
| ✨ | unicorn/no-new-buffer |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-new-buffer.md
|
| ✨ | unicorn/no-null |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-null.md
|
| ✨ | unicorn/no-object-as-default-parameter |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-object-as-default-parameter.md
|
| ✨ | unicorn/no-process-exit |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-process-exit.md
|
| ✨ | unicorn/no-single-promise-in-promise-methods |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
| ✨ | unicorn/no-static-only-class |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-static-only-class.md
|
| ✨ | unicorn/no-thenable |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-thenable.md
|
| ✨ | unicorn/no-this-assignment |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-this-assignment.md
|
| ✨ | unicorn/no-typeof-undefined |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-typeof-undefined.md
|
| ✨ | unicorn/no-unnecessary-await |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unnecessary-await.md
|
| | unicorn/no-unnecessary-polyfills |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unnecessary-polyfills.md
|
| ✨ | unicorn/no-unreadable-array-destructuring |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unreadable-array-destructuring.md
|
| ✨ | unicorn/no-unreadable-iife |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unreadable-iife.md
|
| ✨ | unicorn/no-useless-fallback-in-spread |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-fallback-in-spread.md
|
| ✨ | unicorn/no-useless-length-check |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-length-check.md
|
| ✨ | unicorn/no-useless-promise-resolve-reject |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
| ✨ | unicorn/no-useless-spread |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-spread.md
|
| ✨ | unicorn/no-useless-switch-case |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-switch-case.md
|
| ✨ | unicorn/no-useless-undefined |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-useless-undefined.md
|
| ✨ | unicorn/no-zero-fractions |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-zero-fractions.md
|
| ✨ | unicorn/number-literal-case |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/number-literal-case.md
|
| ✨ | unicorn/numeric-separators-style |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/numeric-separators-style.md
|
| ✨ | unicorn/prefer-add-event-listener |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-add-event-listener.md
|
| | unicorn/prefer-array-find |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-find.md
|
| ✨ | unicorn/prefer-array-flat-map |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-flat-map.md
|
| ✨ | unicorn/prefer-array-flat |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-flat.md
|
| | unicorn/prefer-array-index-of |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-index-of.md
|
| ✨ | unicorn/prefer-array-some |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-array-some.md
|
| | unicorn/prefer-at |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-at.md
|
| ✨ | unicorn/prefer-blob-reading-methods |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-blob-reading-methods.md
|
| ✨ | unicorn/prefer-code-point |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-code-point.md
|
| ✨ | unicorn/prefer-date-now |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-date-now.md
|
| | unicorn/prefer-default-parameters |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-default-parameters.md
|
| ✨ | unicorn/prefer-dom-node-append |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-append.md
|
| ✨ | unicorn/prefer-dom-node-dataset |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-dataset.md
|
| ✨ | unicorn/prefer-dom-node-remove |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-remove.md
|
| ✨ | unicorn/prefer-dom-node-text-content |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-dom-node-text-content.md
|
| ✨ | unicorn/prefer-event-target |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-event-target.md
|
| | unicorn/prefer-export-from |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-export-from.md
|
| ✨ | unicorn/prefer-includes |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-includes.md
|
| | unicorn/prefer-keyboard-event-key |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-keyboard-event-key.md
|
| ✨ | unicorn/prefer-logical-operator-over-ternary |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
| ✨ | unicorn/prefer-math-trunc |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-math-trunc.md
|
| ✨ | unicorn/prefer-modern-dom-apis |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-modern-dom-apis.md
|
| ✨ | unicorn/prefer-modern-math-apis |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-modern-math-apis.md
|
| | unicorn/prefer-module |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-module.md
|
| ✨ | unicorn/prefer-native-coercion-functions |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-native-coercion-functions.md
|
| ✨ | unicorn/prefer-negative-index |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-negative-index.md
|
| ✨ | unicorn/prefer-node-protocol |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-node-protocol.md
|
| ✨ | unicorn/prefer-number-properties |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-number-properties.md
|
| | unicorn/prefer-object-from-entries |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-object-from-entries.md
|
| ✨ | unicorn/prefer-optional-catch-binding |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-optional-catch-binding.md
|
| ✨ | unicorn/prefer-prototype-methods |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-prototype-methods.md
|
| ✨ | unicorn/prefer-query-selector |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-query-selector.md
|
| ✨ | unicorn/prefer-reflect-apply |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-reflect-apply.md
|
| ✨ | unicorn/prefer-regexp-test |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-regexp-test.md
|
| ✨ | unicorn/prefer-set-has |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-set-has.md
|
| ✨ | unicorn/prefer-set-size |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-set-size.md
|
| | unicorn/prefer-spread |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-spread.md
|
| ✨ | unicorn/prefer-string-raw |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-raw.md
|
| ✨ | unicorn/prefer-string-replace-all |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-replace-all.md
|
| ✨ | unicorn/prefer-string-slice |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-slice.md
|
| ✨ | unicorn/prefer-string-starts-ends-with |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-starts-ends-with.md
|
| ✨ | unicorn/prefer-string-trim-start-end |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-string-trim-start-end.md
|
| ✨ | unicorn/prefer-structured-clone |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-structured-clone.md
|
| | unicorn/prefer-switch |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-switch.md
|
| | unicorn/prefer-ternary |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-ternary.md
|
| | unicorn/prefer-top-level-await |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-top-level-await.md
|
| ✨ | unicorn/prefer-type-error |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-type-error.md
|
| | unicorn/prevent-abbreviations |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prevent-abbreviations.md
|
| | unicorn/relative-url-style |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/relative-url-style.md
|
| ✨ | unicorn/require-array-join-separator |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-array-join-separator.md
|
| ✨ | unicorn/require-number-to-fixed-digits-argument |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
| ✨ | unicorn/switch-case-braces |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/switch-case-braces.md
|
| | unicorn/template-indent |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/template-indent.md
|
| ✨ | unicorn/text-encoding-identifier-case |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/text-encoding-identifier-case.md
|
| ✨ | unicorn/throw-new-error |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/throw-new-error.md
|
✨ = Implemented, 🚫 = No need to implement
</details>
## Not recommended rules
<details open>
<summary>
✨ : 0, 🚫 : 0 / total: 7
</summary>
| Status | Name | Docs |
| :----: | :--- | :--- |
| | unicorn/consistent-destructuring |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/consistent-destructuring.md
|
| | unicorn/custom-error-definition |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/custom-error-definition.md
|
| | unicorn/no-keyword-prefix |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-keyword-prefix.md
|
| | unicorn/no-unused-properties |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-unused-properties.md
|
| | unicorn/prefer-json-parse-buffer |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/prefer-json-parse-buffer.md
|
| | unicorn/require-post-message-target-origin |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/require-post-message-target-origin.md
|
| | unicorn/string-content |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/string-content.md
|
✨ = Implemented, 🚫 = No need to implement
</details>
## Deprecated rules
<details >
<summary>
✨ : 0, 🚫 : 0 / total: 17
</summary>
| Status | Name | Docs |
| :----: | :--- | :--- |
| | unicorn/import-index |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#import-index
|
| | unicorn/no-array-instanceof |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-array-instanceof
|
| | unicorn/no-fn-reference-in-iterator |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
| | unicorn/no-reduce |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-reduce
|
| | unicorn/no-unsafe-regex |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
| | unicorn/prefer-dataset |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-dataset
|
| | unicorn/prefer-event-key |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-event-key
|
| | unicorn/prefer-exponentiation-operator |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
| | unicorn/prefer-flat-map |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-flat-map
|
| | unicorn/prefer-node-append |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-node-append
|
| | unicorn/prefer-node-remove |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-node-remove
|
| | unicorn/prefer-object-has-own |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
| | unicorn/prefer-replace-all |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-replace-all
|
| | unicorn/prefer-starts-ends-with |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
| | unicorn/prefer-text-content |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-text-content
|
| | unicorn/prefer-trim-start-end |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
| | unicorn/regex-shorthand |
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/deprecated-rules.md#regex-shorthand
|
✨ = Implemented, 🚫 = No need to implement
</details>
2025-01-03 11:39:51 +08:00
Boshen
2da4365fbe
feat(parser): missing initializer in destructuring declaration inside for loop head ( #8222 )
...
closes #8220
2025-01-02 14:02:49 +00:00
Boshen
9c1afa4729
feat(minifier): optional catch binding when catch param is unused ( #8221 )
2025-01-02 13:20:49 +00:00
Boshen
4a29845d82
feat(minifier): add ConvertToDottedProperties ( #8212 )
2025-01-02 13:02:22 +00:00
Boshen
2786dea164
feat(minifier): add RemoveUnusedCode ( #8210 )
2025-01-02 12:50:21 +00:00
oxc-bot
d2d90b077b
release(oxlint): v0.15.5 ( #8218 )
...
## [0.15.5] - 2025-01-02
### Features
- 0e168b8 linter: Catch more cases in const-comparisons (#8215 )
(Cameron)
- bde44a3 linter: Add `statement_span` to `ModuleRecord/ImportEntry`
(#8195 ) (Alexander S.)
- ccaa9f7 linter: Implement `eslint/new-cap` (#8146 ) (Alexander S.)
### Bug Fixes
- 2b14a6f linter: Fix `ignorePattern` config for windows (#8214 )
(Alexander S.)
### Testing
- cb709c9 linter: Fix some oxlint tests on windows (#8204 ) (Cameron)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2025-01-02 18:55:31 +08:00
Alexander S.
2b14a6fb54
fix(linter): fix ignorePattern config for windows ( #8214 )
...
Changes:
- Config `ignorePatterns` not as `Path`, because the create `ignore`
does only handle `/` and not Win-style `\`
- Passed full path to the config and do not use `canonicalize` because
it prefix the paths with `\\?\`,
read more here: https://stackoverflow.com/a/41233992/7387397
- Updated and enabled tests for windows, some are still failing
closes #8188
---------
Co-authored-by: Alexander Schlegel <alexander.schlegel@clicksports.de>
2025-01-02 18:34:02 +08:00
Cameron
0e168b8c19
feat(linter): catch more cases in const-comparisons ( #8215 )
2025-01-02 18:32:47 +08:00
Cameron
cd274eeb02
feat(minifier): minimize logical exprs ( #8209 )
2025-01-02 18:32:20 +08:00