Commit graph

1751 commits

Author SHA1 Message Date
Cameron
b528af1b93
feat(printer) Print SwitchStatement (#1281) 2023-11-14 12:14:02 +08:00
Cameron
7182cc6ebe
feat(printer) Print Argument (#1280) 2023-11-14 09:50:30 +08:00
Cameron
232b93ba41
feat(printer) Print ArrayExpression (#1279) 2023-11-14 09:45:26 +08:00
Boshen
41e145b4af
ci: don't run prettier conformance yet 2023-11-14 09:44:58 +08:00
Boshen
dd4c53cd73
ci: update ignored files for codecov 2023-11-14 09:43:25 +08:00
Cameron
561c73d88c
feat(printer) Basic Printer options (#1278) 2023-11-14 09:37:18 +08:00
Dunqing
0297cf7cc7
fix(prettier): remove redundant newline and semicolons from the Program (#1284) 2023-11-14 09:36:37 +08:00
Dunqing
3942256af4
feat(prettier): correctly format the NumberLiteral (#1283) 2023-11-14 09:27:56 +08:00
Dunqing
7f01d48df3
feat(transformer/react-jsx): set automatic to the default value for runtime (#1270)
Align babel8
2023-11-14 09:26:21 +08:00
Cameron
0fcd0fe28e
feat(linter) eslint plugin unicorn: no useless promise resolve reject (#1254) 2023-11-13 22:21:42 +00:00
Cameron
3db074b87c
feat(printer) Print TryStatement (#1277) 2023-11-13 19:16:05 +00:00
Cameron
2adfec6c0f
feat(printer) Print ContinueStatement (#1276) 2023-11-13 18:29:28 +00:00
Cameron
4ea0aacdb4
feat(printer) Print ThrowStatement (#1275) 2023-11-13 18:28:14 +00:00
Cameron
f892a9e8a1
feat(printer) Print BreakStatement (#1274) 2023-11-13 18:28:06 +00:00
Cameron
cef4c88579
feat(printer) Print UnaryExpression (#1273) 2023-11-13 18:27:52 +00:00
Cameron
a7acd07df8
feat(printer) Print UpdateExpression (#1272) 2023-11-13 18:27:08 +00:00
Cameron
1fb12d0088
feat(printer) Print RegExpLiteral (#1269) 2023-11-13 15:06:59 +00:00
Cameron
1cc003f194
feat(printer) Print PrivateIdentifier (#1268) 2023-11-13 15:06:49 +00:00
Boshen
5c1637b786
feat(prettier): add some basic formatting functions (#1266) 2023-11-13 13:27:53 +00:00
Cameron
ca82125f0b
feat(printer) Print Debugger statement (#1265) 2023-11-13 13:06:29 +00:00
Cameron
74e5616acc
feat(prettier) Print Super expression (#1264) 2023-11-13 13:02:36 +00:00
Cameron
728b7832dc
feat(prettier) Print this expression (#1263) 2023-11-13 13:02:21 +00:00
Boshen
4a6f54cc1a
feat(prettier_conformance): add prettier test runner (#1262) 2023-11-13 20:14:35 +08:00
Cameron
c0d42b8a33
feat(linter) eslint plugin unicorn: prefer dom node dataset (#1257) 2023-11-13 09:46:41 +00:00
Radu Baston
76d4690218
feat(linter) eslint plugin unicorn: empty-brace-spaces (#1249)
New contributor here to an amazing project. I think I covered all the
cases where braces can be used.
Plugin: #684 

[Rule](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md)

---------

Co-authored-by: Radu Baston <radu.baston@sectorlabs.ro>
2023-11-13 17:28:23 +08:00
Cameron
97e0212d58
feat(linter) eslint plugin unicorn: no lonely if (#1252) 2023-11-13 09:19:50 +00:00
Cameron
90b09e9725
feat(linter) eslint plugin unicorn: no typeof undefined (#1251) 2023-11-13 09:07:53 +00:00
Cameron
1f58023739
feat(linter) eslint-plugin-unicorn: prefer string slice (#1247) 2023-11-13 09:02:12 +00:00
Cameron
6d12f6a5dc
feat(linter) eslint plugin unicorn: no negated condition (#1253) 2023-11-13 08:53:10 +00:00
Cameron
bd2e3f746f
feat(linter) eslint plugin unicorn: prefer string replace all (#1248) 2023-11-13 08:52:22 +00:00
dependabot[bot]
6da449ef48
chore(deps): bump the dependencies group with 1 update (#1261)
Bumps the dependencies group with 1 update:
[env_logger](https://github.com/rust-cli/env_logger).

<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's
changelog</a>.</em></p>
<blockquote>
<h2>[0.10.1] - 2023-11-10</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="36623f573b"><code>36623f5</code></a>
chore: Release env_logger version 0.10.1</li>
<li><a
href="8a033d8438"><code>8a033d8</code></a>
chore: Fix packaging</li>
<li><a
href="9df7e6c081"><code>9df7e6c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/241">#241</a>
from ChrisDenton/simple-insert</li>
<li><a
href="46ccdd94f5"><code>46ccdd9</code></a>
perf: Replace <code>HashMap</code> with a <code>Vec</code></li>
<li><a
href="bdc96a421f"><code>bdc96a4</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/249">#249</a>
from atouchet/v10</li>
<li><a
href="983837c47b"><code>983837c</code></a>
Update links and remove broken badge</li>
<li><a
href="dcd220dfaf"><code>dcd220d</code></a>
Update listed version number</li>
<li><a
href="36b1508ea1"><code>36b1508</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/260">#260</a>
from y-yagi/2018-edition</li>
<li><a
href="6f64347c6a"><code>6f64347</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/282">#282</a>
from epage/syntax</li>
<li><a
href="b29735781a"><code>b297357</code></a>
chore: Update docs and examples to 2018 edition</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=env_logger&package-manager=cargo&previous-version=0.10.0&new-version=0.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 08:38:31 +00:00
Boshen
65be4acdd4
feat(prettier): init project and infrastructure (#1260)
> [!NOTE]  
> This is going to be a community project because I don't have the time
and energy to work on this alone.

# Prettier

Background: 22.5K USD bounty for prettier written in Rust?!

See https://console.algora.io/challenges/prettier

> [!WARNING]  
> ## Contribution Agreement
> 
> You hereby agree that you contribute for fun and for the purpose of
learning, not for the goal of winning the challenge.
> 
> In the unlikely event of winning the challenge, @boshen will
ultimately decide on how to spend the money.
>

> [!IMPORTANT]  
Please talk to me on [discord](https://discord.com/invite/9uXCAwqQZW)
and indicate that you are willing to contribute and agree to the
contribution agreement.

## Getting started

Create a `test.js` and run the example `just example prettier` from
`crates/oxc_prettier/examples/prettier.rs`, follow the code structure
and read the references documented at the top of the files.

# Tasks

- [x] Have the basic infrastructure ready for contribution
- [ ] Implement a test runner in Rust which extracts the snapshots and
do a comparison over it
- [ ] Establish a way to pass all the tests by manually porting code
- [ ] Pass as many tests as possible in
https://github.com/prettier/prettier/tree/main/tests/format/js
2023-11-13 14:34:20 +08:00
Wenzhe Wang
f3788eec31
refactor(linter): remove all old parse_expect_jest_fn_call (#1259) 2023-11-13 14:33:41 +08:00
Dunqing
472707c04e
feat(task/transformer-conformance): skip babel 8 unsupported test cases (#1258)
Prior to babel8, object merging would use `babelHelper.extend`, which
caused most tests to fail
2023-11-13 11:05:36 +08:00
Cameron
6f642e2a9f
feat(linter) eslint plugin unicorn: prefer dom node append (#1256) 2023-11-13 08:58:06 +08:00
Cameron
89b6fce958
feat(linter) eslint plugin unicorn: no document cookie (#1255) 2023-11-13 08:56:18 +08:00
Cameron
11b43fa528
feat(linter) eslint plugin unicorn: no this assignment (#1250) 2023-11-13 08:49:05 +08:00
Cameron
8496156bb7
feat(linter) eslint plugin unicorn: prefer string starts ends with (#1246) 2023-11-13 08:43:02 +08:00
Cameron
d55ce0ddc6
fix(linter) Fix prefer date now with parenthesis (#1245) 2023-11-13 08:42:05 +08:00
Cameron
f3f3383733
fix(linter) Fix no object as default param with parenthesis (#1244) 2023-11-13 08:41:47 +08:00
Cameron
3a92828a0a
fix(linter) Fix no instanceof array with parenthesis (#1243) 2023-11-13 08:41:33 +08:00
Cameron
e60c287b77
fix(linter) Fix catch error name with parenthesis (#1242) 2023-11-13 08:41:20 +08:00
Cameron
f25b496eea
fix(linter) Fix prefer type error with parenthesis (#1240) 2023-11-13 00:05:58 +08:00
Cameron
9f653881bb
fix(linter) Fix prefer logical operator error with parenthesis (#1241) 2023-11-13 00:05:24 +08:00
Wenzhe Wang
80f3d13761
chore(linter): replace with parse_general_jest_fn_new (#1237) 2023-11-12 20:27:54 +08:00
Dunqing
d62631e239
refactor(transformer/react-jsx): use extend instead of for-in with push (#1236) 2023-11-12 19:26:15 +08:00
Dunqing
47ba874f4f
refactor(transformer/react-jsx): improve SpreadChildrenAreNotSupported error implementation (#1235) 2023-11-12 19:17:09 +08:00
Wenzhe Wang
1dd321e021
refactor(linter): remove all old parse_general_jest_fn_call in jest rules (#1232) 2023-11-12 18:57:30 +08:00
magic-akari
9c0aafcd1c
fix(parser): Disallow ReservedWord in NamedExports (#1230)
- fix: #1222

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-12 10:52:02 +00:00
Wenzhe Wang
f775488102
refactor(lint): replace parse_jest_fn_* methods in eslint-plugin-jest(no-standalone-expect) rule (#1231) 2023-11-12 18:51:24 +08:00