Commit graph

2357 commits

Author SHA1 Message Date
Boshen
897869b6d4
Revert "feat(linter): eslint-plugin-jsx-a11y role-support-aria-props" (#1960)
Reverts oxc-project/oxc#1949
2024-01-09 12:41:22 +08:00
Rintaro Itokawa
fd5856e5d1
feat(linter): eslint-plugin-jsx-a11y role-support-aria-props (#1949)
## Summary

partof: #1141 

I re-implemented role-support-aria-props rule for jsx_a11y.

originals:

- docs:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/role-supports-aria-props.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/role-supports-aria-props-test.js
2024-01-09 12:23:24 +08:00
Cameron
0bcc9e7e6b
feat(linter) eslint-plugin-next no-head-import-in-document (#1957) 2024-01-09 11:41:31 +08:00
Cameron
d9ca086eb6
feat(linter) add support for custom filenames in tests (#1955) 2024-01-09 11:35:34 +08:00
Cameron
18d1c29a62
feat(linter) eslint-plugin-next no-script-component-in-head (#1954) 2024-01-09 11:29:32 +08:00
Cameron
039e6fc9c5
feat(linter) eslint-plugin-next no-sync-scripts (#1953) 2024-01-09 11:22:27 +08:00
Cameron
a3754e20ca
feat(linter) eslint-plugin-next no-title-in-document-head (#1952) 2024-01-09 11:16:42 +08:00
Bradley Farias
ff9cf292dc
ensure numbers without a raw are allocated during codegen (#1950)
This was incorrectly using raw for dynamically generated numbers like in
the minifier (
6e0bd52af1/crates/oxc_minifier/src/compressor/fold.rs (L280)
).

This ensures they are dynamically generated during codegen.

This does not investigate why `just example minifier` does not take the
`if MINIFY` branch.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-01-09 11:13:25 +08:00
Cameron
bce9060095
feat(linter) eslint-plugin-next no-img-element (#1951) 2024-01-09 11:12:01 +08:00
Cameron
ac3b44bd0c
feat: nextjs plugin (#1948)
https://github.com/oxc-project/oxc/issues/1929#issuecomment-1880369624
2024-01-09 11:08:11 +08:00
Boshen
6e0bd52af1
refactor(parser): remove TokenValue::Number from Token (#1945)
This PR is part of #1880.

Token size is reduced from 40 to 32 bytes.
2024-01-08 16:29:03 +08:00
IWANABETHATGUY
84dc690c40
feat: oxc ls support read configuration (#1940)
1. Closed #1815
2. Very basically support configuration, could improve in the future
since our config is still under experimental.


![image](https://github.com/oxc-project/oxc/assets/17974631/6834c32f-586e-4fca-adc1-dfbeaadfaa3c)**config**
```json
{
  "rules": {
    "no-console": [
      "error",
      {
        "allow": [
          "info"
        ]
      }
    ]
  }
}
```
2024-01-08 15:10:49 +08:00
Dunqing
b50c5ec623
fix(parser): unexpected ts type annotation in get/set (#1942)
fix: https://github.com/oxc-project/oxc/issues/1939
2024-01-08 15:07:43 +08:00
dependabot[bot]
b97a536df7
chore(deps): bump the dependencies group with 5 updates (#1943) 2024-01-08 14:54:17 +08:00
Boshen
08438e04ba
refactor(parser): remove TokenValue::RegExp from Token (#1926)
This PR is part of #1880.

`Token` size is reduced from 48 to 40 bytes.

To reconstruct the regex pattern and flags within the parser , the regex
string is
re-parsed from the end by reading all valid flags.

In order to make things work nicely, the lexer will no longer recover
from a invalid regex.
2024-01-08 13:48:52 +08:00
Cameron
73a5b7f7da
feat(linter) eslint-plugin-next no-css-tags (#1937) 2024-01-08 12:38:53 +08:00
Boshen
7eb2573178
refactor(parser): parse BigInt lazily (#1924)
This PR partially fixes #1803 and is part of #1880.

BigInt is removed from the `Token` value, so that the token size can be
reduced once we removed all the variants.

`Token` is now also `Copy`, which removes all the `clone` and `drop`
calls.

This yields 5% performance improvement for the parser.
2024-01-08 12:37:20 +08:00
Cameron
149f53edd6
feat(linter) eslint-plugin-next no-async-client-component (#1936) 2024-01-08 12:13:27 +08:00
Cameron
c06d939460
feat(linter) eslint-plugin-next no-assign-module-variable (#1935) 2024-01-08 12:09:32 +08:00
Cameron
0f15099f6f
feat(linter) eslint-plugin-next next-script-for-ga (#1934) 2024-01-08 12:04:32 +08:00
Cameron
0475bcbd92
feat(linter) eslint-plugin-next inline-script-id (#1933) 2024-01-08 11:59:47 +08:00
Cameron
3d00d31c1e
feat(linter) eslint-plugin-next google-font-preconnect (#1932) 2024-01-08 11:54:30 +08:00
Cameron
d24738d3fc
feat(linter) eslint-plugin-next google-font-display (#1931) 2024-01-08 11:49:40 +08:00
IWANABETHATGUY
fe48bfae0c
feat(lsp): support vue, astro and svelte (#1923)
![image](https://github.com/oxc-project/oxc/assets/17974631/7d49b2a7-b587-45a9-8736-875a2e60f06e)
Closed https://github.com/oxc-project/oxc/issues/1915
2024-01-08 11:38:25 +08:00
Valerii Smirnov
c6eb519417
feat(linter): eslint-plugin-react: no-unknown-property (#1875)
Based on:
- tests: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/no-unknown-property.js
- docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
- code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-unknown-property.js
2024-01-07 12:23:32 +00:00
Wenzhe Wang
f46ed71d8a
feat(tasks): add eslint-plugin-next rulegen (#1921)
closes: #1905

Support generate rules from
[eslint-plugin-next](https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-plugin).
2024-01-07 10:23:22 +08:00
Boshen
e550b4bd97
ci(release_oxlint): try fix broken version tag 2024-01-07 01:07:50 +08:00
Boshen
4a9e0c4bf4
Release oxlint and vscode extension v0.1.2 2024-01-07 00:55:21 +08:00
Boshen
c2e8ef56a5
feat(linter): disable no-unused-labels for svelte (#1919) 2024-01-07 00:25:52 +08:00
Boshen
f2ed83ca3b
feat(linter): <script> part of svelte file (#1918)
closes #1914
2024-01-07 00:13:44 +08:00
Boshen
98a2d60cde
refactor(language_server): remove unused code (#1917) 2024-01-07 00:07:04 +08:00
Boshen
450791ddc2
refactor(linter): rename *_partial_loader files (#1916) 2024-01-06 23:56:31 +08:00
Boshen
bb6128bfa8
fix(linter): change no-var to restriction 2024-01-06 23:33:11 +08:00
Cameron
8e4b6d9d7c
fix(linter) fix eslint config for filename case (#1913) 2024-01-06 23:32:20 +08:00
IWANABETHATGUY
f30f6efcdd
chore: add some useful informantion log (#1912)
1. Use `log::info` to print some informantion which we would want to
display in release mode,
2. Add config to switch back `debug` log level in development mode.
2024-01-06 22:30:01 +08:00
Boshen
0c5645097d
chore(vscode): add some debug logs 2024-01-06 20:32:24 +08:00
Boshen
42e7557f63
ci: don't generate release notes after release
They'll blow up github because the it'll generate a log for all commits,
since it doesn't know the commit range.
2024-01-06 19:58:22 +08:00
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