Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

45 changes: 0 additions & 45 deletions .eslintrc.js

This file was deleted.

122 changes: 9 additions & 113 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,122 +1,18 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history
dist
coverage

# Output of 'npm pack'
*.log
*.tgz
*.tsbuildinfo

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env.production
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.env.*

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# VSCode
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json

# Docusaurus
website/node_modules
Expand Down
18 changes: 18 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"tabWidth": 2,
"printWidth": 80,
"trailingComma": "none",
"semi": true,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": true,
"sortPackageJson": false,
"ignorePatterns": [
"coverage",
"dist",
"website/.next",
"website/.docusaurus",
"website/build"
]
}
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["oxc.oxc-vscode"]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
}
}
13 changes: 4 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,19 @@ pnpm test
# Run tests with coverage
pnpm test:coverage

# Format code
# Format code (oxfmt)
pnpm format
pnpm format:write
pnpm format:check

# Lint code
# Lint code (oxlint)
pnpm lint
pnpm lint:fix

# Build the project
pnpm build

# Verify everything (format, lint, test, build, size)
# Verify everything (format, lint, test, build)
pnpm verify

# Check bundle size
pnpm size
pnpm analyze
```

## Project Structure
Expand All @@ -59,7 +54,7 @@ pnpm analyze

## Testing

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.
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.

To run a single test file:

Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@
<br />
</p>

<p align="center">
<a href="https://github.com/prettier/prettier">
<img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square" alt="Styled with Prettier" />
</a>

<a href="https://github.com/semantic-release/semantic-release">
<img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="Semantic Release" />
</a>
</p>

<hr />

## Features

✅ &nbsp;Modular by design, and supports tree-shaking.
✅ &nbsp;Aligns with the [community API documentation](https://andshrew.github.io/PlayStation-Trophies/#/).
✅ &nbsp;Supports Node environments (20 and above).
✅ &nbsp;Supports browsers.
✅ &nbsp;Ships with TypeScript support and types.
✅ &nbsp;Supports Node environments (20 and above).
✅ &nbsp;Supports browsers.
✅ &nbsp;Ships with TypeScript support and types.
✅ &nbsp;Zero production dependencies.

<hr />
Expand Down
14 changes: 14 additions & 0 deletions oxlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import nkzw from "@nkzw/oxlint-config";
import { defineConfig } from "oxlint";

export default defineConfig({
extends: [nkzw],
ignorePatterns: ["dist", "coverage", "website"],
rules: {
"unicorn/no-null": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/no-array-reduce": "off",
"unicorn/filename-case": "off",
"typescript/no-explicit-any": "off"
}
});
27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,31 @@
"playground": "vite-node --watch src/__playground.ts",
"build": "vite build",
"prepare": "vite build",
"format": "prettier --write . '**/*.{json,md,js,ts,tsx}'",
"format:check": "prettier --check . '**/*.{json,md,js,ts,tsx}'",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"lint:fix": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx . --fix",
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "oxlint",
"lint:fix": "oxlint --fix",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"verify": "pnpm format && pnpm lint:fix && pnpm test:coverage && pnpm build",
"verify": "npm-run-all --parallel format:check lint && npm-run-all test:coverage build",
"semantic-release": "semantic-release"
},
"devDependencies": {
"@faker-js/faker": "^7.6.0",
"@nkzw/oxlint-config": "^1.0.1",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/github": "^12.0.6",
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.0",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@vitest/coverage-istanbul": "^4.0.18",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-sonarjs": "^0.25.0",
"eslint-plugin-unicorn": "^56.0.1",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-perfectionist": "^5.6.0",
"eslint-plugin-unused-imports": "^4.4.1",
"nock": "^14.0.4",
"prettier": "^3.8.1",
"npm-run-all2": "^8.0.4",
"oxfmt": "^0.36.0",
"oxlint": "^1.51.0",
"semantic-release": "^25.0.3",
"typescript": "^5.8.0",
"vite": "^7.3.1",
Expand Down
Loading