Commit graph

1234 commits

Author SHA1 Message Date
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
a5a601e58d
ci: remove needs: cache from ecosystem-test 2023-08-25 16:24:14 +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
Boshen
1a591c7a2d
ci: build benchmark binary separately for reducing total execution time (#789)
benchmark execution time reduced from 15 mins to 12 mins. Time reduction
should be more noticeable for large code changes which require longer
compile time.
2023-08-25 14:40:08 +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
24c56a8b53
Revert "fix(tasks): use the current working directory if project rood is not found"
This reverts commit 971f597036.
2023-08-25 12:56:12 +08:00
Boshen
ba8ef7bfc7
fix(deps): use one version of textwrap 2023-08-25 12:54:38 +08:00
Boshen
971f597036
fix(tasks): use the current working directory if project rood is not found 2023-08-25 12:27:55 +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
Boshen
2f0ff28f47
Rust 1.72.0 (#784) 2023-08-24 23:02:19 +08:00
Boshen
531e89a74a
Revert "fix(resolver): fix a case where package name and specifier is the wrong order"
This reverts commit caf1dfbfcd.
2023-08-24 22:03:30 +08:00
Boshen
a272c1ffe4
perf(lexer): reduce checks on ident -> keyword (#783) 2023-08-24 18:43:03 +08:00
Boshen
c8a215ea5e
perf(lexer): jump table (#779) 2023-08-24 15:02:06 +08:00
Boshen
b2db6f7ef1
chore(benchmark): remove the measurement_time 2023-08-24 14:31:19 +08:00
u9g
4f686b6a75
feat(query): add Paren*Expr* type and add index to Argument type and fix todo in ObjectExpr (#780)
```diff
+ Argument.index

+ ParenthesizedExpression
+ ParenthesizedExpression implements Expression
+ ParenthesizedExpression implements HasSpan
+ ParenthesizedExpression.expression

+ ParenthesizedExpressionAST
+ ParenthesizedExpressionAST implements Expression
+ ParenthesizedExpressionAST implements HasSpan
+ ParenthesizedExpressionAST implements ParenthesizedExpression
+ ParenthesizedExpressionAST implements ASTNode
```
2023-08-24 04:21:02 +00:00
Wenzhe Wang
fd2f8fb12b
feat(linter): detect import (#778)
Support test cases like

```js
import { test } from '@jest/globals';
test('something');
```
2023-08-24 11:34:15 +08:00
u9g
89d115704b
feat(query): Add types & Visit Array in AST for ArrayAST type (#777)
```diff
+ RegExpLiteral
+ RegExpLiteral implements HasSpan
+ RegExpLiteral implements Expression
+ RegExpLiteral.pattern

+ RegExpLiteralAST
+ RegExpLiteralAST implements ASTNode
+ RegExpLiteralAST implements RegExpLiteral
+ RegExpLiteralAST implements HasSpan
+ RegExpLiteralAST implements Expression
```
2023-08-23 09:27:49 -04:00
Boshen
28544e1d59
deps: bump deps per security advice for rustls-webpki
rustls-webpki: CPU denial of service in certificate path building
2023-08-23 11:16:58 +08:00
Maneren
b18a91312e
refactor loss-of-precision rule to remove the slow regex (#775)
This achieves around 2x speedup in the rule execution by using a manual
parser instead of a regex.
2023-08-23 11:16:05 +08:00
Makoto Tateno
9c50bc0b9c
feat(linter): implement no-unsafe-declaration-merging (#748)
Related to https://github.com/web-infra-dev/oxc/issues/503

Implement
https://typescript-eslint.io/rules/no-unsafe-declaration-merging/
2023-08-23 11:12:49 +08:00
u9g
2b1e535e6d
feat(query) add declaration field to VarRef (#774) 2023-08-22 00:18:32 -04:00
Boshen
29f8c02258
refactor(linter): clean up tester with fixes (#773) 2023-08-22 00:12:08 +08:00
Boshen
c3560856cb
fix(website): convert utf8 <> utf16 span for correct unicode hover display (#772)
closes #426
closes #749

This fixes the unicode 16 issue but I'm not sure if this is the correct
solution.
2023-08-21 23:57:39 +08:00
Boshen
1851a8ae26
deps(rust): bump dependencies (#771)
generated with `cargo upgrade -i` then `cargo update`
2023-08-21 18:04:29 +08:00
Boshen
50ea72afe6
Release oxidation-compiler v0.2.3 2023-08-21 16:49:33 +08:00
Boshen
f9636242df
Release oxlint v0.0.10 2023-08-21 16:25:01 +08:00
Boshen
58d2d1e30d
fix(cli): fix a race condition where the program will hang 2023-08-21 16:21:19 +08:00
Boshen
773b77922e
ci: add write permission for creating releases 2023-08-21 15:54:37 +08:00
Boshen
bd830598b6
Release oxlint v0.0.9 with npm provernance 2023-08-21 15:40:56 +08:00
Boshen
877c92856a
Release oxidation-compiler 0.2.2 2023-08-21 15:26:09 +08:00
Boshen
4a1fdc1728
Release oxidation-compiler 0.2.1 2023-08-21 15:22:52 +08:00
Boshen
e14dd065f7
fix(npm): add package.repository and other fields according to provernance 2023-08-21 15:21:10 +08:00
Boshen
1a1fc3c99c
Release oxidation-compiler 0.2.1 2023-08-21 15:07:08 +08:00
Boshen
f7d26759c2
fix(npm): fix github link according to provernance 2023-08-21 15:04:33 +08:00
Boshen
3297c22cb1
Release oxidation-compiler 0.2.1 2023-08-21 14:47:39 +08:00
Boshen
9a20902dac
ci: add "id-token" permission for publishing project provenance 2023-08-21 14:47:10 +08:00
Boshen
6d23488ce4
Release oxidation-compiler 0.2.1 2023-08-21 14:28:17 +08:00
Boshen
3c375c413e
ci: use node v18 for npm project provenance 2023-08-21 14:27:02 +08:00
Boshen
be64f5240d
Release oxidation-compiler 0.2.0 2023-08-21 12:31:39 +08:00
Boshen
0c51b6cac9
chore: add publish to npm with project provenance 2023-08-21 12:25:51 +08:00
Boshen
bfe3e9a507
Release oxlint v0.0.8 2023-08-21 12:19:29 +08:00
Boshen
6eca2adc66
fix(linter): change severity of no-obj-calls to warning 2023-08-21 11:54:36 +08:00
Boshen
dafdc95d81
chore(linter): add rule name to no-instanceof-array 2023-08-21 11:51:16 +08:00
Boshen
4032e4799c
fix(linter): improve error and help message on no-duplicate-enum-values 2023-08-21 11:51:15 +08:00
Boshen
a1c2fa65f7
fix(linter): improve help message on no-namespace 2023-08-21 11:51:15 +08:00
Boshen
cc862536f6
fix(cli): print timing after lint run 2023-08-21 11:51:15 +08:00