Boshen
217594d21f
ci: setup sccache ( #3403 )
2024-05-25 23:38:43 +08:00
Wang Wenzhe
5c7041bd2a
docs(linter): add docs for consistent-indexed-object-style ( #3409 )
...
I forgot to update the docs in #3126 .
2024-05-25 18:34:11 +08:00
magic-akari
74b06a71da
fix(linter): Accept more valid regex ( #3408 )
...
- Closes : #3405
2024-05-25 18:33:56 +08:00
Todor Andonov
aa26ce9151
feat(linter): @typescript-eslint/consistent-indexed-object-style ( #3126 )
...
implements
https://typescript-eslint.io/rules/consistent-indexed-object-style/
2024-05-25 17:03:00 +08:00
Boshen
d971c9cd0b
Release oxlint and vscode extension v0.4.1
2024-05-24 18:03:13 +08:00
Boshen
6078a6d292
fix(parser): fix lexer error while parsing parenthesized arrow expressions ( #3400 )
...
closes #3399
2024-05-24 09:59:17 +00:00
overlookmotel
bcdc658bbb
feat(transformer): add TraverseCtx::generate_uid ( #3394 )
...
Add `TraverseCtx::generate_uid` method.
This is modelled on Babel's `scope.generateUid()` method. As discussed
in
https://github.com/oxc-project/oxc/discussions/3251#discussioncomment-9416826 ,
this is required to fix most of the remaining failing tests in
transformer Milestone 1.
I have implemented this to work as closely as possible to Babel, so that
it will generate same output as Babel for our tests. However, as
mentioned in the code comments, this means it's a pretty expensive
function to call. Those code comments suggest 2 ways in which we could
make it much more efficient, but we'd need to decide how we're going to
handle divergence from Babel before we can decide which route to go.
I've left it as a `TODO(improve-on-babel)` for now.
2024-05-24 17:19:02 +08:00
Boshen
12cabaceaa
fix: fix oxc_module_lexer pointing to wrong path in Cargo.toml
2024-05-24 16:38:19 +08:00
Boshen
e5337f00b1
Release oxlint and vscode extension v0.4.0
2024-05-24 15:07:10 +08:00
Boshen
68c1bf4018
ci: disable the flaky semantic benchmark
2024-05-24 15:01:11 +08:00
Yuji Sugiura
b6e2d623d8
feat(linter/jsdoc): Implement require-returns-description ( #3397 )
...
Part of #1170
>
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md
2024-05-24 14:09:05 +08:00
Boshen
ed54eca119
chore(justfile): remove cargo-edit in favor of renovate bot
2024-05-24 13:50:40 +08:00
Boshen
101f7af201
chore(justfile): add website codegen command
2024-05-24 13:47:35 +08:00
Boshen
9377a60677
chore(linter): write json schema to npm/oxlint
2024-05-24 13:28:03 +08:00
Boshen
5bf595d6f7
refactor(linter): rename variable names prefix ESLint to Oxlint
2024-05-24 12:58:27 +08:00
Boshen
809e4fc03f
chore(website): snapshot cli and json schema output
2024-05-24 12:23:43 +08:00
Boshen
ecdffcff19
feat(linter): temporary move react/require-render-return to nursery
2024-05-24 11:46:39 +08:00
mysteryven
d8c318752e
refactor(linter): remove unnecessary check in eslint/no-global-assign ( #3391 )
...
Looks like we don't need check this, as unresolved references don't have `symbolId`: bb25c54b94/crates/oxc_semantic/src/builder.rs (L292-L303)
2024-05-24 02:34:18 +00:00
mysteryven
b8997f595b
feat(linter): eslint/no-restricted-globals ( #3390 )
2024-05-24 02:30:11 +00:00
Boshen
79811ca270
feat(linter): change jsdoc/require-returns from correctness to pedantic
2024-05-24 00:13:59 +08:00
Boshen
f482ea7167
Revert "feat(linter): change jsdoc/require-render-return from correctness to pedantic"
...
This reverts commit 8a1db6738c .
2024-05-23 22:14:45 +08:00
Boshen
c664c6c264
fix(linter): no-new false positive when return from arrow expression ( #3393 )
2024-05-23 14:08:33 +00:00
Boshen
8a1db6738c
feat(linter): change jsdoc/require-render-return from correctness to pedantic
2024-05-23 21:21:27 +08:00
Jovi De Croock
fbccd1fcb2
fix(linter): only report issues on top-level fragment ( #3389 )
...
Fixes https://github.com/oxc-project/oxc/issues/3388
The snapshots were conveying this bug already on the `fail` case with
https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/rules/react/jsx_key.rs#L410
2024-05-23 13:12:19 +00:00
Yuji Sugiura
3a5f088ca3
feat(linter/jsdoc): Implement require-returns rule ( #3218 )
...
Part of #1170
>
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md
2024-05-23 21:12:10 +08:00
Boshen
ff4252a201
feat(website): improve codegen to linter cli
2024-05-23 20:57:13 +08:00
Boshen
3671b5c4d0
feat(tasks/website): code generate the linter rules
2024-05-23 15:21:37 +08:00
Boshen
ead637bf50
feat(website): generate linter configuration page
2024-05-23 12:07:17 +08:00
Boshen
57d2bcacea
feat(tasks/website): start generating linter config markdown from json schema ( #3386 )
2024-05-22 16:09:33 +00:00
underfin
82c21f38f6
chore(sourcemap): make JSONSourceMap fileds public ( #3385 )
2024-05-22 20:15:24 +08:00
Boshen
c8e3ca0816
ci: add secret CARGO_REGISTRY_TOKEN to cargo publish
2024-05-22 18:19:40 +08:00
Boshen
86beca5379
Release crates v0.13.1
2024-05-22 16:50:30 +08:00
Jelle van der Waa
9744707b3b
feat(linter/eslint): Implement default_case rule ( #3379 )
...
Rule Detail:
[link](https://eslint.org/docs/latest/rules/default-case )
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-05-22 16:49:02 +08:00
Boshen
e2dd8ac8fc
feat(syntax): export is_reserved_keyword and is_global_object method ( #3384 )
2024-05-22 04:58:04 +00:00
Dunqing
bb2221e4f4
fix(linter/next): false positives for non-custom font link ( #3383 )
...
fix : #3378
They only check google fonts.
7e34b4cf98/packages/eslint-plugin-next/src/rules/no-page-custom-font.ts (L152-L154)
2024-05-22 12:01:14 +08:00
rzvxa
78e6326e48
refactor(semantic/cfg): alias petgraph's NodeIndex as BasicBlockId. ( #3380 )
...
Hides petgraph's general `NodeIndex` type behind `BasicBlockId`.
2024-05-22 03:09:38 +00:00
Boshen
40ab95b055
feat(tasks): add website tasks ( #3377 )
...
Adds the following tasks so we can use them in the website repo to generate documentations.
`cargo run -p website`
* linter-cli
* linter-rules
* linter-json-schema
2024-05-21 17:46:07 +00:00
Boshen
fe208ddef6
feat(linter): start adding json schema for configuration file ( #3375 )
2024-05-22 00:35:29 +08:00
Boshen
1e84644220
chore: update toml format
2024-05-21 22:15:47 +08:00
Ali Rezvani
bb25c54b94
improvement(semantic/cfg): add the ControlFlowGraphBuilder. ( #3372 )
...
It is a simple change, Before this, we had a lot of fields in our
control flow graph that were only used during the build process. This PR
aims to simplify the ControlFlowGraph.
PS: Sorry for the long branch name, Apprerantly graphite gets confused
when you write the commit body using the `gt create` command.
2024-05-21 19:36:42 +08:00
overlookmotel
fdb31c39c9
perf(parser): more efficient number parsing ( #3342 )
...
Follow-on after #3296 .
Make parsing binary/octal/hex numeric literals a little more efficient.
These changes all rely on that we know more than the compiler does -
that strings passed to these `parse_*` functions can only contain a
certain set of characters.
2024-05-21 10:53:52 +08:00
overlookmotel
e7a6595cd8
refactor(transformer): correct spelling of var name ( #3369 )
...
Just correct a typo.
2024-05-21 01:03:40 +08:00
Jelle van der Waa
74be8b146c
feat(linter/eslint): Implement no-new ( #3368 )
...
Rule Detail:
[link](https://eslint.org/docs/latest/rules/no-new )
2024-05-21 00:28:04 +08:00
overlookmotel
2b5b3fd22a
refactor(traverse): split context code into multiple files ( #3367 )
...
Pure refactor. Split `TraverseAncestry` and `TraverseScoping` into separate file, in preparation for adding more methods to `TraverseScoping`.
2024-05-20 15:54:23 +00:00
Jelle van der Waa
c588e5205c
feat(linter/eslint): Implement prefer-exponentiation-operator ( #3365 )
...
Rule Detail:
[link](https://eslint.org/docs/latest/rules/prefer-exponentiation-operator )
2024-05-20 23:04:25 +08:00
Jelle van der Waa
283d6c7bb4
feat(linter/eslint): Implement symbol-description ( #3364 )
...
Rule Detail:
[link](https://eslint.org/docs/latest/rules/symbol-description )
2024-05-20 22:51:23 +08:00
underfin
e879685a25
refactor(sourcemap): using binary search to search original position ( #3360 )
...
The ast span is not ordering at rolldown, eg the module original ast is
`a,b,c`, after mutate could be `b,c,a`. So here revert changes from
[here](https://github.com/oxc-project/oxc/pull/2728 ).
2024-05-20 22:35:25 +08:00
underfin
90d2d09022
feat(sourcemap): add Sourcemap#from_json method ( #3361 )
...
The rolldown plugin hook could return an object map, cast it to string
at node, and decode it has unnecessary json overhead at rust. So here
export an new function to let rolldown could using `JSONSourceMap` to
generate `Sourcemap`.
2024-05-20 22:35:14 +08:00
Boshen
16d8dcda76
ci: allow branch renovate/**
2024-05-20 13:35:31 +08:00
cinchen
aec613bec2
feat(linter): eslint-plugin-jest/no-duplicate-hooks ( #3358 )
...
part of https://github.com/oxc-project/oxc/issues/492
Rule Detail:
[link](https://github.com/jest-community/eslint-plugin-jest/blob/main/src/rules/no-duplicate-hooks.ts )
2024-05-20 12:13:34 +08:00