oxc/crates/oxc_linter
Arian94 737ba1d9d8
fix(linter): fix some cases on ``AssignmentExpression` for `unicorn/consistent-function-scoping`` (#5675)
This is to fix the cases mentioned in the comment section of #5365.

In short, it will report these as PASS test cases:

```js
let inner;

function foo1() {
  inner = function() {}
}
function foo2() {
  inner = function() {}
}
```

```js
let inner;

function outer() {
  inner = function() {}
}
```

And report these below as FAIL test cases:

```js
let inner;

function foo1() {
  inner = function smth() {}
}
function foo2() {
  inner = function bar() {}
}
```

```js
let inner;

function outer() {
  inner = function inner() {}
}
```

The case below was already done in #5312 but mentioned in #5365. It is a
FAIL case as well:
```js
function outer() {
  const inner = function inner() {}
}
```

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2024-09-16 00:09:59 -04:00
..
examples refactor(semantic)!: remove source_type argument from SemanticBuilder::new (#5553) 2024-09-06 16:40:10 +00:00
fixtures test: add trailing line breaks to conformance fixtures (#5541) 2024-09-06 12:55:17 +00:00
src fix(linter): fix some cases on ``AssignmentExpression` for `unicorn/consistent-function-scoping`` (#5675) 2024-09-16 00:09:59 -04:00
tests
Cargo.toml release(oxlint): v0.9.5 (#5724) 2024-09-12 16:59:25 +08:00
CHANGELOG.md release(oxlint): v0.9.5 (#5724) 2024-09-12 16:59:25 +08:00