Skip to content

Commit 12b9788

Browse files
authored
ci: use oxfmt and oxlint (#236)
1 parent 8bab8f0 commit 12b9788

16 files changed

Lines changed: 2636 additions & 5337 deletions

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

.gitignore

Lines changed: 9 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,18 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
421
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Microbundle cache
58-
.rpt2_cache/
59-
.rts2_cache_cjs/
60-
.rts2_cache_es/
61-
.rts2_cache_umd/
62-
63-
# Optional REPL history
64-
.node_repl_history
2+
dist
3+
coverage
654

66-
# Output of 'npm pack'
5+
*.log
676
*.tgz
7+
*.tsbuildinfo
688

69-
# Yarn Integrity file
70-
.yarn-integrity
71-
72-
# dotenv environment variables file
739
.env
74-
.env.test
75-
.env.production
76-
.env.local
77-
78-
# parcel-bundler cache (https://parceljs.org/)
79-
.cache
80-
.parcel-cache
81-
82-
# Next.js build output
83-
.next
84-
out
85-
86-
# Nuxt.js build / generate output
87-
.nuxt
88-
dist
89-
90-
# Gatsby files
91-
.cache/
92-
# Comment in the public line in if your project uses Gatsby and not Next.js
93-
# https://nextjs.org/blog/next-9-1#public-directory-support
94-
# public
95-
96-
# vuepress build output
97-
.vuepress/dist
98-
99-
# Serverless directories
100-
.serverless/
101-
102-
# FuseBox cache
103-
.fusebox/
104-
105-
# DynamoDB Local files
106-
.dynamodb/
107-
108-
# TernJS port file
109-
.tern-port
110-
111-
# Stores VSCode versions used for testing VSCode extensions
112-
.vscode-test
10+
.env.*
11311

114-
# yarn v2
115-
.yarn/cache
116-
.yarn/unplugged
117-
.yarn/build-state.yml
118-
.yarn/install-state.gz
119-
.pnp.*
12+
# VSCode
13+
.vscode/*
14+
!.vscode/extensions.json
15+
!.vscode/settings.json
12016

12117
# Docusaurus
12218
website/node_modules

.oxfmtrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"tabWidth": 2,
4+
"printWidth": 80,
5+
"trailingComma": "none",
6+
"semi": true,
7+
"useTabs": false,
8+
"singleQuote": false,
9+
"bracketSpacing": true,
10+
"sortPackageJson": false,
11+
"ignorePatterns": [
12+
"coverage",
13+
"dist",
14+
"website/.next",
15+
"website/.docusaurus",
16+
"website/build"
17+
]
18+
}

.prettierignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["oxc.oxc-vscode"]
3+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "oxc.oxc-vscode",
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.oxc": "explicit"
6+
}
7+
}

CLAUDE.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,19 @@ pnpm test
2424
# Run tests with coverage
2525
pnpm test:coverage
2626

27-
# Format code
27+
# Format code (oxfmt)
2828
pnpm format
29-
pnpm format:write
3029
pnpm format:check
3130

32-
# Lint code
31+
# Lint code (oxlint)
3332
pnpm lint
3433
pnpm lint:fix
3534

3635
# Build the project
3736
pnpm build
3837

39-
# Verify everything (format, lint, test, build, size)
38+
# Verify everything (format, lint, test, build)
4039
pnpm verify
41-
42-
# Check bundle size
43-
pnpm size
44-
pnpm analyze
4540
```
4641

4742
## Project Structure
@@ -59,7 +54,7 @@ pnpm analyze
5954

6055
## Testing
6156

62-
Tests are written using Jest. Each API function has a corresponding `.test.ts` file. The project maintains 100% test coverage for branches, functions, lines, and statements.
57+
Tests are written using Vitest. Each API function has a corresponding `.test.ts` file. The project maintains 100% test coverage for branches, functions, lines, and statements.
6358

6459
To run a single test file:
6560

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,15 @@
1212
<br />
1313
</p>
1414

15-
<p align="center">
16-
<a href="https://github.com/prettier/prettier">
17-
<img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square" alt="Styled with Prettier" />
18-
</a>
19-
20-
<a href="https://github.com/semantic-release/semantic-release">
21-
<img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="Semantic Release" />
22-
</a>
23-
</p>
24-
2515
<hr />
2616

2717
## Features
2818

2919
&nbsp;Modular by design, and supports tree-shaking.
3020
&nbsp;Aligns with the [community API documentation](https://andshrew.github.io/PlayStation-Trophies/#/).
31-
&nbsp;Supports Node environments (20 and above).
32-
&nbsp;Supports browsers.
33-
&nbsp;Ships with TypeScript support and types.
21+
&nbsp;Supports Node environments (20 and above).
22+
&nbsp;Supports browsers.
23+
&nbsp;Ships with TypeScript support and types.
3424
&nbsp;Zero production dependencies.
3525

3626
<hr />

0 commit comments

Comments
 (0)