Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
oxc/justfile at main · surplus/oxc · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
surplus
oxc
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
oxc
/
justfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
225 lines (174 loc) · 6.3 KB
main
Breadcrumbs
oxc
/
justfile
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
225 lines (174 loc) · 6.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#!
/
usr
/
bin
/
env
-S just --
justfile
set
windows-shell
:=
[
"
powershell.exe"
,
"
-NoLogo"
,
"
-Command"
]
set
shell
:=
[
"
bash"
,
"
-cu"
]
_
default
:
@
just --list -u
alias
r
:=
ready
alias
c
:=
conformance
alias
f
:=
fix
alias
new-typescript-rule
:=
new-ts-rule
# Make sure you have cargo-binstall and pnpm installed.
# You can download the pre-compiled binary from <https://github.com/cargo-bins/cargo-binstall#installation>
# or install via `cargo install cargo-binstall`
# Initialize the project by installing all the necessary tools.
init
:
# Rust related init
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear dprint -y
# Node.js related init
pnpm install
# When ready, run the same CI commands
ready
:
git diff --exit-code --quiet
typos
just fmt
just check
just test
just lint
just doc
just ast
git status
# Clone or update submodules
# Make sure to update `.github/actions/clone-submodules/action.yml` too
submodules
:
just clone-submodule tasks
/
coverage
/
test2
62
https:
//
github.com
/
tc3
9
/
test2
62.
git bc5c1
4176
e2b1
1
a7
8859571
eb6
93
f0
28
c8
822458
just clone-submodule tasks
/
coverage
/
babel https:
//
github.com
/
babel
/
babel.git
578
ac4df1c8a0
5
f0
1350553950
dbfbbeaac0
13
c2
just clone-submodule tasks
/
coverage
/
typescript https:
//
github.com
/
microsoft
/
TypeScript.git
15392346
d0
5045742
e6
53
eab5c8
7538
ff2a3c8
63
just clone-submodule tasks
/
prettier_conformance
/
prettier https:
//
github.com
/
prettier
/
prettier.git
7584432401
a4
7
a2
6943
dd7a9ca9a8e0
32
ead7
285
just clone-submodule tasks
/
coverage
/
acorn-test2
62
https:
//
github.com
/
oxc-project
/
acorn-test2
62
b4
592303
caa4
42
d3
592
f5c1c3
61
dc70
3
cec8
41
b2
just update-transformer-fixtures
# Install git pre-commit to format files
install-hook
:
echo -e
"
#!/bin/sh
\n
just fmt"
> .git
/
hooks
/
pre-commit
chmod
+
x .git
/
hooks
/
pre-commit
watch
*
args
=
'
'
:
watchexec --no-vcs-ignore
{{
args
}}
watch-check
:
just watch
"
'cargo check; cargo clippy'"
# Run the example in `parser`, `formatter`, `linter`
example
tool
*
args
=
'
'
:
cargo run -p oxc_
{{
tool
}}
--example
{{
tool
}}
--
{{
args
}}
watch-example
*
args
=
'
'
:
just watch
'
just example
{{
args
}}
'
# Build oxlint in release build; Run with `./target/release/oxlint`.
oxlint
:
cargo oxlint
# Watch oxlint
watch-oxlint
*
args
=
'
'
:
just watch
'
cargo run -p oxlint --
{{
args
}}
'
# Run cargo check
check
:
cargo ck
# Run all the tests
test
:
cargo test
# Lint the whole project
lint
:
cargo lint -- --deny warnings
# Format all files
fmt
:
cargo shear --fix
# remove all unused dependencies
cargo fmt --all
dprint fmt
[
unix
]
doc
:
RUSTDOCFLAGS=
'
-D warnings'
cargo doc --no-deps --document-private-items
[
windows
]
doc
:
$Env:RUSTDOCFLAGS=
'
-D warnings'
; cargo doc --no-deps --document-private-items
# Fix all auto-fixable format and lint issues. Make sure your working tree is clean first.
fix
:
cargo clippy --fix --allow-staged --no-deps
just fmt
typos -w
git status
# Run all the conformance tests. See `tasks/coverage`, `tasks/transform_conformance`
coverage
:
cargo coverage
cargo run -p oxc_transform_conformance -- --exec
cargo run -p oxc_prettier_conformance
# Run Test262, Babel and TypeScript conformance suite
conformance
*
args
=
'
'
:
cargo coverage --
{{
args
}}
# Generate AST related boilerplate code.
# Run this when AST definition is changed.
ast
:
cargo run -p oxc_ast_tools
just check
# Get code coverage
codecov
:
cargo codecov --html
# Run the benchmarks. See `tasks/benchmark`
benchmark
:
cargo benchmark
# Run the benchmarks for a single component.
# e.g. `just benchmark-one parser`.
# See `tasks/benchmark`.
benchmark-one
*
args
:
cargo benchmark --bench
{{
args
}}
--no-default-features --features
{{
args
}}
# Automatically DRY up Cargo.toml manifests in a workspace.
autoinherit
:
cargo binstall cargo-autoinherit
cargo autoinherit
# Test Transform
test-transform
*
args
=
'
'
:
cargo run -p oxc_transform_conformance -- --exec
{{
args
}}
# Update transformer conformance test fixtures
update-transformer-fixtures
:
cd tasks
/
coverage
/
babel; git reset --hard HEAD; git
clean
-f -q
node tasks
/
transform_conformance
/
update_fixtures.mjs
# Test ESTree
test-estree
*
args
=
'
'
:
cargo run -p oxc_coverage --profile coverage -- estree
{{
args
}}
# Install wasm32-wasip1-threads for playground
install-wasm
:
rustup target add wasm3
2
-wasip1-threads
watch-playground
:
just watch
'
pnpm --filter oxc-playground dev'
build-playground
mode
=
"
release"
:
pnpm --filter oxc-playground build
# Generate the JavaScript global variables. See `tasks/javascript_globals`
javascript-globals
:
cargo run -p javascript_globals
# Create a new lint rule by providing the ESLint name. See `tasks/rulegen`
new-rule
name
:
cargo run -p rulegen
{{
name
}}
new-jest-rule
name
:
cargo run -p rulegen
{{
name
}}
jest
new-ts-rule
name
:
cargo run -p rulegen
{{
name
}}
typescript
new-unicorn-rule
name
:
cargo run -p rulegen
{{
name
}}
unicorn
new-import-rule
name
:
cargo run -p rulegen
{{
name
}}
import
new-react-rule
name
:
cargo run -p rulegen
{{
name
}}
react
new-jsx-a11y-rule
name
:
cargo run -p rulegen
{{
name
}}
jsx-a1
1
y
new-oxc-rule
name
:
cargo run -p rulegen
{{
name
}}
oxc
new-nextjs-rule
name
:
cargo run -p rulegen
{{
name
}}
nextjs
new-jsdoc-rule
name
:
cargo run -p rulegen
{{
name
}}
jsdoc
new-react-perf-rule
name
:
cargo run -p rulegen
{{
name
}}
react-perf
new-n-rule
name
:
cargo run -p rulegen
{{
name
}}
n
new-promise-rule
name
:
cargo run -p rulegen
{{
name
}}
promise
new-vitest-rule
name
:
cargo run -p rulegen
{{
name
}}
vitest
[
unix
]
clone-submodule
dir
url
sha
:
cd
{{
dir
}}
||
git init
{{
dir
}}
cd
{{
dir
}}
&&
git remote add origin
{{
url
}}
||
true
cd
{{
dir
}}
&&
git fetch --depth=
1
origin
{{
sha
}}
&&
git reset --hard
{{
sha
}}
&&
git
clean
-f -q
[
windows
]
clone-submodule
dir
url
sha
:
if
(-not (Test-Path {{dir}}
/
.git)) { git init
{{
dir
}}
}
cd
{{
dir
}}
;
if
((git remote) -notcontains
'
origin'
) { git remote add origin
{{
url
}}
}
else
{ git remote set-url origin
{{
url
}}
}
cd
{{
dir
}}
; git fetch --depth=
1
origin
{{
sha
}}
; git reset --hard
{{
sha
}}
; git
clean
-f -q
website
path
:
cargo run -p website -- linter-rules --table
{{
path
}}
/
src
/
docs
/
guide
/
usage
/
linter
/
generated-rules.md --rule-docs
{{
path
}}
/
src
/
docs
/
guide
/
usage
/
linter
/
rules --git-ref $(git rev-parse HEAD)
cargo run -p website -- linter-cli >
{{
path
}}
/
src
/
docs
/
guide
/
usage
/
linter
/
generated-cli.md
cargo run -p website -- linter-schema-markdown >
{{
path
}}
/
src
/
docs
/
guide
/
usage
/
linter
/
generated-config.md
You can’t perform that action at this time.