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
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
cb709c9d83
test(linter): fix some oxlint tests on windows ( #8204 )
2025-01-01 10:22:10 +08:00
oxc-bot
936623ea45
release(oxlint): v0.15.4 ( #8190 )
...
## [0.15.4] - 2024-12-30
### Features
- 47cea9a linter: Implement `eslint/no-extra-label` (#8181 ) (Anson
Heung)
- ef76e28 linter: Implement `eslint/no-multi-assign` (#8158 ) (Anson
Heung)
- 384858b linter: Implement `jsx-a11y/no-noninteractive-tabindex`
(#8167 ) (Tyler Earls)
- afc21a6 linter: Implement `eslint/vars-on-top` (#8157 ) (Yuichiro
Yamashita)
- 65796c4 linter: Implement `eslint/prefer-rest-params` (#8155 )
(Yuichiro Yamashita)
- 5234d96 linter: Implement `eslint/no-nested-ternary` (#8150 ) (Yuichiro
Yamashita)
- 1c5db72 linter: Implement eslint/no-labels (#8131 ) (Anson Heung)
- 0b04288 linter: Move `import/named` to nursery (#8068 ) (Boshen)
### Bug Fixes
- 0794bee editor/vscode: Set minimum supported ver. to `^1.93.0` (#8182 )
(Pavel Smirnov)
- f3050d4 linter: Exclude svelte files from `no_unused_vars` rule
(#8170 ) (Yuichiro Yamashita)
- faf7464 linter: Disable rule `react/rules-of-hook` by file extension
(#8168 ) (Alexander S.)
- 1171e00 linter: Disable `react/rules-of-hooks` for vue and svelte
files (#8165 ) (Alexander S.)
- 1b9a5ba linter: False positiver in private member expr in
oxc/const-comparison (#8164 ) (camc314)
- 6bd9ddb linter: False positive in `typescript/ban-tslint-comment`
(#8094 ) (dalaoshu)
- 10a1fd5 linter: Rule: `no-restricted-imports` support option
`patterns` with `group` key (#8050 ) (Alexander S.)
- b3f38ae linter: Rule `no-restricted-imports`: support option
`allowImportNames` (#8002 ) (Alexander S.)
- 340cc90 linter: Rule `no-restricted-imports`: fix option "importNames"
(#7943 ) (Alexander S.)
- ec2128e linter: Fix line calculation for `eslint/max-lines` in
diagnostics (#7962 ) (Dmitry Zakharov)
- 79af100 semantic: Reference flags not correctly resolved when after an
export stmt (#8134 ) (camc314)
### Performance
- d8d2ec6 linter: Run rules which require typescript syntax only when
source type is actually typescript (#8166 ) (Alexander S.)
- 2736657 semantic: Allocate `UnresolvedReferences` in allocator (#8046 )
(Boshen)
### Refactor
- de8246b language_server: Move structs into own file (#8026 ) (Alexander
S.)
- 774babb linter: Read `exported_bindings_from_star_export` lazily
(#8062 ) (Boshen)
- 547c102 linter: Use `RwLock<FxHashMap>` instead of `FxDashMap` for
module record data (#8061 ) (Boshen)
- 952d7e4 linter: Rename `flat.rs` to `config.rs` (#8033 ) (camc314)
- 50848ed linter: Simplify `ConfigStore` to prep for nested configs
(#8032 ) (camc314)
- b2a4a78 linter: Remove unused `with_rules` and `set_rule` methods
(#8029 ) (camc314)
- 6da0b21 oxlint: Remove unused `git.rs` (#7990 ) (Boshen)
- 58e7777 oxlint: Remove extra if check in `Walkdir` (#7989 ) (Boshen)
- 02f968d semantic: Change `Bindings` to a plain `FxHashMap` (#8019 )
(Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-30 15:47:06 +08:00
Yuichiro Yamashita
f3050d4f31
fix(linter): exclude svelte files from no_unused_vars rule ( #8170 )
2024-12-29 17:10:33 +00:00
Boshen
6da0b219dd
refactor(oxlint): remove unused git.rs ( #7990 )
2024-12-18 08:41:50 +00:00
Boshen
58e7777814
refactor(oxlint): remove extra if check in Walkdir ( #7989 )
2024-12-18 08:37:20 +00:00
oxc-bot
fc5380442b
release(oxlint): v0.15.3 ( #7954 )
...
## [0.15.3] - 2024-12-17
### Features
- 25ddb35 linter: Add the import/no_named_default rule (#7902 )
(Guillaume Piedigrossi)
- ee26b44 linter: Enhance `get_element_type` to resolve more element
types (#7885 ) (dalaoshu)
### Bug Fixes
- 6f41d92 linter: False positive in `unicorn/no-useless-spread` (#7940 )
(dalaoshu)
- 0867b40 linter: Fix configuration parser for `no-restricted-imports`
(#7921 ) (Alexander S.)
- 9c9b73d linter: Fix incorrect fixer for `prefer-regexp-test` (#7898 )
(Cameron)
- 32935e6 linter: False positive in
`jsx-a11y/label-has-associated-control` (#7881 ) (dalaoshu)
- 14c51ff semantic: Remove inherting `ScopeFlags::Modifier` from parent
scope (#7932 ) (Dunqing)
### Refactor
- 3858221 global: Sort imports (#7883 ) (overlookmotel)
- b99ee37 linter: Move rule "no-restricted-imports" to nursery (#7897 )
(Alexander S.)
- ff2a68f linter/yoda: Simplify code (#7941 ) (overlookmotel)
### Styling
- 7fb9d47 rust: `cargo +nightly fmt` (#7877 ) (Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-17 12:24:09 +08:00
Boshen
7fb9d47460
style(rust): cargo +nightly fmt ( #7877 )
2024-12-14 06:03:31 +00:00
oxc-bot
b40c410824
release(oxlint): v0.15.2 ( #7876 )
...
## [0.15.2] - 2024-12-14
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-14 13:37:03 +08:00
oxc-bot
bb4a92c80c
release(oxlint): v0.15.1 ( #7845 )
...
## [0.15.1] - 2024-12-13
### Features
- 38b1c2e editor: Create a command to apply all auto-fixes for the
current active text editor (#7672 ) (Nicholas Rayburn)
### Bug Fixes
- 2b187e5 linter: Fix configuration casing for
`typescript/no_this_alias` (#7836 ) (Boshen)
- 06e6d38 linter: Fix unicorn/prefer-query-selector to use the correct
replacement for getElementsByClassName (#7796 ) (Nicholas Rayburn)
- 7a83230 semantic: Missing reference when `export default` references a
type alias binding (#7813 ) (Dunqing)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-13 21:23:33 +08:00
oxc-bot
bde753b4ee
release(oxlint): v0.15.0 ( #7782 )
...
## [0.15.0] - 2024-12-10
- 39b9c5d linter: [**BREAKING**] Remove unmaintained security plugin
(#7773 ) (Boshen)
### Features
- 065f7dc linter: Support `expectTypeOf`, `assert` and `assertType` in
`vitest/expect-expect` (#7742 ) (Yuichiro Yamashita)
- 3d5f0a1 linter/no_restricted_imports: Add the no_restricted_imports
rules (#7629 ) (Guillaume Piedigrossi)
### Bug Fixes
- ad27b20 linter: Only resolve esm files for import plugin (#7720 )
(Boshen)
- 5e6053f linter: False positive in `eslint/yoda` (#7719 ) (dalaoshu)
### Refactor
- c6a19aa linter: Remove unused `serde` features (#7738 ) (Boshen)
- b9a2b35 linter: Remove `aho-corasick` (#7718 ) (Boshen)
### Testing
- 62f0a22 linter: Port `react-jsx-uses-vars` rules to no_unused_vars
(#7731 ) (Tyler Earls)
- 02f9903 linter: Add regression tests for `import/namespace` (#7723 )
(dalaoshu)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-11 00:58:03 +08:00
Boshen
39b9c5d01b
feat(linter)!: remove unmaintained security plugin ( #7773 )
2024-12-10 14:29:22 +00:00
oxc-bot
5f4f6d140b
release(oxlint): v0.14.1 ( #7692 )
2024-12-06 13:06:54 +08:00
Alexander S.
29db060c78
fix(linter): detect typescript eslint alias rules ( #7622 )
...
closes #7233
2024-12-04 10:16:00 +08:00
Alexander S.
810671a4a0
fix(linter): detect vitest jest alias rules ( #7567 )
...
closes #7240
2024-12-03 09:46:05 +08:00
camc314
275d6256bb
feat(linter): output rules to json array ( #7574 )
...
closes #7517
cc @Sysix
2024-12-02 03:17:57 +00:00
dalaoshu
9761e94176
fix(apps/oxlint): incorrect matching in .oxlintignore ( #7566 )
...
The issue was discovered while updating test cases in `rolldown`.
In the `.oxlintignore` file, we have:
```ignore
tests/**
```
When running the command by `lint-staged`:
```bash
oxlint -c .oxlintrc.json --ignore-path=.oxlintignore --deny-warnings "tests/function/main.js"
```
The file `main.js` gets linted despite being ignored. This happens
because, before using `Gitignore::new`, we converted paths to absolute
paths, causing the pattern `tests/**` to not match
`D:/rolldown/tests/function/main.js` correctly.
c61a383e8c/apps/oxlint/src/lint.rs (L60-L78)
2024-12-02 11:06:20 +08:00
oxc-bot
c61a383e8c
release(oxlint): v0.14.0 ( #7563 )
...
## [0.14.0] - 2024-12-01
### Features
- 32f860d linter: Add support for ignorePatterns property within config
file (#7092 ) (Nicholas Rayburn)
- 053bc08 linter: Implement typescript/no-unused-expressions (#7498 )
(camc314)
- 60b28fc linter: Implement typescript/consistent-generic-constructors
(#7497 ) (camc314)
- bd0693b linter: Allow lint rules with the same name (#7496 ) (camc314)
- 2ac9f96 linter: Typescript/no-inferrable-types (#7438 ) (camc314)
- 8d89fdc linter: Add eslint/prefer-spread (#7112 ) (tbashiyy)
### Bug Fixes
- 123b5b7 linter: False positive in
`typescript/consistent-type-definitions` (#7560 ) (dalaoshu)
- cc078d6 linter: Add missing error message prefix to
`eslint/no-const-assign` (Boshen)
- 17c0dd8 linter: Fix `jsx_no_script_url` doc failed to build (Boshen)
### Performance
- 6cc7a48 linter: Use `OsString` for module cache hash (#7558 ) (Boshen)
- 6655345 linter: Use `FxDashMap` for module cache (#7522 )
(overlookmotel)
### Documentation
- a6b0100 linter: Fix config example headings (#7562 ) (Boshen)
### Refactor
- 0f3f67a linter: Add capability of adding semantic data to module
record (#7561 ) (Boshen)
- 8392177 linter: Clean up the runtime after the module record change
(#7557 ) (Boshen)
- 823353a linter: Clean up APIs for `ModuleRecord` (#7556 ) (Boshen)
- f847d0f linter: Call `str::ends_with` with array not slice (#7526 )
(overlookmotel)
- 2077ff9 linter: Remove `once_cell` (#7510 ) (Boshen)
- 169b8bf linter, syntax: Introduce type alias `FxDashMap` (#7520 )
(overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-01 16:47:21 +08:00
renovate
d0842e070a
chore(deps): update dependency rust to v1.83.0 ( #7537 )
...
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [rust](https://redirect.github.com/rust-lang/rust ) | minor | `1.82.0` -> `1.83.0` |
---
### Release Notes
<details>
<summary>rust-lang/rust (rust)</summary>
### [`v1.83.0`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1830-2024-11-28 )
[Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.82.0...1.83.0 )
\==========================
<a id="1.83.0-Language"></a>
## Language
- [Stabilize `&mut`, `*mut`, `&Cell`, and `*const Cell` in const.](https://redirect.github.com/rust-lang/rust/pull/129195 )
- [Allow creating references to statics in `const` initializers.](https://redirect.github.com/rust-lang/rust/pull/129759 )
- [Implement raw lifetimes and labels (`'r#ident`).](https://redirect.github.com/rust-lang/rust/pull/126452 )
- [Define behavior when atomic and non-atomic reads race.](https://redirect.github.com/rust-lang/rust/pull/128778 )
- [Non-exhaustive structs may now be empty.](https://redirect.github.com/rust-lang/rust/pull/128934 )
- [Disallow implicit coercions from places of type `!`](https://redirect.github.com/rust-lang/rust/pull/129392 )
- [`const extern` functions can now be defined for other calling conventions.](https://redirect.github.com/rust-lang/rust/pull/129753 )
- [Stabilize `expr_2021` macro fragment specifier in all editions.](https://redirect.github.com/rust-lang/rust/pull/129972 )
- [The `non_local_definitions` lint now fires on less code and warns by default.](https://redirect.github.com/rust-lang/rust/pull/127117 )
<a id="1.83.0-Compiler"></a>
## Compiler
- [Deprecate unsound `-Csoft-float` flag.](https://redirect.github.com/rust-lang/rust/pull/129897 )
- Add many new tier 3 targets:
- [`aarch64_unknown_nto_qnx700`](https://redirect.github.com/rust-lang/rust/pull/127897 )
- [`arm64e-apple-tvos`](https://redirect.github.com/rust-lang/rust/pull/130614 )
- [`armv7-rtems-eabihf`](https://redirect.github.com/rust-lang/rust/pull/127021 )
- [`loongarch64-unknown-linux-ohos`](https://redirect.github.com/rust-lang/rust/pull/130750 )
- [`riscv32-wrs-vxworks` and `riscv64-wrs-vxworks`](https://redirect.github.com/rust-lang/rust/pull/130549 )
- [`riscv32{e|em|emc}-unknown-none-elf`](https://redirect.github.com/rust-lang/rust/pull/130555 )
- [`x86_64-unknown-hurd-gnu`](https://redirect.github.com/rust-lang/rust/pull/128345 )
- [`x86_64-unknown-trusty`](https://redirect.github.com/rust-lang/rust/pull/130453 )
Refer to Rust's \[platform support page]\[platform-support-doc]
for more information on Rust's tiered platform support.
<a id="1.83.0-Libraries"></a>
## Libraries
- [Implement `PartialEq` for `ExitCode`.](https://redirect.github.com/rust-lang/rust/pull/127633 )
- [Document that `catch_unwind` can deal with foreign exceptions without UB, although the exact behavior is unspecified.](https://redirect.github.com/rust-lang/rust/pull/128321 )
- [Implement `Default` for `HashMap`/`HashSet` iterators that don't already have it.](https://redirect.github.com/rust-lang/rust/pull/128711 )
- [Bump Unicode to version 16.0.0.](https://redirect.github.com/rust-lang/rust/pull/130183 )
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://redirect.github.com/rust-lang/rust/pull/130229 ).
<a id="1.83.0-Stabilized-APIs"></a>
## Stabilized APIs
- [`BufRead::skip_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.skip_until )
- [`ControlFlow::break_value`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.break_value )
- [`ControlFlow::continue_value`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.continue_value )
- [`ControlFlow::map_break`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.map_break )
- [`ControlFlow::map_continue`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.map_continue )
- [`DebugList::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugList.html#method.finish_non_exhaustive )
- [`DebugMap::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugMap.html#method.finish_non_exhaustive )
- [`DebugSet::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugSet.html#method.finish_non_exhaustive )
- [`DebugTuple::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugTuple.html#method.finish_non_exhaustive )
- [`ErrorKind::ArgumentListTooLong`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ArgumentListTooLong )
- [`ErrorKind::Deadlock`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.Deadlock )
- [`ErrorKind::DirectoryNotEmpty`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.DirectoryNotEmpty )
- [`ErrorKind::ExecutableFileBusy`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ExecutableFileBusy )
- [`ErrorKind::FileTooLarge`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.FileTooLarge )
- [`ErrorKind::HostUnreachable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.HostUnreachable )
- [`ErrorKind::IsADirectory`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.IsADirectory )
- [`ErrorKind::NetworkDown`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NetworkDown )
- [`ErrorKind::NetworkUnreachable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NetworkUnreachable )
- [`ErrorKind::NotADirectory`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NotADirectory )
- [`ErrorKind::NotSeekable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NotSeekable )
- [`ErrorKind::ReadOnlyFilesystem`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ReadOnlyFilesystem )
- [`ErrorKind::ResourceBusy`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ResourceBusy )
- [`ErrorKind::StaleNetworkFileHandle`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.StaleNetworkFileHandle )
- [`ErrorKind::StorageFull`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.StorageFull )
- [`ErrorKind::TooManyLinks`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.TooManyLinks )
- [`Option::get_or_insert_default`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.get_or_insert_default )
- [`Waker::data`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.data )
- [`Waker::new`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.new )
- [`Waker::vtable`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.vtable )
- [`char::MIN`](https://doc.rust-lang.org/stable/core/primitive.char.html#associatedconstant.MIN )
- [`hash_map::Entry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/hash_map/enum.Entry.html#method.insert_entry )
- [`hash_map::VacantEntry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/hash_map/struct.VacantEntry.html#method.insert_entry )
These APIs are now stable in const contexts:
- [`Cell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.Cell.html#method.into_inner )
- [`Duration::as_secs_f32`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.as_secs_f32 )
- [`Duration::as_secs_f64`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.as_secs_f64 )
- [`Duration::div_duration_f32`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.div_duration_f32 )
- [`Duration::div_duration_f64`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.div_duration_f64 )
- [`MaybeUninit::as_mut_ptr`](https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.as_mut_ptr )
- [`NonNull::as_mut`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.as_mut )
- [`NonNull::copy_from`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_from )
- [`NonNull::copy_from_nonoverlapping`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_from_nonoverlapping )
- [`NonNull::copy_to`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_to )
- [`NonNull::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_to_nonoverlapping )
- [`NonNull::slice_from_raw_parts`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.slice_from_raw_parts )
- [`NonNull::write`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write )
- [`NonNull::write_bytes`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write_bytes )
- [`NonNull::write_unaligned`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write_unaligned )
- [`OnceCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.OnceCell.html#method.into_inner )
- [`Option::as_mut`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_mut )
- [`Option::expect`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.expect )
- [`Option::replace`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.replace )
- [`Option::take`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.take )
- [`Option::unwrap`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.unwrap )
- [`Option::unwrap_unchecked`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.unwrap_unchecked )
- [`Option::<&_>::copied`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.copied )
- [`Option::<&mut _>::copied`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.copied-1 )
- [`Option::<Option<_>>::flatten`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.flatten )
- [`Option::<Result<_, _>>::transpose`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.transpose )
- [`RefCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.RefCell.html#method.into_inner )
- [`Result::as_mut`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.as_mut )
- [`Result::<&_, _>::copied`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.copied )
- [`Result::<&mut _, _>::copied`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.copied-1 )
- [`Result::<Option<_>, _>::transpose`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.transpose )
- [`UnsafeCell::get_mut`](https://doc.rust-lang.org/stable/core/cell/struct.UnsafeCell.html#method.get_mut )
- [`UnsafeCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.UnsafeCell.html#method.into_inner )
- [`array::from_mut`](https://doc.rust-lang.org/stable/core/array/fn.from_mut.html )
- [`char::encode_utf8`](https://doc.rust-lang.org/stable/core/primitive.char.html#method.encode_utf8 )
- [`{float}::classify`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.classify )
- [`{float}::is_finite`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_finite )
- [`{float}::is_infinite`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_infinite )
- [`{float}::is_nan`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_nan )
- [`{float}::is_normal`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_normal )
- [`{float}::is_sign_negative`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_sign_negative )
- [`{float}::is_sign_positive`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_sign_positive )
- [`{float}::is_subnormal`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_subnormal )
- [`{float}::from_bits`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_bits )
- [`{float}::from_be_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_be_bytes )
- [`{float}::from_le_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_le_bytes )
- [`{float}::from_ne_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_ne_bytes )
- [`{float}::to_bits`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_bits )
- [`{float}::to_be_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_be_bytes )
- [`{float}::to_le_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_le_bytes )
- [`{float}::to_ne_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_ne_bytes )
- [`mem::replace`](https://doc.rust-lang.org/stable/core/mem/fn.replace.html )
- [`ptr::replace`](https://doc.rust-lang.org/stable/core/ptr/fn.replace.html )
- [`ptr::slice_from_raw_parts_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.slice_from_raw_parts_mut.html )
- [`ptr::write`](https://doc.rust-lang.org/stable/core/ptr/fn.write.html )
- [`ptr::write_unaligned`](https://doc.rust-lang.org/stable/core/ptr/fn.write_unaligned.html )
- [`<*const _>::copy_to`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to )
- [`<*const _>::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to_nonoverlapping )
- [`<*mut _>::copy_from`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_from )
- [`<*mut _>::copy_from_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_from_nonoverlapping )
- [`<*mut _>::copy_to`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to-1 )
- [`<*mut _>::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to_nonoverlapping-1 )
- [`<*mut _>::write`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write )
- [`<*mut _>::write_bytes`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write_bytes )
- [`<*mut _>::write_unaligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write_unaligned )
- [`slice::from_mut`](https://doc.rust-lang.org/stable/core/slice/fn.from_mut.html )
- [`slice::from_raw_parts_mut`](https://doc.rust-lang.org/stable/core/slice/fn.from_raw_parts_mut.html )
- [`<[_]>::first_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.first_mut )
- [`<[_]>::last_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.last_mut )
- [`<[_]>::first_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.first_chunk_mut )
- [`<[_]>::last_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.last_chunk_mut )
- [`<[_]>::split_at_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut )
- [`<[_]>::split_at_mut_checked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_checked )
- [`<[_]>::split_at_mut_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_unchecked )
- [`<[_]>::split_first_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_first_mut )
- [`<[_]>::split_last_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_last_mut )
- [`<[_]>::split_first_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_first_chunk_mut )
- [`<[_]>::split_last_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_last_chunk_mut )
- [`str::as_bytes_mut`](https://doc.rust-lang.org/stable/core/primitive.str.html#method.as_bytes_mut )
- [`str::as_mut_ptr`](https://doc.rust-lang.org/stable/core/primitive.str.html#method.as_mut_ptr )
- [`str::from_utf8_unchecked_mut`](https://doc.rust-lang.org/stable/core/str/fn.from_utf8\_unchecked_mut.html )
<a id="1.83.0-Cargo"></a>
## Cargo
- [Introduced a new `CARGO_MANIFEST_PATH` environment variable, similar to `CARGO_MANIFEST_DIR` but pointing directly to the manifest file.](https://redirect.github.com/rust-lang/cargo/pull/14404/ )
- [Added `package.autolib` to the manifest, allowing `[lib]` auto-discovery to be disabled.](https://redirect.github.com/rust-lang/cargo/pull/14591/ )
- [Declare support level for each crate in Cargo's Charter / crate docs.](https://redirect.github.com/rust-lang/cargo/pull/14600/ )
- [Declare new Intentional Artifacts as 'small' changes.](https://redirect.github.com/rust-lang/cargo/pull/14599/ )
<a id="1.83-Rustdoc"></a>
## Rustdoc
- [The sidebar / hamburger menu table of contents now includes the `# headers` from the main item's doc comment](https://redirect.github.com/rust-lang/rust/pull/120736 ). This is similar to a third-party feature provided by the rustdoc-search-enhancements browser extension.
<a id="1.83.0-Compatibility-Notes"></a>
## Compatibility Notes
- [Warn against function pointers using unsupported ABI strings.](https://redirect.github.com/rust-lang/rust/pull/128784 )
- [Check well-formedness of the source type's signature in fn pointer casts.](https://redirect.github.com/rust-lang/rust/pull/129021 ) This partly closes a soundness hole that comes when casting a function item to function pointer
- [Use equality instead of subtyping when resolving type dependent paths.](https://redirect.github.com/rust-lang/rust/pull/129073 )
- Linking on macOS now correctly includes Rust's default deployment target. Due to a linker bug, you might have to pass `MACOSX_DEPLOYMENT_TARGET` or fix your `#[link]` attributes to point to the correct frameworks. See [#​129369](https://redirect.github.com/rust-lang/rust/pull/129369 ).
- [Rust will now correctly raise an error for `repr(Rust)` written on non-`struct`/`enum`/`union` items, since it previous did not have any effect.](https://redirect.github.com/rust-lang/rust/pull/129422 )
- The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://redirect.github.com/rust-lang/rust/pull/129670 ). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion.
Users can use `--crate-type` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]` when running `rustc`/`cargo rustc` on the command line.
Use of those two attributes outside of `#![cfg_attr]` continue to be fully supported.
- Until now, paths into the sysroot were always prefixed with `/rustc/$hash` in diagnostics, codegen, backtrace, e.g.
thread 'main' panicked at 'hello world', map-panic.rs:2:50
stack backtrace:
0: std::panicking::begin_panic
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12
1: map_panic::main::{{closure}}
at ./map-panic.rs:2:50
2: core::option::Option<T>::map
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29
3: map_panic::main
at ./map-panic.rs:2:30
4: core::ops::function::FnOnce::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[RFC 3127 said](https://rust-lang.github.io/rfcs/3127-trim-paths.html#changing-handling-of-sysroot-path-in-rustc )
> We want to change this behaviour such that, when `rust-src` source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a `--remap-path-prefix` that causes this local path to be remapped in the usual way.
[#​129687](https://redirect.github.com/rust-lang/rust/pull/129687 ) implements this behaviour, when `rust-src` is present at compile time, `rustc` replaces `/rustc/$hash` with a real path into the local `rust-src` component with best effort.
To sanitize this, users must explicitly supply `--remap-path-prefix=<path to rust-src>=foo` or not have the `rust-src` component installed.
- The allow-by-default `missing_docs` lint used to disable itself when invoked through `rustc --test`/`cargo test`, resulting in `#[expect(missing_docs)]` emitting false positives due to the expectation being wrongly unfulfilled. This behavior [has now been removed](https://redirect.github.com/rust-lang/rust/pull/130025 ), which allows `#[expect(missing_docs)]` to be fulfilled in all scenarios, but will also report new `missing_docs` diagnostics for publicly reachable `#[cfg(test)]` items, [integration test](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests ) crate-level documentation, and publicly reachable items in integration tests.
- [The `armv8r-none-eabihf` target now uses the Armv8-R required set of floating-point features.](https://redirect.github.com/rust-lang/rust/pull/130295 )
- [Fix a soundness bug where rustc wouldn't detect unconstrained higher-ranked lifetimes in a `dyn Trait`'s associated types that occur due to supertraits.](https://redirect.github.com/rust-lang/rust/pull/130367 )
- [Update the minimum external LLVM version to 18.](https://redirect.github.com/rust-lang/rust/pull/130487 )
- [Remove `aarch64-fuchsia` and `x86_64-fuchsia` target aliases in favor of `aarch64-unknown-fuchsia` and `x86_64-unknown-fuchsia` respectively.](https://redirect.github.com/rust-lang/rust/pull/130657 )
- [The ABI-level exception class of a Rust panic is now encoded with native-endian bytes, so it is legible in hex dumps.](https://redirect.github.com/rust-lang/rust/pull/130897 )
- [Visual Studio 2013 is no longer supported for MSVC targets.](https://redirect.github.com/rust-lang/rust/pull/131070 )
- [The sysroot no longer contains the `std` dynamic library in its top-level `lib/` dir.](https://redirect.github.com/rust-lang/rust/pull/131188 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2024-11-29 07:25:36 +00:00
Nicholas Rayburn
32f860d238
feat(linter): Add support for ignorePatterns property within config file ( #7092 )
...
This could probably use some tests, but I'm not really sure what exactly
should be tested.
Will leave a review with a few comments on things that might need a
different approach.
Closes #7032 .
2024-11-28 17:32:44 +08:00
oxc-bot
861ae1581a
release(oxlint): v0.13.2 ( #7489 )
2024-11-26 15:25:31 +08:00
oxc-bot
88d17b96e3
release(oxlint): v0.13.1 ( #7441 )
...
## [0.13.1] - 2024-11-23
### Features
- 4ad26b9 linter: Add `no-promise-in-callback` (#7307 ) (no-yan)
- 9558087 oxlint: Auto detect config file in CLI (#7348 ) (Alexander S.)
### Bug Fixes
- 8507464 linter: Hanging when source has syntax/is flow (#7432 )
(Cameron)
- e88cf1b linter: Make `overrides` globs relative to config path (#7407 )
(camchenry)
- 9002e97 linter: Add proper support for findIndex and findLastIndex for
`unicorn/prefer-array-some` (#7405 ) (Dmitry Zakharov)
### Documentation
- 6730e3e linter: Add more examples for `unicorn/prefer-array-some`
(#7411 ) (Dmitry Zakharov)
### Refactor
- 6c0d31b linter: Remove useless `const` declaration (#7430 ) (Song Gao)
- c8adc46 linter/no-unused-vars: Improve implementation to remove using
SymbolFlags::Export (#7412 ) (Dunqing)
- c90537f linter/only-used-in-recursion: Improve implementation to
remove using SymbolFlags::Export (#7413 ) (Dunqing)
### Testing
- 779f479 editor: Check if workspace configuration is updated (#7403 )
(Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-23 23:46:16 +08:00
Cameron
8507464d5a
fix(linter): hanging when source has syntax/is flow ( #7432 )
...
Closes #7406
See
https://github.com/oxc-project/oxc/issues/7406#issuecomment-2494981152
for why this is happening
not sure whether there's a better solve for this/
2024-11-23 23:20:19 +08:00
Alexander S.
9558087db9
feat(oxlint): auto detect config file in CLI ( #7348 )
...
waiting fior #7352
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-23 23:17:05 +08:00
camchenry
e88cf1bfd6
fix(linter): make overrides globs relative to config path ( #7407 )
...
- fixes https://github.com/oxc-project/oxc/issues/7365
currently, we are matching globs on the absolute path to the file, which means that in order to properly match, all globs would need to start with `**/`. this is not consistent with the behavior in ESLint, which is defined here: https://eslint.org/docs/v8.x/use/configure/configuration-files#how-do-overrides-work
> **The patterns are applied against the file path relative to the directory of the config file.** For example, if your config file has the path `/Users/john/workspace/any-project/.eslintrc.js` and the file you want to lint has the path `/Users/john/workspace/any-project/lib/util.js`, then the pattern provided in `.eslintrc.js` is executed against the relative path `lib/util.js`.
This PR adds the ability to store the path to the configuration file along with the configuration data, so that we can later use it to resolve the relative paths of the files in the overrides section.
I'm not exactly sure if this will still make sense with nested configuration files, but I think it makes sense to store a path to each configuration file, alongside where the overrides are stored.
2024-11-22 14:37:45 +00:00
oxc-bot
4b5a176630
release(oxlint): v0.13.0 ( #7398 )
...
## [0.13.0] - 2024-11-21
- 7bf970a linter: [**BREAKING**] Remove tree_shaking plugin (#7372 )
(Boshen)
- 7f8747d linter: Implement `react/no-array-index-key` (#6960 )
(BitterGourd)
### Features
- be152c0 linter: Add `typescript/no-require-imports` rule (#7315 )
(Dmitry Zakharov)
- 849489e linter: Add suggestion for no-console (#4312 ) (DonIsaac)
- 8cebdc8 linter: Allow appending plugins in override (#7379 )
(camchenry)
- 8cfea3c oxc_cfg: Add implicit return instruction (#5568 )
(IWANABETHATGUY)
- e6922df parser: Fix incorrect AST for `x?.f<T>()` (#7387 ) (Boshen)
### Bug Fixes
- e91c287 linter: Fix panic in react/no-array-index-key (#7395 ) (Boshen)
- a32f5a7 linter/no-array-index-key: Compile error due to it uses a
renamed API (#7391 ) (Dunqing)
- 666b6c1 parser: Add missing `ChainExpression` in optional
`TSInstantiationExpression` (#7371 ) (Boshen)
### Documentation
- df143ca linter: Add docs for config settings (#4827 ) (DonIsaac)
- ad44cfa linter: Import/first options (#7381 ) (Zak)
### Refactor
- c34d649 linter: Use `scope_id` etc methods (#7394 ) (overlookmotel)
- 466f395 vscode: Split `ConfigService` and `Config` (#7376 ) (Alexander
S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-21 22:21:32 +08:00
Boshen
878189c407
feat(parser,linter)!: add ParserReturn::is_flow_language; linter ignore flow error ( #7373 )
...
closes #7123
2024-11-20 12:50:24 +00:00
oxc-bot
b6d5c0f33e
release(oxlint): v0.12.0 ( #7366 )
...
## [0.12.0] - 2024-11-20
- 20d9080 linter: [**BREAKING**] Override plugins array when passed in
config file (#7303 ) (camchenry)
### Features
- 1d9f528 linter: Implement `unicorn/prefer-string-raw` lint rule
(#7335 ) (Ryan Walker)
- d445e0f linter: Implement `unicorn/consistent-existence-index-check`
(#7262 ) (Ryan Walker)
- 01ddf37 linter: Add `allowReject` option to
`no-useless-promise-resolve-reject` (#7274 ) (no-yan)
- 755a31b linter: Support bind function case for compatibility with
`promise/no-return-wrap` (#7232 ) (no-yan)
- 428770e linter: Add `import/no-namespace` rule (#7229 ) (Dmitry
Zakharov)
- 9c91151 linter: Implement typescript/no-empty-object-type (#6977 )
(Orenbek)
- 2268a0e linter: Support `overrides` config field (#6974 ) (DonIsaac)
- 3dcac1a linter: React/exhaustive-deps (#7151 ) (camc314)
- d3a0119 oxlint: Add `cwd` property to `LintRunner` (#7352 ) (Alexander
S.)
### Bug Fixes
- ba0b2ff editor: Reload workspace configuration after change (#7302 )
(Alexander S.)
- bc0e72c linter: Handle user variables correctly for import/no_commonjs
(#7316 ) (Dmitry Zakharov)
- bf839c1 linter: False positive in `jest/expect-expect` (#7341 )
(dalaoshu)
- ff2a1d4 linter: Move `exhaustive-deps` to `react` (#7251 ) (camc314)
- df5c535 linter: Revert unmatched rule error (#7257 ) (Cameron A
McHenry)
- c4ed230 linter: Fix false positive in eslint/no-cond-assign (#7241 )
(camc314)
- ef847da linter: False positive in `jsx-a11y/iframe-has-title` (#7253 )
(dalaoshu)
- 62b6327 linter: React/exhaustive-deps update span for unknown deps
diagnostic (#7249 ) (camc314)
### Documentation
- 4c124a8 editor/vscode: Update VS Code readme with installation
instructions and available features (#7306 ) (Nicholas Rayburn)
### Refactor
- c6a4868 linter: Temporarily remove unknown rules checking (#7260 )
(camchenry)
### Testing
- 5190b7f editor: Add test setup (#7361 ) (Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-20 15:45:24 +08:00
Alexander S.
d3a0119a42
feat(oxlint): add cwd property to LintRunner ( #7352 )
...
allows to use multiple `LintRunner` in one file targeting multiple
directory.
The current problem is for the test in #7348 we can not change
`env::current_dir`,
so as a workaround I introduce a new property :)
See more info here:
https://discord.com/channels/1079625926024900739/1117322804291964931/1308179827576016897
2024-11-20 12:44:50 +08:00
DonIsaac
2268a0ef90
feat(linter): support overrides config field ( #6974 )
...
Part of #5653
2024-11-13 05:40:59 +00:00
Cameron A McHenry
df5c535dd0
fix(linter): revert unmatched rule error ( #7257 )
...
- related to https://github.com/oxc-project/oxc/issues/6988
This is causing a lot of errors currently such as
https://github.com/oxc-project/oxc/issues/7233 . I think we need to
handle rule names more robustly first:
- https://github.com/oxc-project/oxc/issues/7240
- https://github.com/oxc-project/oxc/issues/7082
- https://github.com/oxc-project/oxc/discussions/7242
then, I think we can revisit this and maybe implement it as an actual
lint plugin too? https://github.com/oxc-project/oxc/discussions/7086
2024-11-13 09:06:20 +08:00
oxc-bot
68dc899887
release(oxlint): v0.11.1 ( #7224 )
...
## [0.11.1] - 2024-11-09
### Features
- 4dd9b60 editor/vscode: Replace existing output channel and trace
output channel with a single LogOutputChannel (#7196 ) (Nicholas Rayburn)
- 1fcd709 linter: Add jsx support for only-used-in-recursion (#7120 )
(no-yan)
- 4d577cf linter: Add `import/first` rule (#7180 ) (Dmitry Zakharov)
- 9b8973f linter: Add `import/unambiguous` rule (#7187 ) (Dmitry
Zakharov)
- 5ab1ff6 linter: Implement @typescript-eslint/no-unsafe-function-type
(#6989 ) (Orenbek)
### Bug Fixes
- eea8879 editor/vscode: Update language client id to fix the resolution
of the oxc.trace.server setting (#7181 ) (Nicholas Rayburn)
- b73cfd9 linter: Fix `is_method_call` with parentheses and chain
expression (#7095 ) (tbashiyy)
### Refactor
- 8c0a362 linter: Use `ctx.source_range(comment.content_span())` API
(#7155 ) (Boshen)
- c5485ae semantic: Add `ancestor_kinds` iterator function (#7217 )
(camchenry)
- abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216 )
(camchenry)
- 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215 )
(camchenry)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-09 19:57:08 +08:00
oxc-bot
2d40b073cb
release(oxlint): v0.11.0 ( #7094 )
...
## [0.11.0] - 2024-11-03
- 9fd9f4f linter: [**BREAKING**] Sync sindresorhus/globals; removed
Object.prototype properties from builtin and es* globals (#6991 )
(Boshen)
### Features
- 6b619da editor: Listen to config file changes and trigger a
didChangeConfiguration update (#6964 ) (Nicholas Rayburn)
- 7872927 editor/vscode: Support window/showMessage event (#7085 )
(Nicholas Rayburn)
- 2184588 linter: Do not bail for unmatched rules yet (#7093 ) (Boshen)
- a6fcd81 linter: Add `import/no-commonjs` rule (#6978 ) (Dmitry
Zakharov)
- 1691cab linter: Support user-configurable secrets for
`oxc-security/api-keys` (#5938 ) (DonIsaac)
- 610621c linter: Implement `react/style-prop-object` (#6342 ) (Albert
Kaaman)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751 ) (DonIsaac)
- 1c66473 linter: Implement `eslint/prefer-object-has-own` (#6905 )
(tomoya yanagibashi)
### Bug Fixes
- ebf3753 editor: Fix onConfigChange to send the correct config for
didChangeConfiguration notification (#6962 ) (Nicholas Rayburn)
- 79bf74a linter: Check is_reference_to_global_variable in
`no-array-constructor` (#7067 ) (Naoya Yoshizawa)
- 38d1f78 linter: Remove confusing help text for now (#7081 ) (Cam
McHenry)
- 147e2e4 linter: Allow replacing rule when none are enabled yet (#7014 )
(camchenry)
- 7aa496a linter: Remove unsafe fixer of `no-useless-spread` (#6655 )
(dalaoshu)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907 ) (DonIsaac)
### Documentation
- 4551baa linter: Document `rules` (#6983 ) (Boshen)
### Refactor
- a8dc75d linter: Remove unused CLI result types (#7088 ) (camchenry)
- 8f1460e linter: Move `LintPlugins` from `LintOptions` to `LintConfig`
(#6932 ) (DonIsaac)
### Testing
- c35d3f2 linter: Improve test failure output (#6975 ) (camchenry)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-03 11:27:30 +08:00
Boshen
218458811b
feat(linter): do not bail for unmatched rules yet ( #7093 )
...
I intend to make a release today, let's hold onto this behaviour.
2024-11-03 11:18:36 +08:00
camchenry
a8dc75d6ba
refactor(linter): remove unused CLI result types ( #7088 )
...
It doesn't seem like we should implement type checking or formatting in the `oxlint` binary. Plus, these are unused currently. So I removed them.
2024-11-02 06:17:28 +00:00
Cam McHenry
38d1f78754
fix(linter): remove confusing help text for now ( #7081 )
...
It's possible that the rule may not exist at all, or it's part of a
disabled plugin. The help text doesn't give a clue as to which is the
case currently, so it's probably less confusing to just omit it
completely.
2024-11-02 11:50:42 +08:00
camchenry
1f2a6c666f
feat(linter)!: report unmatched rules with error exit code ( #7027 )
...
- closes https://github.com/oxc-project/oxc/issues/6988
we now return an error exit code when there are unmatched rules. previously, we would print an error to stderr and continue running. however, this masked errors in some tests that actually had unmatched rules in them. these test cases now trigger a panic (in tests only, not at runtime), and help ensure that we are reporting an error message to the user for unknown rules, which we did not have any tests cases for before.
- fixes https://github.com/oxc-project/oxc/issues/7025
this also fixes https://github.com/oxc-project/oxc/issues/7025 , where we were reporting rules as unmatched simply because they had been disabled prior to being configured. similar to https://github.com/oxc-project/oxc/issues/7009 .
2024-11-01 03:27:25 +00:00
oxc-bot
1ea0be1b6a
release(oxlint): v0.10.3 ( #6911 )
...
## [0.10.3] - 2024-10-26
- 90c786c regular_expression: [**BREAKING**] Support ES2025 Duplicated
named capture groups (#6847 ) (leaysgur)
- 8032813 regular_expression: [**BREAKING**] Migrate to new regexp
parser API (#6741 ) (leaysgur)
### Features
- a73c5af linter: Add fixer for `jsx-a11y/no-access-key` rule (#6781 )
(Tapan Prakash)
- 2aa763c linter: Warn unmatched rule names (#6782 ) (Tapan Prakash)
- 0acca58 linter: Support `--print-config all` to print config file for
project (#6579 ) (mysteryven)
### Bug Fixes
- f49b3e2 linter: `react/iframe-missing-sandbox` ignores vanilla JS APIs
(#6872 ) (DonIsaac)
- 54a5032 linter: Correct false positive in `no-duplicates` (#6748 )
(dalaoshu)
- a47c70e minifier: Fix remaining runtime bugs (#6855 ) (Boshen)
### Documentation
- 3923e63 linter: Add schema to config examples (#6838 ) (Dmitry
Zakharov)
### Refactor
- a148023 linter: Dereference IDs as soon as possible (#6821 )
(overlookmotel)
- 423d54c rust: Remove the annoying `clippy::wildcard_imports` (#6860 )
(Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-26 17:13:06 +08:00
mysteryven
0acca58581
feat(linter): support --print-config all to print config file for project ( #6579 )
...
Continue work on #4742 .
Only `oxlint --print-config all` is supported. It's useful to migrate from command-line interface to config file.
The `--print-config PATH` looks not really useful for us now, I will add it after config file overrides supported.
2024-10-22 17:56:23 +00:00
oxc-bot
9648e98998
release(oxlint): v0.10.2 ( #6764 )
...
## [0.10.2] - 2024-10-22
### Features
- dbe1972 linter: Import/no-cycle should turn on ignore_types by default
(#6761 ) (Boshen)
- 619d06f linter: Fix suggestion for `eslint:no_empty_static_block` rule
(#6732 ) (Tapan Prakash)
### Bug Fixes
### Performance
- 8387bac linter: Apply small file optimization, up to 30% faster
(#6600 ) (camchenry)
### Refactor
- b884577 linter: All ast_util functions take Semantic (#6753 )
(DonIsaac)
- 744aa74 linter: Impl `Deref<Target = Semantic>` for `LintContext`
(#6752 ) (DonIsaac)
- 6ffdcc0 oxlint: Lint/mod.rs -> lint.rs (#6746 ) (Boshen)
### Testing
- b03cec6 oxlint: Add `--fix` test case (#6747 ) (Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-22 12:31:17 +08:00
Boshen
b03cec6ae9
test(oxlint): add --fix test case ( #6747 )
...
closes #6061
2024-10-21 15:38:19 +00:00
Boshen
6ffdcc0e3e
refactor(oxlint): lint/mod.rs -> lint.rs ( #6746 )
2024-10-21 15:10:52 +00:00
oxc-bot
abb4ff30eb
release(oxlint): v0.10.1 ( #6729 )
...
## [0.10.1] - 2024-10-21
### Features
- af25752 linter: Add `unicorn/prefer-math-min-max` (#6621 ) (Brian Liu)
- 5095f02 linter: Added fixer for duplicate prefix in valid title jest
rule (#6699 ) (Tapan Prakash)
- e9976d4 linter: Add title whitespace fixer for jest valid title rule
(#6669 ) (Tapan Prakash)
- 45f02d5 linter: Add `unicorn/consistent-empty-array-spread` (#6695 )
(Brian Liu)
- 01a35bb linter/eslint: Show ignore patterns in `eslint/no-unused-vars`
diagnostic messages (#6696 ) (DonIsaac)
### Bug Fixes
- 1bcd707 editor: Update config sent to language server (#6724 )
(Nicholas Rayburn)
- ce25c45 linter: Panic in `disable-directives` (#6677 ) (dalaoshu)
- a5de230 linter/import: `import/no-duplicates` handles namespace
imports correctly (#6694 ) (DonIsaac)
- b0b6ac7 linter/no-cond-assign: False positive when assignment is in
body statement (#6665 ) (camchenry)
### Performance
- 6a76ea8 linter/no-unused-vars: Use default IgnorePattern when /^_/ is
provided as a pattern (#6697 ) (DonIsaac)
### Refactor
- d6609e9 linter: Use `run_on_jest_node` for existing lint rules (#6722 )
(camchenry)
- 97195ec linter: Add `run_on_jest_node` to run rules on only jest nodes
(#6721 ) (camchenry)
- 155fe7e linter: Allow `Semantic` to be passed for collecting Jest
nodes (#6720 ) (camchenry)
- ad8f281 linter: Use iter for collecting jest nodes (#6719 ) (camchenry)
- dc19a8f linter: Use iterator for collecting jest imports (#6718 )
(camchenry)
- 29c1447 linter: `jest/valid-title` fixer to use `Span::shrink` method
(#6703 ) (Tapan Prakash)
- 2eb984a linter: Add missing `should_run` implementations (#6666 )
(camchenry)
- 23f88b3 linter/import: Better diagnostic messages for
`import/no-duplicates` (#6693 ) (DonIsaac)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-21 12:29:57 +08:00
camchenry
d6609e91c2
refactor(linter): use run_on_jest_node for existing lint rules ( #6722 )
...
- closes https://github.com/oxc-project/oxc/issues/6038
Migrates all simple iterations over Jest nodes to use the `run_on_jest_node` method. Rules which require more custom data (such as getting nodes in order or storing data about counts, duplicates, etc.) have not been migrated.
Some simple benchmarking shows that this is ~5% faster on `vscode` when the Jest/Vitest rules are NOT enabled (due to being able to skip them now). And it is up to 8% on `vscode` when the Jest/Vitest plugins are enabled.
```
hyperfine -i -N --warmup 3 --runs 30 './oxlint-jest-iter --deny=all --silent ./vscode' './oxlint-main --deny=all --silent ./vscode'
Benchmark 1: ./oxlint-jest-iter --deny=all --silent ./vscode
Time (mean ± σ): 2.348 s ± 0.104 s [User: 16.922 s, System: 0.641 s]
Range (min … max): 2.141 s … 2.544 s 30 runs
Benchmark 2: ./oxlint-main --deny=all --silent ./vscode
Time (mean ± σ): 2.476 s ± 0.042 s [User: 17.768 s, System: 0.668 s]
Range (min … max): 2.430 s … 2.598 s 30 runs
Summary
./oxlint-jest-iter --deny=all --silent ./vscode ran
1.05 ± 0.05 times faster than ./oxlint-main --deny=all --silent ./vscode
```
```
hyperfine -i -N --warmup 3 --runs 30 './oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode' './oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode'
Benchmark 1: ./oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode
Time (mean ± σ): 2.728 s ± 0.118 s [User: 19.782 s, System: 0.786 s]
Range (min … max): 2.580 s … 3.078 s 30 runs
Benchmark 2: ./oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode
Time (mean ± σ): 2.939 s ± 0.051 s [User: 21.259 s, System: 0.859 s]
Range (min … max): 2.848 s … 3.064 s 30 runs
Summary
./oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode ran
1.08 ± 0.05 times faster than ./oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode
```
2024-10-21 02:13:59 +00:00
oxc-bot
70c6f24a08
release(oxlint): v0.10.0 ( #6661 )
...
## [0.10.0] - 2024-10-18
- 7f6b219 editor/vscode: [**BREAKING**] Unify configuration logic
(#6630 ) (DonIsaac)
- 782f0a7 codegen: [**BREAKING**] Rename `print_char` method to
`print_ascii_byte` (#6512 ) (overlookmotel)
- 7645e5c codegen: [**BREAKING**] Remove CommentOptions API (#6451 )
(Boshen)
- 5200960 oxc: [**BREAKING**] Remove passing `Trivias` around (#6446 )
(Boshen)
- 80266d8 linter: [**BREAKING**] Support plugins in oxlint config files
(#6088 ) (DonIsaac)
### Features
- 6f22538 ecmascript: Add `ToBoolean`, `ToNumber`, `ToString` (#6502 )
(Boshen)
- 1e7fab3 linter: Implement `no-callback-in-promise` (#6157 ) (dalaoshu)
- c56343d linter: Promote `no_unsafe_optional_chaining` to correctness
(#6491 ) (Boshen)
- 454874a linter: Implement `react/iframe-missing-sandbox` (#6383 ) (Radu
Baston)
- c8174e2 linter: Add suggestions for `no-plusplus` (#6376 ) (camchenry)
- 6e3224d linter: Configure by category in config files (#6120 )
(DonIsaac)
- c5e66e1 linter/no-unused-vars: Report own type references within
class, interface, and type alias declarations (#6557 ) (DonIsaac)
- 8c78f97 linter/node: Implement no-new-require (#6165 ) (Jelle van der
Waa)
### Bug Fixes
- cf92730 editor: Use human-readable output channel names (#6629 )
(DonIsaac)
- d9159a2 editor: Misaligned command prefixes (#6628 ) (DonIsaac)
- b9c94bb editors/vscode: Temporarily solve oxc_language_server issue on
windows (#6384 ) (dalaoshu)
- e340424 linter: Support import type with namespaced import in
`import/no-duplicates` (#6650 ) (Dmitry Zakharov)
- a668397 linter: Panic in `no-else-return` (#6648 ) (dalaoshu)
- 41dc8e3 linter: Stack overflow in `oxc/no-async-endpoint-handlers`
(#6614 ) (DonIsaac)
- d07a9b0 linter: Panic in `no-zero-fractions` (#6607 ) (dalaoshu)
- d6a0d2e linter: Fix file name checking behavior of
`unicorn/filename-case` (#6463 ) (camchenry)
- 0784e74 linter: Error fixer of `switch-case-braces` (#6474 ) (dalaoshu)
- e811812 linter: Error diagnostic message based on parameter length of
valid-expect (#6455 ) (dalaoshu)
- f71c91e linter: Move `eslint/sort-keys` to `style` category (#6377 )
(DonIsaac)
- 2b86de9 linter/no-control-regex: False negative for flags in template
literals (#6531 ) (DonIsaac)
- 685a590 linter/no-control-regex: Better diagnostic messages (#6530 )
(DonIsaac)
- 6d5a9f2 linter/no-control-regex: Allow capture group references
(#6529 ) (DonIsaac)
- ba53bc9 linter/no-unused-vars: False positives in TS type assertions
(#6397 ) (DonIsaac)
- d3e59c6 linter/no-unused-vars: False positive in some default export
cases (#6395 ) (DonIsaac)
- e08f956 linter/no-unused-vars: False positive for functions and
classes in arrays (#6394 ) (DonIsaac)
- b9d7c5f no-unused-vars: Consider functions within conditional
expressions usable (#6553 ) (Brian Donovan)
### Performance
- 0cbd4d0 linter: Avoid megamorphism in `RuleFixer` methods (#6606 )
(DonIsaac)
- 725f9f6 linter: Get fewer parent nodes in
`unicorn/prefer-dom-node-text-content` (#6467 ) (camchenry)
- c00f669 linter: Use NonZeroUsize for pending module cache entries
(#6439 ) (DonIsaac)
- a1a2721 linter: Replace `ToString::to_string` with `CompactStr` in
remaining rules (#6407 ) (camchenry)
- c5c69d6 linter: Use `CompactStr` in `valid-title` (#6406 ) (camchenry)
- d66e826 linter: Use `CompactStr` in `prefer-lowercase-title` (#6405 )
(camchenry)
- 889400c linter: Use `CompactStr` for `get_node_name` in Jest rules
(#6403 ) (camchenry)
- 9906849 linter: Use `CompactStr` in `no-large-snapshots` (#6402 )
(camchenry)
- c382ec4 linter: Use `CompactStr` in `no-hooks` (#6401 ) (camchenry)
- 24a5d9b linter: Use `CompactStr` in `expect-expect` (#6400 )
(camchenry)
- 71dbdad linter: Use `CompactStr` in `no-console` (#6399 ) (camchenry)
- f5f00a1 linter: Use `CompactStr` in `no-bitwise` (#6398 ) (camchenry)
- 62afaa9 linter/jsx-no-comment-textnodes: Remove regex for checking
comment patterns (#6534 ) (camchenry)
- b3d0cce linter/no-unescaped-entities: Add fast path to check if char
should be replaced (#6594 ) (camchenry)
- ee73f56 linter/no-unused-vars: Do not construct `Regex` for default
ignore pattern (#6590 ) (camchenry)
- 77ddab8 linter/numeric-separators-style: Replace regex with number
parser (#6546 ) (camchenry)
- 8f47cd0 linter/react: Remove regex patterns in `no-unknown-property`
(#6536 ) (camchenry)
### Documentation
- 557f941 linter: Add docs to no-unused-vars and Tester (#6558 )
(DonIsaac)
### Refactor
- ecce5c5 linter: Improve recursive argument handling and diagnostics
creation (#6513 ) (no-yan)
- f960e9e linter: Add suggested file names for `unicorn/filename-case`
(#6465 ) (camchenry)
- 7240ee2 linter: Make advertised fix kinds consistent (#6461 )
(Alexander S.)
- b48c368 linter: `no_global_assign` rule: reduce name lookups (#6460 )
(overlookmotel)
- 2566ce7 linter: Remove OxlintOptions (#6098 ) (DonIsaac)
- 002078a linter: Make Runtime's members private (#6440 ) (DonIsaac)
- 6a0a533 linter: Move module cache logic out of Runtime (#6438 )
(DonIsaac)
- c18c6e9 linter: Split service code into separate modules (#6437 )
(DonIsaac)
- 5ea9ef7 linter: Improve labels and help message for
`eslint/no-useless-constructor` (#6389 ) (DonIsaac)
- 2c32dac linter/no-control-regex: Remove duplicate code (#6527 )
(DonIsaac)
- 435a89c oxc: Remove useless `allocator.alloc(program)` calls (#6571 )
(Boshen)
- f70e93b oxc: Ban index methods on std::str::Chars (#6075 ) (dalaoshu)
### Testing
- a6cae98 linter: Make sure all auto-fixing rules have fixer test
(#6378 ) (DonIsaac)
- 06b09b2 linter/no-unused-vars: Enable now-passing tests (#6556 )
(DonIsaac)
- badd11c linter/no-unused-vars: Ignored catch parameters (#6555 )
(DonIsaac)
- 84aa2a2 linter/no-useless-constructor: Add cases for initializers in
subclass constructors (#6390 ) (DonIsaac)
---------
Co-authored-by: DonIsaac <22823424+DonIsaac@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-18 20:34:15 -04:00
DonIsaac
80266d85c9
feat(linter)!: support plugins in oxlint config files ( #6088 )
...
> Closes #5046
This PR migrates the linter crate and oxlint app to use the new `LinterBuilder` API. This PR has the following effects:
1. `plugins` in oxlint config files are now supported
2. irons out weirdness when using CLI args and config files together. CLI args are now always applied on top of config file settings, overriding them.
# Breaking Changes
Before, config files would override rules set in CLI arguments. For example, running this command:
```sh
oxlint -A correctness -c oxlintrc.json
```
With this config file
```jsonc
// oxlintrc.json
{
"rules": {
"no-const-assign": "error"
}
}
```
Would result in a single rule, `no-const-assign` being turned on at an error level with all other rules disabled (i.e. set to "allow").
Now, **CLI arguments will override config files**. That same command with the same config file will result with **all rules being disabled**.
## Details
For a more in-depth explanation, assume we are running the below command using the `oxlintrc.json` file above:
```sh
oxlint -A all -W correctness -A all -W suspicious -c oxlintrc.json
```
### Before
> Note: GitHub doesn't seem to like deeply nested lists. Apologies for the formatting.
Here was the config resolution process _before_ this PR:
<details><summary>Before Steps</summary>
1. Start with a default set of filters (["correctness", "warn"]) if no filters were passed to the CLI. Since some were, the filter list starts out empty.
2. Apply each filter taken from the CLI from left to right. When a filter allows a rule or category, it clears the configured set of rules. So applying those filters looks like this
a. start with an empty list `[]`
b. `("all", "allow")` -> `[]`
c. `("correctness", "warn")` -> `[ <correctness rules> ]`
d. `("all", "allow")` -> `[]`
e. `("suspicious", "warn")` -> `[ <suspicious rules> ]`. This is the final rule set for this step
3. Apply overrides from `oxlintrc.json`. This is where things get a little funky, as mentioned in point 2 of what this PR does. At this point, all rules in the rules list are only from the CLI.
a. If a rule is only set in the CLI and is not present in the config file, there's no effect
b. If a rule is in the config file but not the CLI, it gets inserted into the list.
c. If a rule is already in the list and in the config file
i. If the rule is only present once (e.g. `"no-loss-of-precision": "error"`), unconditionally override whatever was in the CLI with what was set in the config file
ii. If the rule is present twice (e.g. `"no-loss-of-precision": "off", "@typescript-eslint/no-loss-of-precision": "error"`),
a. if all rules in the config file are set to `allow`, then turn the rule off
b. If one of them is `warn` or `deny`, then update the currently-set rule's config object, but _leave its severity alone_.
So, for our example, the final rule set would be `[<all suspicious rules: "warn">, no-const-assign: "error"]`
</details>
### After
Rule filters were completely re-worked in a previous PR. Now, lint filters aren't kept on hand-only the rule list is.
<details><summary>After Steps</summary>
1. Start with the default rule set, which is all correctness rules for all enabled plugins (`[<all correctness rules: "warn">]`)
2. Apply configuration from `oxlintrc.json` _first_.
a. If the rule is warn/deny exists in the list already, update its severity and config object. If it's not in the list, add it.
b. If the rule is set to allow, remove it from the list.
The list is now `[<all correctness rules except no-const-assign: "warn">, no-const-assign: "error"]`.
3. Apply each filter taken from the CLI from left to right. This works the same way as before. So, after they're applied, the list is now `[<suspicous rules: "warn">]`
</details>
2024-10-10 19:21:50 +00:00
oxc-bot
62d45bf14e
release(oxlint): v0.9.10 ( #6340 )
...
## [0.9.10] - 2024-10-07
### Features
- f272137 editors/vscode: Clear diagnostics on file deletion (#6326 )
(dalaoshu)
- 1a5f293 editors/vscode: Update VSCode extention to use project's
language server (#6132 ) (dalaoshu)
- 376cc09 linter: Implement `no-throw-literal` (#6144 ) (dalaoshu)
- 5957214 linter: Allow fixing in files with source offsets (#6197 )
(camchenry)
- a089e19 linter: Eslint/no-else-return (#4305 ) (yoho)
- 183739f linter: Implement prefer-await-to-callbacks (#6153 ) (dalaoshu)
- ae539af linter: Implement no-return-assign (#6108 ) (Radu Baston)
### Bug Fixes
- 9e9808b linter: Fix regression when parsing ts in vue files (#6336 )
(Boshen)
- 93c6db6 linter: Improve docs and diagnostics message for
no-else-return (#6327 ) (DonIsaac)
- e0a3378 linter: Correct false positive in
`unicorn/prefer-string-replace-all` (#6263 ) (H11)
- ea28ee9 linter: Improve the fixer of `prefer-namespace-keyword`
(#6230 ) (dalaoshu)
- f6a3450 linter: Get correct source offsets for astro files (#6196 )
(camchenry)
- be0030c linter: Allow whitespace control characters in
`no-control-regex` (#6140 ) (camchenry)
- e7e8ead linter: False positive in `no-return-assign` (#6128 )
(DonIsaac)
### Performance
- ac0a82a linter: Reuse allocator when there are multiple source texts
(#6337 ) (Boshen)
- 50a0029 linter: Do not concat vec in `no-useless-length-check` (#6276 )
(camchenry)
### Documentation
- 7ca70dd linter: Add docs for `ContextHost` and `LintContext` (#6272 )
(camchenry)
- a949ecb linter: Improve docs for `eslint/getter-return` (#6229 )
(DonIsaac)
- 14ba263 linter: Improve docs for `eslint-plugin-import` rules (#6131 )
(dalaoshu)
### Refactor
- 642725c linter: Rename vars from `ast_node_id` to `node_id` (#6305 )
(overlookmotel)
- 8413175 linter: Move shared function from utils to rule (#6127 )
(dalaoshu)
- ba9c372 linter: Make jest/vitest rule mapping more clear (#6273 )
(camchenry)
- 82b8f21 linter: Add schemars and serde traits to AllowWarnDeny and
RuleCategories (#6119 ) (DonIsaac)
- ea908f7 linter: Consolidate file loading logic (#6130 ) (DonIsaac)
- db751f0 linter: Use regexp AST visitor in `no-control-regex` (#6129 )
(camchenry)
- 3aa7e42 linter: Use RegExp AST visitor for `no-hex-escape` (#6117 )
(camchenry)
- 9d5b44a linter: Use regex visitor in `no-regex-spaces` (#6063 )
(camchenry)
- 0d44cf7 linter: Use regex visitor in `no-useless-escape` (#6062 )
(camchenry)
- eeb8873 linter: Use regex visitor in `no-empty-character-class`
(#6058 ) (camchenry)
### Testing
- d883562 linter: Invalid `eslint/no-unused-vars` options (#6228 )
(DonIsaac)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-08 12:14:54 +08:00
Boshen
9e9808b429
fix(linter): fix regression when parsing ts in vue files ( #6336 )
2024-10-07 14:28:44 +00:00