Boshen
7bcf2d7c43
chore(oxc): add features for semantic, formatter and minifier
2023-09-03 11:28:20 +08:00
Boshen
6f270f1198
perf(linter): swap the order of checks for no_caller ( #844 )
2023-09-03 10:19:27 +08:00
Yunfei He
815db57a25
fix(semantic): symbol of identifier of top level function declaration should be in the root scope ( #843 )
...
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2023-09-03 10:16:47 +08:00
Boshen
d25355c9e8
perf(lexer): reduce an extra branch from peek ( #841 )
2023-09-03 00:02:42 +08:00
Boshen
53b094e46c
chore: clean up deps ( #840 )
2023-09-02 21:34:24 +08:00
Boshen
56aaf31fb1
refactor(benchmark): use codspeed for all benchmarks ( #839 )
2023-09-02 20:35:48 +08:00
Boshen
e4a3838ecb
chore(resolver): benchmark with codspeed ( #838 )
2023-09-02 18:27:37 +08:00
Boshen
6ed57532cd
fix(resolver): fix a case where ignored package has a fallback ( #837 )
2023-09-02 17:22:35 +08:00
Boshen
7f504961ec
fix(resolver): fix a case where an alias is part of a dashed package name ( #836 )
2023-09-02 16:37:07 +08:00
Boshen
9724365862
refactor(resolver): remove nodejs_resolver comparison
...
we no longer need to compare with nodejs_resolver
2023-09-02 15:12:26 +08:00
Boshen
bebdbfb9a6
feat(resolver): add tracing example
2023-09-02 15:12:25 +08:00
Boshen
d74da2f3bf
fix(resolver): fix cases with conflicting node_modules path ( #835 )
2023-09-02 14:45:10 +08:00
Wenzhe Wang
fa1d7da090
feat(linter): add eslint-plugin-jest/no-conditional-expect rule ( #832 )
...
port
[no-conditional-expect](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-expect.md )
2023-09-02 14:37:15 +08:00
Boshen
6ae6532245
fix(resolver): add test case for resolve_to_context ( #834 )
2023-09-02 12:03:07 +08:00
Boshen
47a076c226
feat(resolver): add an option to turn off builtin_modules ( #833 )
2023-09-02 11:38:03 +08:00
dependabot[bot]
8caf77300b
chore(deps): bump the dependencies group with 10 updates ( #831 )
2023-09-01 13:56:12 +08:00
Boshen
0921b733f7
deps: pin ezno-checker so dependabot can do its work
2023-09-01 12:18:05 +08:00
Boshen
693145107c
refactor(linter): less a global hashmap to reduce rule timer macro expansion ( #822 )
...
closes #819
2023-09-01 10:32:17 +08:00
Boshen
129191fc44
perf(resolver): stop descending into node_modules when possible ( #821 )
2023-09-01 10:18:59 +08:00
Boshen
777cc003a5
fix(resolver): resolve exports field that are directories ( #820 )
2023-08-31 16:10:03 +08:00
Boshen
92e7ecedc5
chore(linter): remove unmaintained typescript/isolated-declaration
2023-08-30 22:42:09 +08:00
Wenzhe Wang
7233aef0de
feat(linter): add eslint-plugin-jest/no_alias_method rule ( #818 )
...
port
[no_alias_method](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-alias-methods.md )
2023-08-30 22:38:01 +08:00
Boshen
e52157976f
fix(resolver): fix resolving package_self with the correct subpath
2023-08-30 19:05:33 +08:00
Boshen
c68bafe776
fix(resolver): correct behavior for enforceExtension
2023-08-30 18:28:07 +08:00
Boshen
589a4d6cd8
fix(resolver): do not resolve browser field that are strings ( #816 )
2023-08-30 14:00:59 +08:00
u9g
a38619b780
feat(vscode): Add linter plugin to vscode extension ( #813 )
2023-08-29 23:35:32 -04:00
Boshen
66e883ae8c
fix(resolver): make sure package name is valid when loading package self ( #810 )
2023-08-29 22:56:48 +08:00
u9g
05bb29a11e
feat(query): Add fields ( #807 )
...
```diff
+ Expression.or_value_at_declaration
+ Function.body
```
2023-08-28 13:56:05 +08:00
u9g
8f5cb4be8c
rename get_node_by_ident to get_declaration_of_variable ( #806 )
...
The previous function name wasn't really clear to me, I think this is
better.
2023-08-28 13:00:25 +08:00
EliLichtblau
6a9d57061c
TSTypeName change identifer name to identifier reference ( #804 )
...
When initially written types were not in the symbol table. Now that
types are in the symbol table it makes sense given
```ts
type A = 1
type B = A
```
that you can get to the symbol id for for A from type B = A.
Please correct me if I'm wrong about how I implemented this. I also
verified that occurrence (I believe this is the correct word) behaves
how I would expect.
```ts
type RecursiveType = string | {[x: string]: RecursiveType}
```
Does populate a reference.
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2023-08-28 11:42:21 +08:00
u9g
a44dde5303
feat(linter_plugin): Add linter plugin crate ( #798 )
...
Adds a `linter_plugin` crate which adds `oxc_query` support to any
`oxc_linter` consumers such as `oxc_cli` and `editor/vscode`
2023-08-28 11:40:00 +08:00
Wenzhe Wang
8b24052438
fix(linter): no-var-requires not warning if has bindings in ancestors ( #799 )
2023-08-28 11:24:17 +08:00
Boshen
dd7749f949
improve README ( #800 )
...
closes #686
Rendered: https://github.com/web-infra-dev/oxc/blob/readme/README.md
This is a refinement for the README, which should include information
for different interests: first time reader, explorer, rust crate / napi
user etc.
2023-08-27 22:36:17 +08:00
Wenzhe Wang
3721837e13
feat(linter): eslint-plugin-jest/expect-expect ( #802 )
...
Port [eslint-plugin-jest/expect-expect
](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/expect-expect.md )
2023-08-27 21:42:58 +08:00
Boshen
ed9e3e0774
refactor(linter): move the label message to help
2023-08-27 11:49:26 +08:00
Boshen
1f27426570
Release crates as v0.1.1
2023-08-26 17:53:11 +08:00
u9g
ad05e196cf
feat(query): Fix Spread typename ( #797 )
2023-08-26 10:50:21 +08:00
Boshen
c88823244e
fix(cli): correct ignore-pattern behavior; add more cli tests ( #796 )
2023-08-26 00:03:49 +08:00
Boshen
12798e075f
refactor: improve code coverage a little bit
2023-08-25 23:07:14 +08:00
Boshen
3d8ee2567f
feat(resolver): check for node.js core modules ( #794 )
2023-08-25 22:33:10 +08:00
Boshen
1bc1418ee6
feat(resolver): implement nested alias field ( #795 )
2023-08-25 22:32:57 +08:00
Boshen
4ee56576c7
feat(cli): add basic unit tests ( #793 )
2023-08-25 21:26:14 +08:00
Boshen
1b5ef7cdc8
refactor(cli): remove unused lint/error.rs ( #792 )
2023-08-25 16:46:26 +08:00
Boshen
592137586c
feat(cli): use insta_cmd for cli snapshot testing ( #791 )
...
closes #776
2023-08-25 16:26:34 +08:00
Boshen
33ea85813e
fix(linter): show the escaped span for no-useless-escape ( #790 )
...
closes #782
2023-08-25 15:21:17 +08:00
u9g
1c6b87b415
feat(query): Unify spread types, add ExpressionArrayElement, and ancestors is nullish now ( #788 )
...
```diff
- ArrayElementAST
- SpreadArrayElement
- SpreadArrayElementAST
- SpreadIntoObject
- SpreadIntoObjectAST
+ ExpressionArrayElement
+ ExpressionArrayElement implements HasSpan
+ ExpressionArrayElement implements ArrayElement
+ ExpressionArrayElement.expression
+ ExpressionArrayElementAST
+ ExpressionArrayElementAST implements ArrayElement
+ ExpressionArrayElementAST implements HasSpan
+ ExpressionArrayElementAST implements ExpressionArrayElement
+ Spread
+ Spread implements ObjectProperty
+ Spread implements ArrayElement
+ Spread implements HasSpan
+ Spread.expression
+ SpreadAST
+ SpreadAST implements ObjectProperty
+ SpreadAST implements HasSpan
+ SpreadAST implements ArrayElement
+ SpreadAST implements ASTNode
+ SpreadAST implements Spread
```
2023-08-25 13:29:06 +08:00
Boshen
ba8ef7bfc7
fix(deps): use one version of textwrap
2023-08-25 12:54:38 +08:00
u9g
e0a85eec01
feat(query): Add fields and new ArrayElement types ( #787 )
...
```diff
- Array.elements
+ Array.element
+ ElidedArrayElement
+ ElidedArrayElement implements ArrayElement
+ ElidedArrayElement implements HasSpan
+ ElidedArrayElementAST
+ ElidedArrayElementAST implements ArrayElement
+ ElidedArrayElementAST implements HasSpan
+ ElidedArrayElementAST implements ElidedArrayElement
+ SpreadArrayElement
+ SpreadArrayElement implements ArrayElement
+ SpreadArrayElement implements HasSpan
+ SpreadArrayElement.spread
+ SpreadArrayElementAST
+ SpreadArrayElementAST implements ArrayElement
+ SpreadArrayElementAST implements HasSpan
+ SpreadArrayElementAST implements SpreadArrayElement
+ VariableDeclarationAST.kind
```
2023-08-24 23:46:00 -04:00
u9g
741aa8df1f
feat(ast): Add to ChainExpression and ExpressionArrayElement to ASTKind ( #785 )
2023-08-25 03:03:53 +00:00
Wenzhe Wang
31d56698f7
refactor(linter): extract is_valid_jest_call ( #781 )
2023-08-24 23:05:03 +08:00