Cameron
6268f3f2f4
fix(linter) Fix false positives in prefer string start, ends with, port more test cases ( #1689 )
...
closes #1687 - uses `intersection` instead of `||`:
- this improves performance as it combines the flags into a single bitmask instead of doing two seperate checks
-
Adds missing test cases from eslint-plugin-unicorn
2023-12-15 17:08:42 +00:00
Andy Armstrong
d101acf833
fix(linter): prefer-string-starts-ends-with: ignore i and m modifiers. ( #1688 )
...
Fixes : #1687
2023-12-15 17:00:43 +00:00
Cameron
9f990ce677
fix(linter) false positive in jsx key ( #1686 )
2023-12-15 22:25:14 +08:00
Cameron
0d7e166f4b
refactor: use new_without_config for jsx_key ( #1685 )
2023-12-15 11:40:07 +00:00
Cameron
0a8746c751
fix(linter): Panic in prefer string starts, ends with ( #1684 )
...
Closes #1683
2023-12-15 11:35:01 +00:00
yoshi2no
cf0793b675
feat(linter): tabindex-no-positive for eslint-plugin-jsx-a11y ( #1677 )
...
partof: #1141
I've implemented `tabindex-no-positive` rule for jsx_a11y
originals:
- doc:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/tabindex-no-positive.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/tabindex-no-positive-test.js
2023-12-15 11:17:38 +08:00
RiESAEX
e5752a5462
fix(linter): fix excape_case panicing on unicode strings ( #1673 )
...
fix : #1671
2023-12-14 20:32:16 +08:00
Cameron
9275c749ca
feat(linter) Parse eslint configuration ( #1146 )
...
**DRAFT**
Adds support for parsing `eslint` configuration files.
Example:
```sh
cargo run --bin=oxc_cli lint --config-path ./.eslintrc.json .
```
This isn't a full implementation of how eslint parses configs but should
be fine for now:
Currently supported `extends`:
- `eslint:recommended` -> `eslint`
- `plugin:react/recommended` -> `react`
- `plugin:@typescript-eslint/recommended` -> `typescript`
- `plugin:react-hooks/recommended` -> `react`
- `plugin:unicorn/recommended` -> `unicorn`
- `plugin:jest/recommended` -> `jest`
These defaults can _all_ be overridden by configuring the rule in the
`rules` section of the estlint config:
e.g.
```json
{
"extends": [
"eslint:recommended"
],
"rules": {
"eqeqeq": "off"
},
}
```
This would enable of of the rules within the `eslint` group. But would
not enable `eqeqeq` as it is explicitly disabled
Note, we do not currently support the following:
- supplying a `filter` and `config-path`
- supplying a `plugin` and `config-path`
2023-12-14 16:29:27 +08:00
Hao Cheng
c9589b5447
feat(linter): eslint-plugin-unicorn/prefer-prototype-methods ( #1660 )
2023-12-14 14:55:03 +08:00
Boshen
8edcab82f2
chore(lexer): document the accessor keyword
2023-12-14 12:55:55 +08:00
Wenzhe Wang
d719af473c
refactor(linter): make some jest rules report more detailed ( #1666 )
2023-12-14 11:05:06 +08:00
Wenzhe Wang
90524c83f7
feat(linter): add eslint-plugin-import(export) rule ( #1654 )
2023-12-13 23:12:45 +08:00
Wenzhe Wang
c49a1f6b32
feat(prettier): add print_binaryish_expressions ( #1664 )
2023-12-13 22:52:53 +08:00
Dunqing
f58b6279c8
feat(transformer): add arrow_functions plugin ( #1663 )
2023-12-13 20:46:28 +08:00
Dunqing
67b7cc0f51
feat(ast): support visit more jsx ast in visit ( #1662 )
2023-12-13 20:41:44 +08:00
Ken-HH24
282771afc4
feat(linter): eslint-plugin-unicorn prefer-dom-node-text-content(style) ( #1658 )
...
Implement [prefer-dom-node-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md ) for #684 .
2023-12-13 12:19:00 +00:00
Dunqing
00806384ff
perf(linter/react): find class node by symbols in get_parent_es6_component ( #1657 )
...
This way we can get the class node faster. But I don't know if this is a
good way. In `eslint-plugin-react`, they get class node by scope. But
oxc cannot do the same way
2023-12-13 13:48:53 +08:00
Dunqing
864176a051
feat(transformer/react-jsx): returns ThisExpression when identifier is this ( #1661 )
2023-12-13 13:47:54 +08:00
Boshen
4ced3f949c
refactor(linter): separate out the category in the output of --rules
2023-12-13 13:23:52 +08:00
Boshen
ca009d5995
chore(linter): move prefer-array-flat to pedantic
2023-12-13 13:16:18 +08:00
Boshen
117d95f0ae
fix(linter): improve the span message for no-accumulating-spread
2023-12-12 16:28:37 +08:00
dependabot[bot]
a3b52fb548
chore(deps): bump the dependencies group with 7 updates ( #1651 )
2023-12-11 14:21:56 +08:00
Boshen
69c056be79
chore: remove crates/oxc_parser/README.md
2023-12-11 13:59:03 +08:00
Cameron
295822d7d4
feat(linter) eslint plugin unicorn: prefer array flat ( #1650 )
2023-12-10 23:19:30 +08:00
Cameron
ef740c3754
fix: improve span for no accumulating spread ( #1644 )
...
Closes #1643
2023-12-10 23:18:39 +08:00
Ken-HH24
e331cc2677
feat(transformer): duplicate keys ( #1649 )
2023-12-10 18:07:32 +08:00
Cameron
65c07728fc
fix: remove escapes in no array reduce test cases ( #1647 )
2023-12-10 09:42:40 +00:00
Cameron
a09060be33
fix: remove escapes in prefer regexp test test cases ( #1645 )
2023-12-10 09:37:41 +00:00
Cameron
9bea2780d9
feat(linter) eslint-plugin-react: react-in-jsx-scope ( #1025 )
...
Co-authored-by: wenzhe <mysteryven@gmail.com>
2023-12-10 17:08:43 +08:00
Ken-HH24
b425b73087
feat(linter): eslint-plugin-unicorn prefer-modern-dom-apis(style) ( #1646 )
2023-12-10 16:10:59 +08:00
Dunqing
0c19991471
feat(prettier): print CallExpression arguments correctly ( #1631 )
2023-12-10 15:59:13 +08:00
Boshen
b973261e5c
fix(linter): improve the key span for jsx-key
2023-12-08 17:40:35 +08:00
Boshen
8347e2225c
Release crates v0.4.0
2023-12-08 17:20:37 +08:00
Boshen
7ebe81d7ba
chore(linter): clean up the files a little bit
2023-12-08 16:50:06 +08:00
msdlisper
d88f4f4983
feat(linter): eslint-plugin-jsx-a11y no-autofocus ( #1641 )
...
impl linter for #1141
2023-12-08 16:43:14 +08:00
Dunqing
6e5aad2639
feat(prettier): add ConditionalGroup command ( #1635 )
2023-12-07 20:12:45 +08:00
Cameron
86fe7e3a3d
feat(linter) eslint plugin unicorn: no useless spread ( #1638 )
2023-12-07 17:31:22 +08:00
Wenzhe Wang
0dec110790
refactor(prettier): move the format of Function's key to PropertyKey ( #1639 )
2023-12-07 17:30:48 +08:00
Miles Johnson
c6ad6603a4
feat(semantic): support scope descendents starting from a certain scope. ( #1629 )
...
@Boshen
The `ScopeTree.descendants` function would return all scopes starting
from the root, and wasn't truly descendants from a specific scope. To
improve this, I've renamed this function to `descendants_from_root` and
have introduced a new `descendants` function that does support from a
specific scope.
Furthermore, I've introduced helper functions to `SymbolTree` to make
reading symbols/scopes easier.
To verify this functionality, I enabled the `function_name` transformer
(and fixed it), and ran some example transforms. Here's the input:
```js
let fn;
fn = function (a, b, c) {
const d = "";
};
const func = function (arg) {
{
const value = "";
}
};
const f = function (f) {};
```
And the output using _the old implementation_. Note that all function
names are suffixed with a number, this is incorrect, since it was
inheriting far too many scopes.
```js
let fn;
fn = function fn1(a, b, c) {
const d = '';
};
const func = function func1(arg) {
{
const value = '';
}
};
const f = function f2(f) {
};
```
And here's the output with the new implementation. Note that only `f` is
suffixed with a number. That's because it has a shadowed argument of the
same name.
```js
let fn;
fn = function fn(a, b, c) {
const d = '';
};
const func = function func(arg) {
{
const value = '';
}
};
const f = function f1(f) {
};
```
2023-12-07 17:29:11 +08:00
Boshen
be731fe90c
chore: move oxc_resolver to https://github.com/oxc-project/oxc_resolver ( #1636 )
...
It is moved to https://github.com/oxc-project/oxc_resolver
2023-12-06 18:52:59 +08:00
Shinobu Hayashi
ddb3c62b87
feat(linter): eslint-plugin-jsx-a11y scope rule (correctness) ( #1609 )
...
## Summary
partof: #1141
I re-implemented scope rule for jsx_a11y in Rust same as the original JS
one, and moved also the test related to the rule to here.
originals:
- doc:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/scope.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/scope-test.js
2023-12-06 18:24:29 +08:00
Boshen
2e42e10a1b
feat(resolver): add a realpath to package.json ( #1634 )
...
Using the `realpath` for resolving browser field will lead to missing
queries.
This fixes a cases where `browserField` fails to read.
---
`styled-components` is using a trick for loading browser modules:
---
7c065e0b6f/packages/styled-components/package.json (L6C1-L12C5)
```json
"main": "dist/styled-components.cjs.js",
"module": "./dist/styled-components.esm.js",
"browser": {
"./dist/styled-components.esm.js": "./dist/styled-components.browser.esm.js",
"./dist/styled-components.cjs.js": "./dist/styled-components.browser.cjs.js"
},
```
Module resolution has to go from `"module":
"./dist/styled-components.esm.js"`, then to `browser`'s
`"./dist/styled-components.esm.js":
"./dist/styled-components.browser.esm.js"` part in order for things to
get resolved correctly.
---
Fixtures are hard to setup for this test case due to needing symlinks,
I've created https://github.com/oxc-project/oxc_resolver for tacking
such cases.
2023-12-06 12:25:44 +08:00
Wenzhe Wang
286644714f
feat(prettier): wrap parameters in indent ( #1633 )
2023-12-06 10:20:31 +08:00
Wenzhe Wang
633455aba6
refactor(prettier): add print_method_value ( #1632 )
2023-12-06 10:16:09 +08:00
Wenzhe Wang
2aa5f7db91
feat(prettier): finish should_hug_the_only_function_parameter ( #1626 )
2023-12-05 22:55:12 +08:00
Don Isaac
795db7c5b7
feat(linter): cxc: no accumulating spread ( #1607 )
...
Creates a new nursery-level rule, `no-reduce-spread`, that prevents
spreading accumulator objects/arrays in `Array.prototype.reduce`.
The Tl;Dr of why this should be avoided is because it drastically
increases time/memory complexity in reductions. In general, it turns
potentially `O(1)`/`O(n)` memory operations into `O(n)`/`O(n^2)`, and
`O(n)` time into `O(n^2)`. For more details, refer to [this helpful blog
post](https://prateeksurana.me/blog/why-using-object-spread-with-reduce-bad-idea/ ).
Note that this rule doesn't exist in ESLint's default rule set or any
other ESLint plugin, although it looks like [there's been some interest
in it in the past](https://github.com/vercel/style-guide/issues/18 ).
Since there is no reference implementation to compare against, and thus
this could potentially have bugs, I've decided to make this a
nursery-level rule until we're sure it's stable and useful.
---
Edit:
- [ ] Sync with Biome -
https://biomejs.dev/linter/rules/no-accumulating-spread/
---------
Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2023-12-05 17:25:40 +08:00
IWANABETHATGUY
b5f8a65352
refactor: improve pattern match of prefer-reflect-apply ( #1630 )
2023-12-05 15:18:50 +08:00
RiESAEX
c8e2ef62a8
feat(linter): eslint-plugin-unicorn: explicit-length-check ( #1617 )
...
[Rule](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md )
#684
It's harder than I thought.
Test cases that require a vue parser have been skipped
Some test case needs
[getStaticValue](https://github.com/eslint-community/eslint-utils/blob/main/src/get-static-value.mjs#L672 )
to pass.
2023-12-05 13:55:56 +08:00
Ken-HH24
519b5f266b
feat(linter): eslint-plugin-unicorn prefer-reflect-apply(style) ( #1628 )
...
[prefer-reflect-apply](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-reflect-apply.md )
for #684 .
2023-12-05 13:52:49 +08:00
Boshen
32504cadb7
feat(linter): add a perf category ( #1625 )
...
relates to #1607
2023-12-04 17:31:34 +08:00
dependabot[bot]
09618e9db0
chore(deps): bump the dependencies group with 2 updates ( #1623 )
2023-12-04 15:26:44 +08:00
Miles Johnson
6cbc5dd75b
feat(transformer): Start on function_name transform. ( #1510 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-12-04 13:35:44 +08:00
IWANABETHATGUY
872e8ad4ae
feat: eslint-plugin-unicorn (recommended) prefer-node-protocol ( #1618 )
...
part of https://github.com/oxc-project/oxc/issues/684
2023-12-03 17:06:47 +00:00
Cameron
f74fa975b1
feat(linter) eslint plugin unicorn: prefer number properties ( #1614 )
2023-12-03 16:24:40 +00:00
Cameron
e881ee253c
feat(linter) eslint plugin unicorn: no array foreach ( #1613 )
2023-12-03 16:17:37 +00:00
Cameron
eaffb1d87c
feat(linter) eslint plugin unicorn: no array reduce (restriction) ( #1610 )
2023-12-03 17:03:23 +08:00
Shinobu Hayashi
b573036035
feat(linter): eslint-plugin-jsx-a11y iframe-has-title rule (correctness) ( #1589 )
...
## Summary
partof: #1141
I re-implemented iframe-has-title rule for jsx_a11y in Rust same as the
original JS one, and moved also the test related to the rule to here.
originals:
- doc:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/iframe-has-title.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/iframe-has-title.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/iframe-has-title-test.js
2023-12-03 15:30:30 +08:00
Cameron
b7b3073f3f
feat(prettier) port should_break_after_operator ( #1606 )
2023-12-02 20:40:25 +08:00
Ken-HH24
967aa35526
feat(linter): eslint-plugin-unicorn require-array-join-separator(style) ( #1608 )
...
Try to implement require-array-join-separator for #684
2023-12-02 11:26:14 +00:00
Cameron
502d61dc9f
fix(prettier) fix use chain formatting ( #1605 )
2023-12-02 15:44:25 +08:00
Boshen
811b219b27
feat(prettier): add parens to new class {} ( #1604 )
2023-12-01 21:36:01 +08:00
Boshen
bb61f10399
feat(prettier): handle parens for (x % y) % z ( #1603 )
2023-12-01 21:29:56 +08:00
Cameron
b4e90a723a
feat(prettier): implement has_comment, improve blank lines when printing arrays ( #1601 )
2023-12-01 20:52:26 +08:00
Cameron
deac95e274
feat(prettier): print blank lines when printing array concisely ( #1600 )
2023-12-01 20:48:10 +08:00
Boshen
f4f392e19f
feat(prettier): add parens to left of instanceof ( #1602 )
2023-12-01 19:08:45 +08:00
Cameron
66452c95f5
fix(prettier) print computed object property key correctly ( #1599 )
2023-12-01 18:36:38 +08:00
Cameron
0134211b6f
fix(prettier) use print_assignment for ObjectProperty ( #1598 )
2023-12-01 18:32:03 +08:00
Boshen
da87b9b29e
feat(prettier): binaryish expressions with parens ( #1597 )
2023-12-01 13:52:22 +08:00
Ken-HH24
ba5b13da2c
feat(linter): eslint-plugin-unicorn no-unreadable-array-destructuring (style) ( #1594 )
...
Try to implement `no-unreadable-array-destructuring` for #684
2023-12-01 09:57:20 +08:00
Boshen
e3c54b92c9
fix(prettier): object pattern in function parameters ( #1595 )
2023-11-30 23:49:24 +08:00
Wenzhe Wang
9f38072002
feat(tasks): add visualize_end_of_line ( #1593 )
2023-11-30 23:42:57 +08:00
Dunqing
39188d00e1
feat(prettier): support arrowParens option ( #1592 )
2023-11-30 17:41:34 +08:00
Boshen
8d8276ae52
Release oxc_resolver v0.5.5
2023-11-30 17:16:04 +08:00
Boshen
085021ab85
fix(resolver): resolve query and fragments with unicode filenames ( #1591 )
2023-11-30 17:01:53 +08:00
Shinobu Hayashi
a6142558ce
feat(linter): eslint-plugin-jsx-a11y img-redundant-alt (correctness) ( #1571 )
...
originals:
- doc:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md
- code:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/img-redundant-alt.js
- test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/img-redundant-alt-test.js
2023-11-30 15:59:39 +08:00
Jon Surrell
8bef1f1964
feat(linter): eslint-plugin-unicorn numeric-separators-style (style) ( #1490 )
...
Part of #684 .
2023-11-30 15:58:46 +08:00
Boshen
6ec257ba2d
feat(prettier): add --no-semi to prettier example ( #1588 )
2023-11-29 23:33:35 +08:00
Boshen
1554f7c0d2
feat(parsr): parse let.a = 1 with error recovery ( #1587 )
2023-11-29 23:21:39 +08:00
Boshen
fd6a3ed918
feat(prettier): format for((async) of and for((let) of ( #1586 )
2023-11-29 22:55:42 +08:00
Boshen
1bd1c5b51b
feat(prettier): check parens for (let)[a] = 1 ( #1585 )
2023-11-29 21:57:59 +08:00
Boshen
c50fcececa
feat(prettier): wrap return statements with parentheses ( #1583 )
2023-11-29 19:31:55 +08:00
Boshen
b8ce6266ad
feat(prettier): handle parens for sequence expression ( #1582 )
2023-11-29 19:15:57 +08:00
Boshen
405d1228a0
feat(prettier): wrap BindingIdentifier ( #1581 )
2023-11-29 19:08:29 +08:00
Dunqing
f19032e102
feat(prettier): support quoteProps option in PropertyKey ( #1578 )
2023-11-29 18:32:30 +08:00
Dunqing
93d5b0f879
pref(prettier): using allocator String to avoid reallocation ( #1577 )
2023-11-29 18:27:27 +08:00
Boshen
9842be4461
refactor(parser): remove duplicated code
2023-11-29 18:23:32 +08:00
Dunqing
3a4261ff5d
fix(prettier): keep EmptyStatement in Program ( #1576 )
2023-11-29 18:22:40 +08:00
IWANABETHATGUY
4043ca9d92
feat(ast): add enter node and scope for VisitMut trait ( #1570 )
2023-11-29 15:27:34 +08:00
Boshen
7236368d5a
feat(prettier): implement is_next_line_empty_after_index ( #1575 )
2023-11-29 14:37:33 +08:00
Boshen
a9f0206805
feat(prettier): print es5 comma for object expression ( #1574 )
2023-11-29 13:36:28 +08:00
Boshen
c5b138f006
refactor(prettier): clean up object::print_object_properties ( #1573 )
2023-11-29 12:30:06 +08:00
Hao Cheng
72dd72b466
feat(linter): eslint-plugin-unicorn/no-unreadable-iife ( #1572 )
...
This PR implements the
[eslint-plugin-unicorn/no-unreadable-iife](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md )
rule.
Tests taken from
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/test/no-unreadable-iife.mjs .
Related issue: #684
2023-11-29 11:27:44 +08:00
Ken-HH24
3b2b6a013a
feat(linter): eslint-plugin-unicorn no-await-expression-member (style) ( #1569 )
2023-11-29 11:26:29 +08:00
IWANABETHATGUY
c034eee5c1
feat(transformer): handle invalid react jsx runtime ( #1502 )
2023-11-28 23:19:58 +08:00
Wenzhe Wang
3fe9cccb9e
feat(playground): format Prettier IR ( #1567 )
2023-11-28 13:51:47 +08:00
Cameron
9a0a6f5004
feat(prettier) further improve class printing ( #1566 )
2023-11-28 10:59:37 +08:00
Cameron
522cf29489
feat(prettier) improve class printing ( #1565 )
2023-11-28 10:54:33 +08:00
Cameron
2bfd28e6f5
fix(prettier) remove unmatched brace when displaying doc ( #1564 )
2023-11-28 10:50:25 +08:00
Cameron
83f25fc9b3
fix(prettier) fix printing of call args when in break mode ( #1563 )
...
To test, format:
```ts
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar();
```
Previously:
```ts
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar(
,
);
```
Now:
```ts
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar();
```
2023-11-28 10:45:27 +08:00
Cameron
cc25f7897d
fix(prettier) Fix printing of array expressions ( #1562 )
2023-11-28 10:39:37 +08:00
Cameron
fe7f6efff2
fix(prettier) Fix debug printing if IfBreak` doc ( #1561 )
2023-11-28 10:34:28 +08:00
magic-akari
92c1d9d527
feat(transform): TypeScript Enum ( #1173 )
2023-11-28 10:33:01 +08:00
Cameron
cda0b97ade
feat(prettier) use groupId in fluid assignments ( #1560 )
2023-11-28 10:29:32 +08:00
Boshen
7d9d04c569
refactor(prettier): align line with prettier ( #1559 )
...
This PR alines all the line types with prettier
```
const hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true };
const literallineWithoutBreakParent = {
type: DOC_TYPE_LINE,
hard: true,
literal: true,
};
const line = { type: DOC_TYPE_LINE };
const softline = { type: DOC_TYPE_LINE, soft: true };
const hardline = [hardlineWithoutBreakParent, breakParent];
const literalline = [literallineWithoutBreakParent, breakParent];
```
101598f94f/src/document/builders.js (L165-L175)
2023-11-27 23:11:53 +08:00
Wenzhe Wang
21dffec8be
feat(prettier): add id on IfBreak and Group ( #1551 )
2023-11-27 22:53:32 +08:00
Dunqing
0e1abae757
feat(prettier): filter out EmptyStatement in BlockStatement ( #1546 )
2023-11-27 22:45:45 +08:00
Radu Baston
afeed17be9
feat(linter): eslint-lugin-unicorn no_useless_length_check ( #1541 )
...
I have an issue with this rule. I am able to identify the condition that
breaks the rule, but I can't manage to get the fix done. I was thinking
of concatenating the valid conditions with the common operator, but I am
not sure how to do that (from `Expression` to turn to `string` to be
passed as a parameter to the fix). any help is appreciated.
NOTE: I will probably do some refactorization for this code after
implementing the fix
---------
Co-authored-by: Radu Baston <radu.baston@sectorlabs.ro>
2023-11-27 19:53:39 +08:00
Boshen
6670d94708
chore(rust): remove unnecessary clippy::non_upper_case_globals ( #1557 )
2023-11-27 14:31:38 +08:00
Boshen
6e7892fcf0
refactor(prettier): move comment printing to its own directory ( #1556 )
2023-11-27 14:22:15 +08:00
Boshen
cc382835ef
feat(prettier): trailing comment (wip) ( #1538 )
2023-11-27 14:08:39 +08:00
u9g
9a5bb008e7
feat(query): Add is_getter, is_setter, is_constructor to all Function implementors ( #1526 )
...
---
<details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev ">Graphite</a>)</summary>
> # TL;DR
> This pull request adds new properties to the `ArrowFunction`, `FnDeclaration`, and `Function` interfaces in the Trustfall schema. It also adds implementation for resolving these properties in the `adapter.rs` and `properties.rs` files. Additionally, it adds a new method `function_scope_flag` to the `Vertex` struct in the `vertex.rs` file.
>
> # What changed
> - Added new properties (`is_getter`, `is_setter`, `is_constructor`) to the `ArrowFunction`, `FnDeclaration`, and `Function` interfaces in the Trustfall schema.
> - Implemented the resolution of these properties in the `resolve_arrow_function_property`, `resolve_fn_declaration_property`, and `resolve_function_property` functions in the `properties.rs` file.
> - Added a new method `function_scope_flag` to the `Vertex` struct in the `vertex.rs` file.
>
> # How to test
> 1. Run the test suite to ensure that all existing tests pass.
> 2. Add new tests to cover the newly added properties and the `function_scope_flag` method.
> 3. Run the test suite again and ensure that all tests pass.
>
> # Why make this change
> - The new properties (`is_getter`, `is_setter`, `is_constructor`) provide additional information about functions in the Trustfall schema, allowing clients to query for these properties.
> - The `function_scope_flag` method in the `Vertex` struct provides a convenient way to access the scope flags of a function node, which can be useful for various analysis and processing tasks.
</details>
2023-11-27 12:22:41 +08:00
Dunqing
85e8c8bad5
fix(prettier): incorrect order of print in AssignmentTargetPropertyProperty ( #1545 )
2023-11-27 12:18:32 +08:00
Cameron
d5b636b197
feat(prettier) Improve assignment compatibility ( #1547 )
2023-11-27 10:01:01 +08:00
Ken-HH24
a2510be7a0
feat(linter): no-is-mounted for eslint-plugin-react ( #1550 )
...
Try to implement `no-is-mounted` for #1022
2023-11-26 11:06:08 +00:00
Boshen
023e6eabcd
chore(resolver): add a path alias test ( #1549 )
2023-11-26 07:14:32 +00:00
Cameron
08b659455b
refactor(prettier) move assignment printing into seperate file ( #1544 )
2023-11-26 14:09:57 +08:00
Radu Baston
59d0428eb5
feat(linter): eslint 9.0 no empty static block ( #1543 )
...
Related [issue](https://github.com/oxc-project/oxc/issues/1191 )
---------
Co-authored-by: Radu Baston <radu.baston@sectorlabs.ro>
2023-11-25 17:09:50 +00:00
magic-akari
9ff0ffcc6f
feat(ast): implement new proposal-import-attributes ( #1476 )
...
- [Import Attributes](https://tc39.es/proposal-import-attributes )
2023-11-25 15:56:09 +08:00
Wenzhe Wang
46d1086c3e
feat(prettier): add LineSuffix Doc ( #1542 )
2023-11-25 13:46:02 +08:00
Wenzhe Wang
924d99e8d7
feat(prettier): init command of Fill ( #1460 )
2023-11-25 12:03:26 +08:00
Boshen
13cac62402
feat(prettier): print leading comments for all ast nodes ( #1537 )
2023-11-25 00:35:51 +08:00
Cameron
41bb0060eb
fix(linter) fix panic in no hex escape ( #1540 )
...
🦀 🦶 🔫
lol https://twitter.com/boshen_c/status/1719033308682870891
closes #1539
2023-11-24 23:57:02 +08:00
Dunqing
3ca2f50773
feat(prettier): align ObjectProerty with prettier ( #1536 )
2023-11-24 20:20:07 +08:00
Dunqing
ac8a5ce574
feat(prettier): support handling of BlockStatement within consequent in SwitchCase ( #1533 )
2023-11-24 17:15:29 +08:00
Dunqing
ec0ee5cd07
feat(prettier): keep empty lines in SwitchStatement ( #1532 )
2023-11-24 17:10:27 +08:00
Boshen
4a0d18048b
feat(prettier): format () => ({} ? 1 : 2); to () => ({}) ? 1 : 2; ( #1534 )
2023-11-24 17:07:19 +08:00
Dunqing
75c75887e3
feat(prettier): trim spaces when printing hardline ( #1531 )
2023-11-24 17:05:20 +08:00
Boshen
e55fdc6452
feat(prettier): add parens to conditional and arrow expr ( #1530 )
2023-11-24 15:07:29 +08:00
Boshen
6e81b3d41a
fix(prettier): pop the stack in should_wrap_function_for_export_default ( #1529 )
2023-11-24 14:57:06 +08:00
RiESAEX
8afda7d247
feat(linter): eslint-plugin-unicorn: escape-case ( #1495 )
...
[Rule](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md )
#684
2023-11-24 10:44:34 +08:00
Boshen
6ebb42dbd7
fix(ast): remove debug_assertions from debug_name
2023-11-24 10:24:15 +08:00
Boshen
78c6fcd1d0
feat(prettier): improve format of ExportDefaultDeclaration ( #1520 )
2023-11-23 21:52:56 +08:00
Wenzhe Wang
f4c89ce5a6
feat(prettier): implement DocBuidler trait for Printer and Prettier ( #1519 )
2023-11-23 21:48:13 +08:00
Dunqing
3758e6f6a5
feat(prettier): handle the logic inside the parentheses in BinaryExpression and LogicalExpression ( #1516 )
2023-11-23 18:32:25 +08:00
Shannon Rothe
0115314cf4
feat(ast/semantic): parse jsdoc on PropertyDefinition ( #1517 )
...
This should be enough to handle jsdoc comments on class
properties/fields.
See #1506
2023-11-23 18:30:14 +08:00
Dunqing
490a589ded
feat(prettier): print binarylish correctly in SwitchStatement ( #1515 )
2023-11-23 18:29:00 +08:00
Ken-HH24
ebf5cf8c82
feat(linter): heading-has-content for eslint-plugin-jsx-a11y ( #1501 )
...
Try to implement `heading-has-content` for #1141 .
2023-11-23 09:28:22 +00:00
Dunqing
635008a408
feat(prettier): support print empty switch ( #1514 )
2023-11-23 16:19:42 +08:00
Boshen
ef59f544b4
feat(prettier): handle binary in in for statement init ( #1512 )
2023-11-23 12:50:30 +08:00
Cameron
7930f90112
feat(linter): eslint-plugin-unicorn prefer-set-size (correctness) ( #1508 )
2023-11-23 11:03:25 +08:00
Cameron
0dd5ec1bcf
feat(linter): eslint-plugin-unicorn prefer-native-coercion-functions (pedantic) ( #1507 )
2023-11-23 10:59:19 +08:00
Dunqing
bec365e1b6
feat(prettier): support propagate breaks ( #1511 )
...
regression tests are the expected result
2023-11-23 10:44:41 +08:00
u9g
cac7c2eba8
chore(ast): document connection between TemplateLiteral's quasis & expression arrays ( #1509 )
2023-11-23 10:43:15 +08:00
Boshen
2d5e0d5d07
feat(prettier): handle parens for member expression inside new expression ( #1505 )
2023-11-22 16:22:49 +00:00
ubugeeei
8e923f1372
Initialize JS Regex crates and def AST. ( #1500 )
...
ref: https://github.com/oxc-project/oxc/issues/1164
I have initialized a crate for handling JavaScript Regexp and defined
the AST.
I implemented the AST while referring to
[eslint-community/regexpp](2e8f1af992/src/ast.ts ).
2023-11-23 00:22:17 +08:00
Boshen
6410502cc6
refactor(prettier): rename file need_parens -> needs_parens ( #1504 )
2023-11-23 00:04:00 +08:00
Boshen
d3b7629b46
feat(prettier): handle parens for logical assignment expression ( #1503 )
2023-11-22 23:58:43 +08:00
Boshen
93c461a5b9
feat(prettier): format number in member expression ( #1499 )
2023-11-22 21:52:06 +08:00
Boshen
272f6d292d
fix(wasm): fix prettier crashing
2023-11-22 21:27:47 +08:00
Boshen
7af6d129cb
fix(wasm): turn off Parser::preserve_parens for the playground ( #1498 )
2023-11-22 19:45:26 +08:00
Boshen
567c6ed757
feat(prettier): print directives ( #1497 )
2023-11-22 19:39:25 +08:00
Boshen
cf803d379a
feat(prettier): add parens to ExportDefaultDeclaration ( #1494 )
2023-11-22 19:34:37 +08:00
JonaAnders
08164b0e18
refactor(parser) Updated comments mentioning the ecma specification section 12.x ( #1496 )
...
The ECMA specification seems to added the "Tokens" section to the
specification as 12.6. This pushed all the other sections down,
resulting in e.g. former 12.6 now being 12.7. Comments in the parser
mention this part of the specification. All the mentions of section
12.6+ therefor are outdated now. This pull request tries to fix that by
updating all the comments.
2023-11-22 19:29:04 +08:00
msdlisper
c8cc814243
feat(linter): eslint-plugin-jsx-a11y anchor_is_valid (correctness) ( #1477 )
2023-11-22 15:23:43 +08:00
Boshen
717d472d09
chore(linter): move some rules to pedantic
...
* prefer_dom_node_append
* prefer_string_slice
* no_hex_escape
2023-11-22 14:26:54 +08:00
IWANABETHATGUY
b6393f052f
feat(transformer/react): handle babel 8 breaking removed-options ( #1489 )
...
1. removed options react jsx
2. Passed 4 test cases.
2023-11-22 11:01:40 +08:00
Dunqing
79c67d15c0
perf(prettier): check commandjs or amd in CallExpression only ( #1491 )
2023-11-22 10:57:31 +08:00
Boshen
064353c97e
feat(prettier): turn off preserve_parens and start working on need-parens ( #1487 )
2023-11-21 16:26:56 +00:00
IWANABETHATGUY
f66e4d8ac3
feat(transformer): add transform property-literal plugin ( #1458 )
...
1. Add `transform-property-literal-plugin`
2. Passing 2 testcases.
---------
Co-authored-by: Wenzhe Wang <mysteryven@gmail.com>
2023-11-21 23:07:43 +08:00
Shannon Rothe
8934ddb590
feat(prettier): basic TaggedTemplateExpression printing ( #1486 )
2023-11-21 22:15:29 +08:00
Boshen
f41b3f0968
Release oxc_resolver v0.5.4
2023-11-21 18:57:27 +08:00
Dunqing
347b5721c0
feat(prettier): print multiple variable declarator correctly in VariableDeclaration ( #1485 )
2023-11-21 18:54:26 +08:00
Dunqing
f1874c7955
feat(prettier): should be newline if break in AssigmentExpression ( #1484 )
2023-11-21 18:50:26 +08:00
Shannon Rothe
332ed81e1e
chore(linter): uncomment test case for no-func-assign rule ( #1483 )
2023-11-21 18:22:09 +08:00
Boshen
abde1e06b0
refactor(resolver): do not search for package.json inside non-existing directories ( #1482 )
2023-11-21 17:28:27 +08:00
Dunqing
c762a85fcc
feat(prettier): print inner comment in PropertyKey ( #1479 )
2023-11-21 17:26:36 +08:00
Boshen
4dbe17c33a
fix(resolver): make sure package.json path is inside the resolved path ( #1481 )
2023-11-21 17:24:06 +08:00
Dunqing
79c2bac6b1
feat(prettier): support longer source in ImportExpression ( #1478 )
2023-11-21 17:21:23 +08:00
Boshen
7b909de28e
perf(resolver): do not search for package.json inside non-existing directories ( #1480 )
2023-11-21 16:57:44 +08:00
Dunqing
51a78e2223
feat(prettier): support print inner comment in CallExpression ( #1475 )
2023-11-21 12:28:46 +08:00
Boshen
07b010912a
feat(parser): add preserve_parens option (default: true) ( #1474 )
...
closes #1461
2023-11-21 11:16:30 +08:00
Cameron
0f7d6a5800
feat(linter) eslint plugin unicorn: prefer dom node remove ( #1472 )
2023-11-21 10:40:40 +08:00
Cameron
1c28feec52
feat(linter) eslint plugin unicorn: prefer includes ( #1471 )
2023-11-21 10:35:26 +08:00
Cameron
807ede7996
refactor(linter) Use is_method_call in no_console_spaces ( #1470 )
2023-11-21 10:30:31 +08:00
Cameron
32afe1afd0
refactor(linter) Use is_method_call in more places ( #1469 )
2023-11-21 10:25:25 +08:00
Cameron
ce20a02692
feat(linter) eslint plugin unicorn: prefer array some ( #1467 )
2023-11-21 10:21:25 +08:00
Cameron
ba1bb03e91
feat(linter) eslint plugin unicorn: prefer math trunc ( #1466 )
2023-11-21 10:16:26 +08:00
Cameron
067cec7d82
feat(linter) eslint plugin unicorn: prefer event target ( #1465 )
2023-11-21 10:11:27 +08:00
Shannon Rothe
0b6b0b4854
feat(cli): add --deny-warnings flag ( #1452 )
...
See #1403
Terminates linting with an exit code of 1 if the `--deny-warnings` flag
is provided _and_ there is 1 or more warnings produced from the linting.
2023-11-21 10:08:10 +08:00
Cameron
10be84a07a
feat(linter) eslint plugin unicorn: no zero fractions ( #1464 )
2023-11-21 10:06:28 +08:00
Dunqing
d64ed0a953
feat(prettier): support format commonjs and amd call ( #1473 )
2023-11-21 10:05:39 +08:00
Cameron
8b0032d4af
feat(linter): eslint plugin unicorn: no useless switch case ( #1463 )
2023-11-21 10:02:32 +08:00
magic-akari
f81f15ff71
fix(prettier): Private Field Expression ( #1459 )
2023-11-20 23:32:16 +08:00
Wenzhe Wang
5aca375a94
feat(prettier): add should_break for array ( #1454 )
2023-11-20 22:58:52 +08:00
magic-akari
4c213a1c14
fix(prettier): async arrow expression ( #1457 )
2023-11-20 22:58:37 +08:00
magic-akari
59b8fdfaa5
fix(prettier): class extends clause ( #1456 )
2023-11-20 21:45:28 +08:00
magic-akari
18d8be0353
fix(prettier): class without name ( #1455 )
2023-11-20 21:41:14 +08:00
magic-akari
eecf8d3dc6
fix(prettier): print_method ( #1453 )
2023-11-20 12:41:36 +00:00
Shannon Rothe
712505bfce
chore(prettier): fix typo in function name ( #1451 )
...
Small typo on the function name cloned from the Prettier repo
2023-11-20 18:51:45 +08:00
Boshen
0bf3dbfde4
feat(prettier): add infra for need_parens ( #1450 )
2023-11-20 17:18:39 +08:00
Dunqing
719ed744e0
feat(prettier): implement should_break in CallExpression and Object ( #1448 )
2023-11-20 17:07:32 +08:00
Dunqing
aabed6bee8
feat(prettier): when calculating the remaining width, the docs of the remaining commands should be included ( #1441 )
2023-11-20 16:59:06 +08:00
magic-akari
a7e0706dbc
fix(parser): correct import_kind of TSImportEqualsDeclaration ( #1449 )
2023-11-20 16:57:38 +08:00
Dunqing
ca06126d50
feat(prettier): support format function for ImportNamespaceSpecifier ( #1443 )
2023-11-20 07:24:15 +00:00
Boshen
6892a298cf
feat(prettier): add spacing before empty bracket in ImportDeclaration ( #1447 )
...
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-11-20 15:14:38 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table ( #1444 )
2023-11-20 14:38:10 +08:00
Cameron
d02b7470d9
feat(prettier) print ?. when a printing an optional call expression ( #1440 )
2023-11-20 09:40:28 +08:00
Cameron
a53c5e9bab
feat(prettier) check original state for new lines when formatting properties ( #1439 )
2023-11-20 09:36:26 +08:00
Cameron
008eb0d178
feat(prettier) Support should_break option for group doc ( #1438 )
2023-11-20 09:32:05 +08:00
Ken-HH24
822ce76402
feat(linter): html-has-lang for eslint-plugin-jsx-a11y ( #1436 )
...
It's my first time trying to implement the rule of linter.
**html-has-lang** for #1141
2023-11-20 00:10:42 +08:00
Boshen
18f19ee164
refactor(prettier): improve comment handling API ( #1435 )
2023-11-19 23:08:23 +08:00
Boshen
0218ae8641
feat(prettier): print leading comments with newlines ( #1434 )
2023-11-19 22:46:55 +08:00
zhangpeng
2ba69f1f01
feat(linter): anchor-has-content for eslint-plugin-jsx-a11y
2023-11-19 22:38:07 +08:00
Boshen
6ee072aafd
refactor(prettier): comment flags should be bigflags ( #1433 )
2023-11-19 21:24:22 +08:00
Boshen
cf388ae79e
feat(prettier): format empty try catch ( #1430 )
2023-11-19 18:01:49 +08:00
Boshen
18fa8e45a4
feat(prettier): format for((let) of .. ( #1429 )
2023-11-19 17:48:09 +08:00
Boshen
cc8b8719f7
feat(prettier): format for loop and update expression ( #1427 )
2023-11-19 14:04:47 +08:00
Wenzhe Wang
c1450d8e90
feat(prettier): basic print of TemplateLiteral ( #1426 )
2023-11-19 13:51:47 +08:00
Boshen
902d4d0bab
feat(prettier): format with and if statements ( #1425 )
2023-11-19 11:47:31 +08:00
Cameron
08ce4474e1
feat(prettier) Add IndentIfBreak support ( #1420 )
2023-11-19 03:11:52 +00:00
Jon Surrell
cb804d3cd2
Add base to AST BigintLiteral ( #1416 )
2023-11-19 11:11:19 +08:00
Dunqing
b945307ab3
feat(prettier): support format function for ImportDefaultSpecifier ( #1424 )
2023-11-19 11:10:08 +08:00
Wenzhe Wang
d6b913e46a
feat(prettier): add trailing comma ( #1422 )
2023-11-19 11:08:25 +08:00
Cameron
91ee3e8bfc
fix(prettier) Print intend in doc debug view ( #1419 )
2023-11-19 11:07:32 +08:00
Hao Cheng
5543e8c435
feat(linter): eslint-plugin-unicorn/no-nested-ternary ( #1417 )
...
This PR implements the
[eslint-plugin-unicorn/no-nested-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md )
rule.
Tests taken from
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/test/no-nested-ternary.mjs .
Related issue: #684
2023-11-19 11:06:48 +08:00
Angelo Annunziata
b72f83b000
feat(linter): for-direction rule add check for condition in reverse o… ( #1418 )
...
Align eslint **for-direction** rule with the new default behaviour
https://github.com/eslint/eslint/pull/17755
2023-11-18 23:53:39 +00:00
Boshen
1dacb645d0
feat(prettier): start adding parent stack ( #1415 )
2023-11-18 16:39:24 +00:00
Boshen
abaa8c37a5
refactor(prettier): clean up some code ( #1414 )
2023-11-18 14:46:11 +00:00
Boshen
d0a70d0626
feat(prettier): print class method and read tab width ( #1413 )
2023-11-18 22:42:53 +08:00
Dunqing
b0248acb7b
refactor(prettier): refactor binaryish expression formatting ( #1412 )
2023-11-18 22:03:26 +08:00
Dunqing
f6ecd96e69
feat(prettier): print getter/setter function in PropertyKey ( #1411 )
2023-11-18 21:59:22 +08:00
RiESAEX
98279fc6ff
feat(linter): eslint-plugin-unicorn: no-hex-escape ( #1410 )
...
[Rule
Detail](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md )
#684
2023-11-18 21:57:06 +08:00
Boshen
bc3069ec76
feat(prettier): print empty object properties ( #1409 )
2023-11-18 16:52:54 +08:00
Wenzhe Wang
70b80ba542
feat(prettier): print TSTupleType ( #1408 )
2023-11-18 16:44:27 +08:00
Wenzhe Wang
97fee26e25
feat(prettier): print empty array ( #1407 )
2023-11-18 16:40:39 +08:00
Boshen
481af5040d
feat(prettier): format hashbang ( #1406 )
2023-11-18 16:00:52 +08:00
Boshen
c9f7f1308f
chore(prettier): allow trailing comma in some macros ( #1405 )
2023-11-18 15:42:39 +08:00
Boshen
323f2f9789
feat(prettier): format more import and export declarations ( #1404 )
2023-11-18 15:37:56 +08:00
Dunqing
b251c10b09
feat(prettier): print parameters in ArrowExpression ( #1400 )
2023-11-18 05:37:55 +00:00
Dunqing
7951849ec1
feat(prettier): support format function for ImportExpression ( #1399 )
2023-11-18 13:34:14 +08:00
magic-akari
f5894b636b
perf(regexp): remove unnecessary sort ( #1402 )
2023-11-18 13:28:55 +08:00
Dunqing
75eb708526
feat(prettier): transform expression to identifier in PropertyKey ( #1398 )
2023-11-18 11:20:43 +08:00
Boshen
fb7cdc6687
refactor(prettier): impl Display for Doc ( #1401 )
2023-11-18 11:17:03 +08:00
cin
3df810bf51
feat(linter): eslint-plugin-jest: no-deprecated-function ( #1316 )
2023-11-18 11:02:03 +08:00
Boshen
8cb0795796
feat(prettier): format SequenceExpression and ParenthesizedExpression ( #1397 )
2023-11-18 10:19:12 +08:00
Cameron
08f00cbd82
fix(prettier) if statement closing bracket indentation ( #1396 )
2023-11-18 09:51:25 +08:00
Cameron
39341e4688
feat(prettier) Print function args correctly ( #1395 )
2023-11-18 09:47:27 +08:00
Cameron
cff04ed09c
feat(prettier) print do while loop ( #1394 )
2023-11-18 09:41:27 +08:00
Cameron
db71974655
feat(prettier) Print labeled statement ( #1393 )
2023-11-18 09:36:28 +08:00
Cameron
ecbe0a4b98
feat(prettier) object assignments ( #1392 )
2023-11-18 09:31:26 +08:00
Cameron
6bb40a8f86
feat(prettier) array assignments ( #1391 )
2023-11-18 09:27:26 +08:00
Cameron
ba57544b6e
feat(prettier) TSInferType, TSIndexAccessType ( #1390 )
2023-11-18 09:22:37 +08:00
Boshen
7ed067ec28
feat(prettier): print NumberLiteral ( #1389 )
...
feat(prettier): print NumberLiteral
feat(prettier): format `NumberLiteral`
2023-11-18 02:06:09 +08:00
Cameron
b025213795
feat(prettier) port adjust clause ( #1388 )
2023-11-18 01:58:27 +08:00
Cameron
5cb6ff2895
feat(prettier) print while statement ( #1387 )
2023-11-18 01:52:27 +08:00
Cameron
0195affb5a
feat(prettier) print for in statements ( #1386 )
2023-11-18 01:46:27 +08:00
Cameron
b613eab2f0
feat(prettier) print for of statements ( #1385 )
2023-11-18 01:41:27 +08:00
Cameron
788e9b3807
feat(prettier) print for statement ( #1384 )
2023-11-18 01:36:14 +08:00
Boshen
f8b9679d74
feat(prettier): print module specifiers ( #1383 )
2023-11-17 22:03:28 +08:00
Cameron
001a8d8fe9
feat(prettier) print array pattern ( #1382 )
2023-11-17 21:56:41 +08:00