Commit graph

2320 commits

Author SHA1 Message Date
Boshen
821cc8e9c7
Release oxlint and vscode extension v0.1.1 2024-01-06 19:23:50 +08:00
Boshen
ff0d0e053a
fix(vscode): change all names to oxc_language_server 2024-01-06 19:23:08 +08:00
Boshen
3a6d986b05
Release oxlint and vscode extension v0.1.0 2024-01-06 16:44:31 +08:00
Boshen
72615877dc
feat(linter): allow "-c" configuration (#1909)
closes #1693
2024-01-06 16:32:11 +08:00
Dunqing
3b4fe0edfd
feat(semantic): allow reserved keyword defined in ts module block (#1907)
https://www.typescriptlang.org/play?target=99#code/PTAEAEBcEMCcHMCmkBcpEGcB2iAekAoECAWwHsATAVwBtE1MAmABkcYBpMd8CiwAHKgCNQAYzJYMkUAGUAKgCUAkgGE5AfQCyAeQAiAUXUA5AIKb9MtDOQAeAGQByKdEgBLUaCmwAfKAC8oPwAFgBm6hjIAISgAN58oAkJAESuJPx0JIhYkBhJ7PGJoCnZiLAh0KKIeQWJSXSQ1cSFSfwVANbQSI1gzfywrgBuLlX5TbV9ZJCIolMU3YVFgkI07vPNzm6ia7UAnq6INHOjYAC+ANy8ePxksNIx5wQU0zRwiKBY0JkYrZWgIWRkWKgAgJcSSaSpdKITLZDBoaBYHZnYGgiRSQLCFaieGI5EgsRoiElMoVeigBFIlGgIawUD1HGU-Fg9E-DpIBl41HgwL9IZTDlMwk8ybTWYCrnojbucUE7l7A4UAUnAhAA
2024-01-06 12:56:27 +08:00
Dunqing
b0569bc8e7
feat(semantic): add current_scope_flags function in SemanticBuilder (#1906) 2024-01-06 12:51:44 +08:00
Boshen
a6d9356ffa
feat(allocator): add From API (#1908)
closes #1701
2024-01-06 12:45:27 +08:00
Boshen
24d209cdd4
fix(linter): fix vue parser not working for multiple scripts after <template> (#1904) 2024-01-05 22:45:52 +08:00
zhangrunzhao
55a87b2e02
feat(linter): eslint: no-var (#1890)
This feature is primarily used to supplement eslint no-var rules

- doc:
https://github.com/eslint/eslint/blob/main/docs/src/rules/no-var.md
- code: https://github.com/eslint/eslint/blob/main/lib/rules/no-var.js
- test:
https://github.com/eslint/eslint/blob/main/tests/lib/rules/no-var.js

Co-authored-by: 张润钊 <zhangrunzhao@bytedance.com>
2024-01-05 19:52:38 +08:00
Dunqing
6c5b22f728
refactor(semantic): improve ClassTable implmention and merge properties and methods to elements (#1902) 2024-01-05 18:38:51 +08:00
Boshen
4ea6e5dc3b
fix(linter): do not check empty file for vue / astro files (#1900) 2024-01-05 16:50:26 +08:00
Boshen
497a20796c
feat(linter): parse two script tags from vue (#1899) 2024-01-05 16:44:27 +08:00
Boshen
8a3eff1bee
feat(linter): parse multiple script tags in astro file (#1898) 2024-01-05 16:36:31 +08:00
Boshen
4c5c61e5f9
feat(linter): add support for multiple script tags from vue and stro (#1897)
part of #1896
2024-01-05 16:30:32 +08:00
Cameron
064296cd43
perf(linter) reduce the number of diagnostics for no_sparse_arrays (#1895)
Partially address #1879

See there for more info. but tldr:

Printing a lot of diagnostics takes a lot of time - a lot longer than it
takes to create them

we speed up printing by producing less diagnostics.

we do this by making `no-sparse-arrays` report 1x per array instead of
1x per violation.

This does have the overhead of now every ArrayElement is processed 2x
(1x when we loop through in the rule, 1x when we loop through the ast).
But the perf reduction is negligble compared to the per production of
producing thousands of diagnostics vs 1 diagnostic.

This means that linting nodejs/node now takes ~1.5 seconds vs ~2:30
previously
2024-01-05 10:52:31 +08:00
Deivid Almeida
5f29e3f9f6
feat(linter): no irregular whitespace (#1877)
it was builded a loop that iterates in trivias.irregular-whitespace and
return the warning if contain some specific sequence of chars.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-01-05 02:47:29 +00:00
Boshen
a63490c1c0
feat(linter): support astro front matter --- block (#1893)
closes #1702
2024-01-05 10:05:43 +08:00
overlookmotel
eb2966c512
fix(parser): fix incorrectly identified directives (#1885)
Parser incorrectly identifies string literals as directives if they
follow after `import`s, `export`s, or decorators.

In all of these cases, `'use strict'` produces a directive in the AST,
where it should be parsed as an `ExpressionStatement` containing a
`StringLiteral`:

```js
import x from 'foo';
'use strict';
```

```js
export {x};
'use strict';
```

```js
@foo
'use strict';
```


[Playground](https://oxc-project.github.io/oxc/playground/?code=3YCAAIC0gICAgICAgIC0G8rnONK89ITJ3zrK%2FUP7OmSZPgHQzStr3yMtwFTU%2BD1WPt09JgqZJLoYooydbGsM5vGcf34BnIA%3D)

This PR should fix that.

I'm not sure about the decorator case, though. I assume it's not a
directive. But is prefixing a string literal with a decorator even legal
syntax anyway?

And a side nit: If I'm reading it right, I don't think the `continue`
statement in the decorator arm of the match does anything. Do I have
that right?

Last question: Where does one go about putting a test? I guess these
silly cases aren't covered by Babel etc's tests.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-01-04 13:39:15 +00:00
Boshen
11ca5c2bad
feat(linter): do not lint when vue file has no js section (#1891) 2024-01-04 21:24:19 +08:00
Boshen
d0c4100ca8
chore(cli): the oxc_cli binary has no unit tests 2024-01-04 21:20:40 +08:00
Boshen
5b652fe1db
refactor(cli): improve the code around lint-staged handling (#1889) 2024-01-04 20:50:59 +08:00
Boshen
97fa3934a6
deps(rust): bump deps (#1888) 2024-01-04 20:41:31 +08:00
Dunqing
f1b433b126
feat(playground): visualize symbol (#1886)
close: https://github.com/oxc-project/oxc/issues/1048
2024-01-04 15:36:31 +08:00
Wenzhe Wang
45156443ed
refactor(linter): get js code slice from vue source code (#1876) 2024-01-04 12:06:04 +08:00
Clark Fischer
d88d76fdb8
Prioritize ignored paths when linting (#1878)
As discussed in #1124

A common workflow is running `oxlint` automatically via something like
lint-staged, which passes all changed file paths explicitly as CLI
arguments. The ignore crate auto-whitelists explicit paths, overriding
anything defined in an ignore file, leading to files that should be
ignored causing CI and VC hooks to fail.

eslint avoids this issue by giving precedence to .eslintignore unless
you pass `--no-ignore`.

Since `ignore` doesn't really give much control over this, the most
effective solution seems to be filtering. ~~Once we've got a list of
files to be linted, we can compare each against the .eslintignore and
see if it really truly should be linted.~~

~~Unfortunately, this is sort of a naive solution. Ignored directories
will still be walked, then filtered out after the fact. Changing this
behavior at the walker level would affect the formatter, which probably
isn't desirable.~~ (edit: The performance impact has been mostly
resolved.)

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2024-01-04 03:44:10 +00:00
Dunqing
45a7985524
feat(playground): visualize scope (#1882)
Partial support https://github.com/oxc-project/oxc/issues/1048
2024-01-03 16:10:42 +08:00
Dunqing
dae5f628b0
perf(semantic): check duplicate parameters in Binder of FormalParameters (#1840) 2024-01-03 12:57:03 +08:00
IWANABETHATGUY
56e620b1bb
chore(lsp): normalize the lsp naming (#1873)
1. Fallback logic about `document/didChangeConfiguration`
2. normalize vscode naming
3. change `configuration` section name from `oxc-client` to
`oxc_langauge_server`.
2024-01-03 11:48:18 +08:00
Boshen
e914159851
chore: fix typos 2024-01-03 11:44:04 +08:00
Dunqing
c3090c2c70
fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs (#1874)
close: https://github.com/oxc-project/oxc/issues/1870#issue-2061901976
2024-01-03 11:34:14 +08:00
Yuto Yoshino
8a1e894330
feat(linter): eslint-plugin-jsx-a11y prefer-tag-over-role (#1831)
Part of: https://github.com/oxc-project/oxc/issues/1141

Based on
- doc: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/prefer-tag-over-role.md
- code: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/prefer-tag-over-role.js
- test: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/prefer-tag-over-role-test.js
2024-01-02 12:55:09 +00:00
IWANABETHATGUY
2505fdb1ef
chore(lsp): enable oxc lsp by default (#1872) 2024-01-02 16:12:08 +08:00
IWANABETHATGUY
96b8f8f80c
fix(lsp): panic when open file not under workspace root (#1871)
Closed #1868
2024-01-02 12:35:21 +08:00
overlookmotel
62bc8c5cea
fix(parser): error on source larger than 4 GiB (#1860)
`Token` and `Span` both represent `start` and `end` as `u32`.

This limits size of source which can be parsed to `u32::MAX`.


19577709db/crates/oxc_span/src/span.rs (L14-L20)

However, this constraint is currently not enforced.

In a release build, code will not panic on arithmetic overflow, so
`start`/`end` could wrap around back to zero if source is 4 GiB or more.

That'd produce nonsense spans. But worse, the lexer relies in some
places on `self.current.token.start` being correct, so if the value
wrapped around, possibly it'd keep rewinding to the start of the source
and lexing it again, causing an infinite loop.

In worst case, if for some reason an application's public API used OXC's
parser with user-supplied source code (parser-as-a-service!), this could
be exploited for denial of service.

This PR adds an assertion to catch this at the start of parsing instead.

This does add an extra instruction, but I imagine the effect will be
negligible compared to the work required to parse the code.
2024-01-02 11:05:28 +08:00
dependabot[bot]
8374197a08
chore(deps): bump handlebars from 4.5.0 to 5.0.0 (#1866) 2024-01-02 11:03:05 +08:00
Ken-HH24
2ac26303e0
feat(linter): eslint-plugin-jsx-a11y mouse-events-have-key-events (correctness) (#1867)
Part of #1141

Based on:
 - https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md
 - https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/mouse-events-have-key-events.js
2024-01-01 11:26:49 +00:00
dependabot[bot]
c16821a55f
chore(deps): bump the dependencies group with 11 updates (#1865)
Bumps the dependencies group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.71` |
`1.0.73` |
| [quote](https://github.com/dtolnay/quote) | `1.0.33` | `1.0.34` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.108` | `1.0.109`
|
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.51` |
`1.0.53` |
| [is-terminal](https://github.com/sunfishcode/is-terminal) | `0.4.9` |
`0.4.10` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.6.4` | `2.7.1` |
| [syn](https://github.com/dtolnay/syn) | `2.0.43` | `2.0.44` |
| [ouroboros](https://github.com/joshua-maros/ouroboros) | `0.18.1` |
`0.18.2` |
| [similar](https://github.com/mitsuhiko/similar) | `2.3.0` | `2.4.0` |
| [napi](https://github.com/napi-rs/napi-rs) | `2.14.1` | `2.14.2` |
| [napi-derive](https://github.com/napi-rs/napi-rs) | `2.14.4` |
`2.14.6` |

Updates `proc-macro2` from 1.0.71 to 1.0.73
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/proc-macro2/releases">proc-macro2's
releases</a>.</em></p>
<blockquote>
<h2>1.0.73</h2>
<ul>
<li>Documentation improvements</li>
</ul>
<h2>1.0.72</h2>
<ul>
<li>Improve build script to be robust to proc_macro::Span unstable API
changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4dce5d7ebd"><code>4dce5d7</code></a>
Release 1.0.73</li>
<li><a
href="708540bec1"><code>708540b</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/431">#431</a>
from dtolnay/doccfg</li>
<li><a
href="014fa8243f"><code>014fa82</code></a>
Restore documented cfg on LineColumn</li>
<li><a
href="df4fa83806"><code>df4fa83</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/430">#430</a>
from dtolnay/nightlyci</li>
<li><a
href="75897cfc99"><code>75897cf</code></a>
Make CI verify that proc_macro_span works in latest nightly</li>
<li><a
href="643cb897d7"><code>643cb89</code></a>
Release 1.0.72</li>
<li><a
href="3db197755b"><code>3db1977</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/429">#429</a>
from dtolnay/probe</li>
<li><a
href="a961baeb81"><code>a961bae</code></a>
Test for the specific proc_macro_span API expected by proc-macro2</li>
<li><a
href="784ae2e18a"><code>784ae2e</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/428">#428</a>
from dtolnay/cargoenvvar</li>
<li><a
href="8ade7dacec"><code>8ade7da</code></a>
Require cargo promised environment variables to be present</li>
<li>See full diff in <a
href="https://github.com/dtolnay/proc-macro2/compare/1.0.71...1.0.73">compare
view</a></li>
</ul>
</details>
<br />

Updates `quote` from 1.0.33 to 1.0.34
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/quote/releases">quote's
releases</a>.</em></p>
<blockquote>
<h2>1.0.34</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c777ce6fc1"><code>c777ce6</code></a>
Release 1.0.34</li>
<li><a
href="e9cb3c25f3"><code>e9cb3c2</code></a>
Pull in proc-macro2 build script improvement</li>
<li><a
href="f8fc16dc18"><code>f8fc16d</code></a>
Test docs.rs documentation build in CI</li>
<li><a
href="3a9d31fd45"><code>3a9d31f</code></a>
Update actions/checkout@v3 -&gt; v4</li>
<li><a
href="fe2dec4258"><code>fe2dec4</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/quote/issues/262">#262</a>
from dtolnay/syn2</li>
<li><a
href="5d33628e98"><code>5d33628</code></a>
Update syn 1.0 link to syn 2.0</li>
<li>See full diff in <a
href="https://github.com/dtolnay/quote/compare/1.0.33...1.0.34">compare
view</a></li>
</ul>
</details>
<br />

Updates `serde_json` from 1.0.108 to 1.0.109
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.109</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f88bf1fccb"><code>f88bf1f</code></a>
Release 1.0.109</li>
<li><a
href="bb62c73ece"><code>bb62c73</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1097">#1097</a>
from serde-rs/doccfg</li>
<li><a
href="df36d109fd"><code>df36d10</code></a>
Restore doc cfg on re-exports</li>
<li><a
href="c367091342"><code>c367091</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1095">#1095</a>
from dtolnay/hashtest</li>
<li><a
href="b328ee7df4"><code>b328ee7</code></a>
Eliminate hash closure in favor of calling hash_one directly</li>
<li><a
href="b9bcbad3c0"><code>b9bcbad</code></a>
Use BuildHasher::hash_one</li>
<li><a
href="7ff6c9e30c"><code>7ff6c9e</code></a>
Use random hasher state for number hashing test</li>
<li><a
href="fe031cd1de"><code>fe031cd</code></a>
Delete trace_macros! functionality from test</li>
<li><a
href="05196caf16"><code>05196ca</code></a>
Update ui test suite to nightly-2023-11-19</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.108...v1.0.109">compare
view</a></li>
</ul>
</details>
<br />

Updates `thiserror` from 1.0.51 to 1.0.53
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/thiserror/releases">thiserror's
releases</a>.</em></p>
<blockquote>
<h2>1.0.53</h2>
<ul>
<li>Reduce spurious rebuilds under RustRover IDE when using a nightly
toolchain (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/270">#270</a>)</li>
</ul>
<h2>1.0.52</h2>
<ul>
<li>Fix interaction with RUSTC_BOOTSTRAP (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/269">#269</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="af28d9c078"><code>af28d9c</code></a>
Release 1.0.53</li>
<li><a
href="c22822cd8c"><code>c22822c</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/275">#275</a>
from dtolnay/probers</li>
<li><a
href="87223991b7"><code>8722399</code></a>
Rerun build script on changes to probe.rs</li>
<li><a
href="0e280fe61d"><code>0e280fe</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/274">#274</a>
from dtolnay/bootstrap</li>
<li><a
href="f334cfcdc1"><code>f334cfc</code></a>
Do not rebuild on RUSTC_BOOTSTRAP changes on nightly compiler</li>
<li><a
href="5fd95375e3"><code>5fd9537</code></a>
Update crate name used for build script probe</li>
<li><a
href="a9b1585343"><code>a9b1585</code></a>
Move ExitStatus::success check into compile_probe()</li>
<li><a
href="0f349a4bb1"><code>0f349a4</code></a>
Remove needless_raw_string_hashes clippy pedantic suppression from build
script</li>
<li><a
href="c1c003f2a3"><code>c1c003f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/273">#273</a>
from dtolnay/cargoenvvar</li>
<li><a
href="9b7356fd43"><code>9b7356f</code></a>
Require cargo promised environment variables to be present</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.53">compare
view</a></li>
</ul>
</details>
<br />

Updates `is-terminal` from 0.4.9 to 0.4.10
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c3b72b5767"><code>c3b72b5</code></a>
chore: Release is-terminal version 0.4.10</li>
<li><a
href="6c8aff6f8c"><code>6c8aff6</code></a>
windows-sys 0.52 (<a
href="https://redirect.github.com/sunfishcode/is-terminal/issues/32">#32</a>)</li>
<li>See full diff in <a
href="https://github.com/sunfishcode/is-terminal/compare/v0.4.9...v0.4.10">compare
view</a></li>
</ul>
</details>
<br />

Updates `memchr` from 2.6.4 to 2.7.1
<details>
<summary>Commits</summary>
<ul>
<li><a
href="31c1e7911e"><code>31c1e79</code></a>
2.7.1</li>
<li><a
href="d9ac66d726"><code>d9ac66d</code></a>
api: impl Clone for FindRevIter</li>
<li><a
href="8957028d16"><code>8957028</code></a>
benchmarks/engines/rust-memchr: complete bump to 2.7.0</li>
<li><a
href="5caaf3e736"><code>5caaf3e</code></a>
benchmarks/engines/rust-memchr: bump to 2.7.0</li>
<li><a
href="b93d817ea6"><code>b93d817</code></a>
2.7.0</li>
<li><a
href="8b62928c7b"><code>8b62928</code></a>
cargo: remove unused exclusions</li>
<li><a
href="a22b2df27d"><code>a22b2df</code></a>
ci: update to wasmtime 15</li>
<li><a
href="bce19408dd"><code>bce1940</code></a>
benchmarks/engines/bytecount: revert to 0.6.4</li>
<li><a
href="2f5d8c4842"><code>2f5d8c4</code></a>
benchmarks: fix wasmtime command</li>
<li><a
href="e77f0bf07a"><code>e77f0bf</code></a>
arch: simplify and improve is_equal_raw</li>
<li>Additional commits viewable in <a
href="https://github.com/BurntSushi/memchr/compare/2.6.4...2.7.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `syn` from 2.0.43 to 2.0.44
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/syn/releases">syn's
releases</a>.</em></p>
<blockquote>
<h2>2.0.44</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="58b42f5264"><code>58b42f5</code></a>
Release 2.0.44</li>
<li><a
href="4523437760"><code>4523437</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1569">#1569</a>
from dtolnay/cfgvisit</li>
<li><a
href="694a1bb661"><code>694a1bb</code></a>
Render doc cfg on Visit/VisitMut/Fold trait methods</li>
<li><a
href="1728630caa"><code>1728630</code></a>
Add doc cfg on Error::new_spanned</li>
<li><a
href="649e4266ae"><code>649e426</code></a>
Mark exprs which are not parsed in &quot;derive&quot; mode as
&quot;full&quot;-only</li>
<li><a
href="6c4627f24a"><code>6c4627f</code></a>
Fill in missing doc cfg on Expr and Pat nodes</li>
<li><a
href="1cea0bef11"><code>1cea0be</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1568">#1568</a>
from dtolnay/doccfg</li>
<li><a
href="dc2153d04e"><code>dc2153d</code></a>
Restore doc cfg on re-exports</li>
<li><a
href="e2b6ebc55b"><code>e2b6ebc</code></a>
Fix typo in ast_enum cfg</li>
<li><a
href="a193361b83"><code>a193361</code></a>
Fix unused_macros warning on ast_enum when features are disabled</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/syn/compare/2.0.43...2.0.44">compare
view</a></li>
</ul>
</details>
<br />

Updates `ouroboros` from 0.18.1 to 0.18.2
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/joshua-maros/ouroboros/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `similar` from 2.3.0 to 2.4.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md">similar's
changelog</a>.</em></p>
<blockquote>
<h2>2.4.0</h2>
<ul>
<li>Fixed a bug where the LCS diff algorithm didn't always call
<code>D::finish</code>. (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/58">#58</a>)</li>
<li>Fixed a bug in LCS that caused a panic if the common prefix and the
common suffix overlapped. (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/59">#59</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ace8f34a27"><code>ace8f34</code></a>
2.4.0</li>
<li><a
href="e9a05ed6fa"><code>e9a05ed</code></a>
Fix overlap bug in LCS (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/59">#59</a>)</li>
<li><a
href="18712783da"><code>1871278</code></a>
Always call finish (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/58">#58</a>)</li>
<li><a
href="f5c1afa8f4"><code>f5c1afa</code></a>
Use unwrap_or (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/56">#56</a>)</li>
<li><a
href="2b31f65445"><code>2b31f65</code></a>
doc(inline/iter_strings_lossy): describe different behaviors (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/52">#52</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/similar/compare/2.3.0...2.4.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi` from 2.14.1 to 2.14.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/napi-rs/napi-rs/releases">napi's
releases</a>.</em></p>
<blockquote>
<h2><code>@​napi-rs/cli</code><a
href="https://github.com/2"><code>@​2</code></a>.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix CARGO env var in <code>napi build</code> by <a
href="https://github.com/overlookmotel"><code>@​overlookmotel</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1426">napi-rs/napi-rs#1426</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.10.5...@napi-rs/cli@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi@2.10.5...<code>@​napi-rs/cli</code><code>@​2.14.2</code></a></p>
<h2>napi-derive@2.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): compile warning by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1820">napi-rs/napi-rs#1820</a></li>
<li>fix(napi): compile error for wasm32-unknown-unknown target by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1822">napi-rs/napi-rs#1822</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2</a></p>
<h2>napi@2.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>test(napi): decrease the worker sizes on Linux x64 musl platform by
<a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1823">napi-rs/napi-rs#1823</a></li>
<li>fix(napi): apply clippy suggestions by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1878">napi-rs/napi-rs#1878</a></li>
<li>chore(napi): add status to error messages in AsyncWork by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1880">napi-rs/napi-rs#1880</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="03eb476cef"><code>03eb476</code></a>
Release independent packages</li>
<li><a
href="f47cc72749"><code>f47cc72</code></a>
chore(release): publish</li>
<li><a
href="f29801686b"><code>f298016</code></a>
fix(cli): copy binding files into wasi packages (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1881">#1881</a>)</li>
<li><a
href="65273a4631"><code>65273a4</code></a>
chore(napi): add status to error messages in AsyncWork (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1880">#1880</a>)</li>
<li><a
href="f2972c743f"><code>f2972c7</code></a>
chore(release): publish</li>
<li><a
href="e175e6fbd6"><code>e175e6f</code></a>
fix(deps): update dependency emnapi to v0.45.0 (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1879">#1879</a>)</li>
<li><a
href="dc79bb86d0"><code>dc79bb8</code></a>
chore(release): publish</li>
<li><a
href="b0ba466f95"><code>b0ba466</code></a>
fix(cli): also load wasm file from packages (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1876">#1876</a>)</li>
<li><a
href="f62685e836"><code>f62685e</code></a>
fix(cli): exclude node_modules in artifacts command (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1875">#1875</a>)</li>
<li><a
href="67743b1046"><code>67743b1</code></a>
fix(cli): exclude node_modules in artifacts command</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-derive` from 2.14.4 to 2.14.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/napi-rs/napi-rs/releases">napi-derive's
releases</a>.</em></p>
<blockquote>
<h2>napi-derive@2.14.6</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): proc-macro crash on enum by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1870">napi-rs/napi-rs#1870</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6">https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6</a></p>
<h2>napi-derive@2.14.5</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): catch_unwind on constructor by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1869">napi-rs/napi-rs#1869</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24...napi-derive@2.14.5">https://github.com/napi-rs/napi-rs/compare/<code>@​napi-rs/cli</code><code>@​3.0.0-alpha.24...napi-derive@2.14.5</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5825dcc3a6"><code>5825dcc</code></a>
Release independent packages</li>
<li><a
href="84f3092d70"><code>84f3092</code></a>
fix(napi-derive): proc-macro crash on enum (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1870">#1870</a>)</li>
<li><a
href="85807ad790"><code>85807ad</code></a>
Release independent packages</li>
<li><a
href="02dd4c3fd3"><code>02dd4c3</code></a>
fix(napi-derive): catch_unwind on constructor (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1869">#1869</a>)</li>
<li><a
href="b411b87872"><code>b411b87</code></a>
chore(release): publish</li>
<li><a
href="c42f00ff43"><code>c42f00f</code></a>
feat(cli): support wasi target test &amp; release workflow (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1867">#1867</a>)</li>
<li><a
href="bac8ea0e4d"><code>bac8ea0</code></a>
chore(release): publish</li>
<li><a
href="edba0cbd6c"><code>edba0cb</code></a>
chore(cli): root directory access permissions (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1864">#1864</a>)</li>
<li><a
href="c3eeba1e34"><code>c3eeba1</code></a>
chore(cli): change warning message to yellow</li>
<li><a
href="5f7e170697"><code>5f7e170</code></a>
chore(release): publish</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.4...napi-derive@2.14.6">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 08:06:33 +00:00
Wenzhe Wang
ec9598cefc
test(cli): add simple integration test for vue file (#1863) 2023-12-31 22:37:26 +08:00
Wenzhe Wang
665f818217
feat(vscode): support lint vue file (#1842)
![CleanShot 2023-12-27 at 22 56 34@2x](https://github.com/oxc-project/oxc/assets/33973865/189cc7e5-91e9-4f25-bd9c-14d663387870)
2023-12-31 22:31:26 +08:00
Wenzhe Wang
3d4163795e
feat(linter): add Vue loader (#1814) 2023-12-31 22:25:26 +08:00
Wenzhe Wang
0feeac540d
feat(lint): add partial loader register (#1760) 2023-12-31 22:19:27 +08:00
Dunqing
bfd5cd92a6
refactor(semantic): improve check function declaration implementation (#1854) 2023-12-31 22:17:56 +08:00
Wenzhe Wang
8f27a98468
feat(cli): support walk vue and astro (#1745) 2023-12-31 22:15:11 +08:00
Qix
adfe24e965
fix(ast): implement GetSpan for JSXElement (#1861) 2023-12-31 22:08:11 +08:00
Valerii Smirnov
ba0a4a890a
feat(linter): eslint-plugin-react: jsx-no-undef (#1862)
Part of #1022 
Based on:
- doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
- code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-no-undef.js
- test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/jsx-no-undef.js
2023-12-31 11:57:44 +00:00
msdlisper
b2a62ddaa2
fix(linter): error rule config in media_has_caption (#1864)
fix error rule config
```
serde_json::json!({
    "audio": [ "Audio" ],
    "video": [ "Video" ],
    "track": [ "Track" ],
})
```
to
```
serde_json::json!([{
    "audio": [ "Audio" ],
    "video": [ "Video" ],
    "track": [ "Track" ],
}])
```

based on the eslint docs, if a rule configuration is passed, it has to
look like `<RULE NAME>: [<SEVERITY>, config]`
2023-12-31 10:55:25 +00:00
msdlisper
1ddbe8f12d
fix(linter): unexpected unwrap panic (#1856)
While reviewing the code, I noticed that a panic will occur if the
object does not have the 'ignoreNonDOM' key, which is unexpected. And I
have moved out the code `no_focus.set_option(true);` to make the
function cleaner.
2023-12-31 12:09:58 +08:00
Deivid Almeida
c1cfd1759e
feat(linter): no-irregular-whitespace rule (#1835)
Parser, trivias and trivias_builder were edited to get all whitespaces.
Now Trivias struct store comments and whitespaces Vec. After that, i
will implement the no-irregular-whitespace rule.

P.S.: There isn't a way to implement this feature without lose a little
bit of performance, comparing with my last PR #1819 to minimax this
trouble instead of store the irregular whitespace as Span it was stored
as u32, i removed a map iterator and removed too a unused function. If
you have a suggestion about it pls give me a feedback.
2023-12-31 12:05:38 +08:00
Rintaro Itokawa
36cb7c53c5
feat(linter): eslint-plugin-jsx-a11y: aria-unsupported-elements
Based on:
- docs:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/aria-unsupported-elements.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/aria-unsupported-elements-test.js
2023-12-30 11:18:44 +00:00
msdlisper
1c695aee3a
refactor(linter) remove duplicated code in media-has-caption (#1859) 2023-12-30 11:17:19 +00:00