Commit graph

77 commits

Author SHA1 Message Date
Boshen
601153fe8f
refactor(benchmark): use more complicated files (#1811)
closes #1806

---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-25 17:27:02 +08:00
msdlisper
6a90cd4af4
feat(linter): add jsx-a11y settings (#1668)
When we developed linter for #1141 , we needed to configure some
settings for `jsx-a11y`, which was not supported before, but I am trying
to support it now.
like this:
```
fn config() -> serde_json::Value {
    serde_json::json!([2,{
        "ignoreNonDOM": true
    }])
}

fn settings() -> serde_json::Value {
    serde_json::json!({
        "jsx-a11y": {
            "components": {
                "Button": "button",
            }
        }
    })
}

let pass = vec![
    ("<Button />", Some(config()), Some(settings())),
];
```
2023-12-16 13:45:14 +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
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
Boshen
1a576f60a8
refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08:00
Boshen
9780621925
chore: run fmt 2023-11-16 13:36:42 +08:00
Boshen
73d6d40778
rust: do not compile libs and bins that do not have tests (#1342) 2023-11-16 13:35:24 +08:00
Boshen
e8b6e32b7c
ci: disable prettier tests 2023-11-16 12:41:29 +08:00
Boshen
039b53f6e7
ci: stop benchmark marking prettier and resolver until they are fixed 2023-11-16 10:57:50 +08:00
Boshen
5f316626f6
feat(prettier): add the basics of comment printing (#1313) 2023-11-14 12:32:03 +00:00
Boshen
3dee2c7178
feat(benchmark): add prettier (#1302) 2023-11-14 17:47:17 +08:00
Boshen
eca98cf2ed
s/web-infra-dev/oxc-project 2023-11-10 14:30:18 +08:00
Dunqing
8c624abf9c
feat(transformer/react-jsx): throw the pragma and pragmaFrag cannot be set when runtime is automatic error (#1196)
close: #1194

Here's a rough implementation of my idea of throwing an error.
2023-11-10 12:50:54 +08:00
Wenzhe Wang
6a03775c49
chore(benchmark): reopen jest and jsx-a11y for benchmark (#1169) 2023-11-07 10:48:16 +08:00
Boshen
69150d812c
refactor(transformer): move Semantic into Transformer (#1130) 2023-11-02 13:10:15 +08:00
Boshen
46a5c42c75
refactor(transformer): add TransformerCtx struct for easier access to symbols and scopes 2023-10-19 16:19:27 +08:00
Boshen
cc6c52e536
fix(benchmark): bench the whole transformation pipeline (#998) 2023-10-16 13:17:15 +08:00
Boshen
0f72066f2e
feat(transformer): finish 2016 exponentiation operator (#996) 2023-10-16 09:30:04 +08:00
Boshen
801d78a3c6
refactor(minifier): make the minifier api only accept an ast (#990) 2023-10-14 00:51:29 +08:00
Boshen
8c12dff8a3
perf: speed tasks run by using a global allocator 2023-10-11 20:30:30 +08:00
Boshen
eaa0c58e24
feat(linter): eslint-plugin-unicorn(filename-case) (#978) 2023-10-11 15:23:17 +08:00
Boshen
ef8aaa7bf1
feat(minifier): re-enable mangler (#972) 2023-10-10 14:32:58 +08:00
Boshen
7e84369cad
refactor(resolver): move tests folder to fixtures (#964) 2023-10-08 13:29:02 +08:00
Boshen
817f8c295e
ci: turn off doc tests because they are slow to compile and run (#961) 2023-10-07 17:01:23 +08:00
Boshen
5973e5aede
feat(transformer): setup typescript and react transformers (#930) 2023-09-18 16:56:41 +08:00
Boshen
46d2623c1f
feat(transform_conformance): add jsx and ts tests 2023-09-18 15:35:02 +08:00
Boshen
540fa03ec0
feat(benchmark): add transformer benchmark (#919) 2023-09-16 17:09:27 +08:00
Boshen
ceeee5909b
Remove HIR (#917)
closes #273
closes #814

HIR is removed from this PR, with the minifier being commented out.

HIR is a wonderful idea for compiling to lower languages, but after
sitting on it for a few months I found that it only adds confusion and
uncertainties to both myself and future contributors.

It also adds too much burden to maintainers if we plan to support more
downstream tools.

1 AST is the only way.
2023-09-15 23:48:32 +08:00
Boshen
a9d36f158f
chore(benchmark): turn on all lints (#892)
closes #888
2023-09-10 23:16:39 +08:00
Boshen
9ff12a9696
feat(linter): eslint-plugin-import/no-self-import (#878)
closes #440 #441
2023-09-10 00:12:26 +08:00
Boshen
a6db5e696c
chore(resolver): add more alias data to benchmark (#868) 2023-09-08 00:08:26 +08:00
Boshen
ee54575ec1
feat(linter): add runner for import-plugin (#858) 2023-09-06 14:54:19 +08:00
Boshen
4ada0ecbb8
chore(resolver): add more benchmark data (#853) 2023-09-04 22:02:48 +08:00
Boshen
da44fd8999
feat(benchmark): add linter benchmark (#842) 2023-09-03 09:55:01 +08:00
Boshen
53b094e46c
chore: clean up deps (#840) 2023-09-02 21:34:24 +08:00
Boshen
2ba18e073c
fix(benchmark): use different data sets for benchmark and minifier test 2023-09-02 20:56:45 +08:00
Boshen
56aaf31fb1
refactor(benchmark): use codspeed for all benchmarks (#839) 2023-09-02 20:35:48 +08:00
Boshen
b2db6f7ef1
chore(benchmark): remove the measurement_time 2023-08-24 14:31:19 +08:00
Don Isaac
e7d8d4ba46
feat(linter): enable module record builder 2023-08-02 11:44:27 +08:00
Boshen
a55ba5941c
refactor(benchmark): use iter_with_large_drop (#587)
This also removes `black_box`, since criterion always black boxes the values for us
2023-07-23 11:35:16 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate (#460) 2023-06-19 20:20:59 +08:00
Boshen
0d5db3d2f7
feat(benchmark): add bench semantic 2023-06-19 18:30:30 +08:00
Boshen
1d617e64ff
ci: sleep 15s before running the benchmark (#382) 2023-05-24 21:12:33 +08:00
Boshen
bedce7dc65
chore(benchmark): sync js versions to privatenumber/minification-benchmarks 2023-05-22 12:23:24 +08:00
Boshen
ad2835f11b
chore(rustfmt): run cargo fmt 2023-05-21 11:52:26 +08:00
Boshen
df06c3a51a
feat(benchmark): add minifier to benchmark (#365) 2023-05-20 22:31:04 +08:00
Boshen
14720e7c69
refactor: move SourceType from oxc_ast to oxc_span (#351)
related #350
2023-05-12 23:16:14 +08:00
Boshen
25a359bdd7
fix(benchmark): fix AstLower benchmark taking up too much memory 2023-05-11 10:42:55 +08:00
Boshen
48e524ddcf
feat(ast_lower): scope tree (#344) 2023-05-10 22:38:34 +08:00
Boshen
60485669bb
ci: cache release for benchmark, benchmark use fewer files (#345) 2023-05-10 22:13:11 +08:00