Commit graph

23 commits

Author SHA1 Message Date
mysteryven
4d28d037e6 feat(task/website): support render subschemas.all_of (#4800)
To solve unexpected snapshot update in #4742  : https://github.com/oxc-project/oxc/pull/4742/files#diff-4c1a03dc03cfd00f9eaecb5c66b61f4e57272c6262253f0dc82ea1b71223bac2
2024-08-14 06:12:03 +00:00
Boshen
955a4b4479
docs(oxlint): improve cli doc regarding fix and -D all
closes #3944
2024-08-12 14:58:12 +08:00
Don Isaac
cc922f4c89
feat(vscode): provide config's schema to oxlint config files (#4826)
Updates the VSCode plugin client to automatically provide our
auto-generated
JSON schema to `\.?oxlint(rc)?(\.json)?` files.
2024-08-12 09:15:47 +08:00
DonIsaac
3d40528588 feat(linter): add fix emoji to rules table and doc pages (#4715)
Rules table:
<img width="898" alt="image" src="https://github.com/user-attachments/assets/353052aa-0af3-4c09-8441-ff79f4561ca0">

Doc pages:
<img width="918" alt="image" src="https://github.com/user-attachments/assets/cb43cb2d-15ff-41e6-8523-145cfbc3f484">
2024-08-10 22:50:47 +00:00
DonIsaac
8f2a566f9f test(linter): ensure rule docs have valid syntax (#4644)
Adds tests for rule documentation by
1. Compiling doc markdown into HTML, which ensures docs use valid markdown syntax
2. Converts the generated HTML into JSX and parses the results with the parser, ensuring the generated HTML is valid

Has the added benefit of adding a lot of JSX test cases to the parser. I've also fixed all violations for these tests in this PR.
2024-08-10 05:03:09 +00:00
DonIsaac
f62951411d feat(website): auto-generate rule docs pages (#4640)
> AI-generated description because I'm lazy
### TL;DR

This PR introduces the ability to generate documentation for linter rules and adds new methods and metadata for rule fix capabilities.

To see what this looks like, please check out https://github.com/oxc-project/oxc-project.github.io/pull/165.

## Screenshots
Hyperlinks to rule doc pages in auto-generated rules table
<img width="809" alt="image" src="https://github.com/user-attachments/assets/e09eb47d-e86a-4ed1-b1f9-5034f33c71a2">

Example of a docs page
<img width="1273" alt="image" src="https://github.com/user-attachments/assets/78f7e9e6-f4dd-4cc9-aebc-1cdd64b024ec">

### What changed?

- Added `RuleFixMeta` to indicate rule fix capabilities
- Introduced methods `is_none` and `is_pending` in `RuleFixMeta`
- Modified `render_markdown_table` in `RuleTableSection` to accept an optional link prefix
- Created new modules for rule documentation and HTML rendering
- Updated `print_rules` function to generate markdown for rules and detailed documentation pages

### How to test?

Run the `linter-rules` task with appropriate arguments to generate the markdown table and documentation pages.
Verify the generated files for correctness and that all metadata is correctly displayed.

### Why make this change?

To enhance the project documentation and provide clear rule fix capabilities, thereby improving the developer experience and easing the integration process.

---
2024-08-10 00:13:06 +00:00
DonIsaac
7afa1f06c3 feat(linter): support suggestions and dangerous fixes (#4223) 2024-07-18 02:20:30 +00:00
Jelle van der Waa
1f8968a521
feat(linter): Add eslint-plugin-promise rules: avoid-new, no-new-statics, params-names (#4293)
This introduces the `eslint-plugin-promise` plugin and implements three
relatively simple rules.

Split off from https://github.com/oxc-project/oxc/pull/4252
2024-07-17 09:21:20 +08:00
mysteryven
328445b4ca feat(linter): support vitest/no-disabled-tests (#3717) 2024-06-24 15:16:32 +00:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt 2024-06-19 00:48:30 +08:00
Boshen
1c7f19c868 chore(oxlint): remove unused code (format command) (#3716) 2024-06-17 12:16:21 +00:00
Boshen
982e6f08df chore: make println and eprintln opt-in (#3712)
I noticed accidental `println` can be merged, which isn't really nice.
2024-06-17 10:40:34 +00:00
Boshen
dd42f279f7
chore: change website url to https://oxc.rs 2024-06-05 22:05:08 +08:00
Boshen
19bb1c02f2 fix(website): hack schemars to render code snippet in markdown (#3417) 2024-05-26 10:36:53 +00:00
Boshen
21505e885c refactor(cli): move crates/oxc_cli to apps/oxlint (#3413)
We need to split the cli crate up to reduce dependencies,
the current cli crate is pulling in `oxc_prettier`, which is redundant
for the linter.
2024-05-26 05:00:30 +00:00
Boshen
9377a60677
chore(linter): write json schema to npm/oxlint 2024-05-24 13:28:03 +08:00
Boshen
5bf595d6f7
refactor(linter): rename variable names prefix ESLint to Oxlint 2024-05-24 12:58:27 +08:00
Boshen
809e4fc03f
chore(website): snapshot cli and json schema output 2024-05-24 12:23:43 +08:00
Boshen
ff4252a201
feat(website): improve codegen to linter cli 2024-05-23 20:57:13 +08:00
Boshen
3671b5c4d0
feat(tasks/website): code generate the linter rules 2024-05-23 15:21:37 +08:00
Boshen
ead637bf50
feat(website): generate linter configuration page 2024-05-23 12:07:17 +08:00
Boshen
57d2bcacea feat(tasks/website): start generating linter config markdown from json schema (#3386) 2024-05-22 16:09:33 +00:00
Boshen
40ab95b055 feat(tasks): add website tasks (#3377)
Adds the following tasks so we can use them in the website repo to generate documentations.

`cargo run -p website`
* linter-cli
* linter-rules
* linter-json-schema
2024-05-21 17:46:07 +00:00