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
renovate[bot]
d453917d00
chore(deps): update dependency axios to v1.7.0 ( #3357 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [axios](https://axios-http.com )
([source](https://togithub.com/axios/axios )) | [`1.6.8` ->
`1.7.0`](https://renovatebot.com/diffs/npm/axios/1.6.8/1.7.0 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>axios/axios (axios)</summary>
###
[`v1.7.0`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#170-2024-05-19 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.6.8...v1.7.0 )
##### Features
- **adapter:** add fetch adapter;
([#​6371](https://togithub.com/axios/axios/issues/6371 ))
([a3ff99b](a3ff99b59d ))
##### Bug Fixes
- **core/axios:** handle un-writable error stack
([#​6362](https://togithub.com/axios/axios/issues/6362 ))
([81e0455](81e0455b7b ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+1015/-127 (#​6371
)")
- <img
src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18 "
alt="avatar" width="18"/> [Jay](https://togithub.com/jasonsaayman
"+30/-14 ()")
- <img
src="https://avatars.githubusercontent.com/u/16711696?v=4&s=18 "
alt="avatar" width="18"/> [Alexandre
ABRIOUX](https://togithub.com/alexandre-abrioux "+56/-6 (#​6362
)")
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 21:42:22 +00:00
renovate[bot]
41ece8188c
chore(deps): update pnpm to v9.1.1 ( #3356 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.1.0` -> `9.1.1`](https://renovatebot.com/diffs/npm/pnpm/9.1.0/9.1.1 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.1.1`](https://togithub.com/pnpm/pnpm/compare/v9.1.0...v9.1.1 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.0...v9.1.1 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 21:41:37 +00:00
mysteryven
d7849f8865
refactor(linter): find return statement by using CFG in react/require-render-return ( #3353 )
...
Maybe currently Class components are relatively few in quantity, didn't performance changed.
2024-05-19 14:59:12 +00:00
Dunqing
8a30a98465
fix(semantic) incorrect reference flag caused by MemberExpression ( #3354 )
...
fix: https://github.com/oxc-project/oxc/issues/3326#issuecomment-2118858837
2024-05-19 14:55:18 +00:00
Boshen
89a1f97320
refactor(parser): improve expression parsing ( #3352 )
2024-05-19 21:28:16 +08:00
Boshen
e818fba21c
refactor(parser): improve parse_simple_arrow_function_expression ( #3349 )
2024-05-19 06:05:39 +00:00
Boshen
d2e1dbc82a
perf(coverage): run test cases in parallel ( #3348 )
2024-05-19 03:24:08 +00:00
overlookmotel
938ae12203
refactor(ast): fix clippy lint on nightly ( #3346 )
...
Clippy on nightly produces a warning for `&t as *const _`.
This warning is spurious in this case - we know `t` is valid, because we just created it. But change it, to keep Clippy happy!
2024-05-18 17:43:51 +00:00
Boshen
1e802c71d5
refactor(parser): clean up ParserState ( #3345 )
2024-05-19 01:30:16 +08:00
Dunqing
e2c6fe0cb1
feat(transformer): report errors when options have unknown fields ( #3322 )
2024-05-19 01:19:40 +08:00
Boshen
46cb5f97a0
perf(parser): use FxHashSet for not_parenthesized_arrow ( #3344 )
2024-05-19 01:13:56 +08:00
Boshen
899a52bf28
fix: fix some nightly warnings
2024-05-19 00:54:52 +08:00
Boshen
0742081921
refactor(parser): improve is_parenthesized_arrow_function_expression ( #3343 )
2024-05-18 16:39:51 +00:00
Boshen
6b3d019631
refactor(paresr): move some structs to js module ( #3341 )
2024-05-18 14:41:32 +00:00
Boshen
9ced605487
refactor(parser): start porting arrow function parsing from tsc ( #3340 )
...
relates #3320
2024-05-18 22:35:29 +08:00