Skip to content

Commit b5534e8

Browse files
chore: replace ESLint and Prettier with oxlint and oxfmt (#40)
* chore: replace ESLint and Prettier with oxlint and oxfmt Migrates from ESLint + Prettier to the oxc toolchain (oxlint + oxfmt) for faster linting and formatting. Uses the automated migration tools (@oxlint/migrate and oxfmt --migrate=prettier) to preserve existing rule configuration and formatting settings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: replace resolutions with pnpm overrides The `resolutions` field is Yarn-specific. Use `pnpm.overrides` instead, which is the correct equivalent for pnpm package manager. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: replace catalog: with explicit versions for oxfmt and oxlint This repo is standalone and not part of a pnpm workspace catalog, so explicit version ranges are needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove unused pnpm overrides Remove flatted, minimatch@9, and ajv@6 overrides as none of these packages exist in the dependency tree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: bump version --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7f00422 commit b5534e8

37 files changed

Lines changed: 1052 additions & 1342 deletions

.github/workflows/build-test.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
name: Build and Test Node SDK
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
7-
types: ["opened", "synchronize", "reopened"]
4+
pull_request:
5+
branches:
6+
- main
7+
types: ["opened", "synchronize", "reopened"]
88

9-
workflow_dispatch:
9+
workflow_dispatch:
1010

11-
push:
12-
branches:
13-
- check-tests
11+
push:
12+
branches:
13+
- check-tests
1414

1515
jobs:
16-
build-lint:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
16+
build-lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
2020

21-
- name: Set up Node.js
22-
uses: actions/setup-node@v4
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
2323

24-
- name: Enable corepack
25-
run: corepack enable pnpm
24+
- name: Enable corepack
25+
run: corepack enable pnpm
2626

27-
- name: Install dependencies
28-
run: pnpm install --frozen-lockfile
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
2929

30-
- name: Run lint
31-
run: pnpm run check:lint
30+
- name: Run lint
31+
run: pnpm run check:lint
3232

33-
- name: Run format
34-
run: pnpm run check:format
33+
- name: Run format
34+
run: pnpm run check:format
3535

36-
- name: Run build
37-
run: pnpm run build
36+
- name: Run build
37+
run: pnpm run build
3838

39-
- name: Run tests
40-
run: pnpm run test:e2e
41-
env:
42-
PLANE_API_KEY: ${{ secrets.PLANE_API_KEY }}
43-
PLANE_BASE_URL: ${{ secrets.PLANE_BASE_URL }}
44-
TEST_WORKSPACE_SLUG: ${{ vars.TEST_WORKSPACE_SLUG }}
39+
- name: Run tests
40+
run: pnpm run test:e2e
41+
env:
42+
PLANE_API_KEY: ${{ secrets.PLANE_API_KEY }}
43+
PLANE_BASE_URL: ${{ secrets.PLANE_BASE_URL }}
44+
TEST_WORKSPACE_SLUG: ${{ vars.TEST_WORKSPACE_SLUG }}

.github/workflows/publish-node-sdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
- name: Set up Node.js
1919
uses: actions/setup-node@v6
2020
with:
21-
node-version: '24'
22-
registry-url: 'https://registry.npmjs.org'
21+
node-version: "24"
22+
registry-url: "https://registry.npmjs.org"
2323

2424
- name: Enable corepack
2525
run: corepack enable pnpm

.oxfmtrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 120,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"sortPackageJson": false,
7+
"ignorePatterns": ["out/", "dist/", "build/", "node_modules/"]
8+
}

.oxlintrc.json

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["typescript"],
4+
"categories": {
5+
"correctness": "off"
6+
},
7+
"env": {
8+
"builtin": true
9+
},
10+
"rules": {
11+
"constructor-super": "error",
12+
"for-direction": "error",
13+
"no-async-promise-executor": "error",
14+
"no-case-declarations": "error",
15+
"no-class-assign": "error",
16+
"no-compare-neg-zero": "error",
17+
"no-cond-assign": "error",
18+
"no-const-assign": "error",
19+
"no-constant-binary-expression": "error",
20+
"no-constant-condition": "error",
21+
"no-control-regex": "error",
22+
"no-debugger": "error",
23+
"no-delete-var": "error",
24+
"no-dupe-class-members": "error",
25+
"no-dupe-else-if": "error",
26+
"no-dupe-keys": "error",
27+
"no-duplicate-case": "error",
28+
"no-empty": "error",
29+
"no-empty-character-class": "error",
30+
"no-empty-pattern": "error",
31+
"no-empty-static-block": "error",
32+
"no-ex-assign": "error",
33+
"no-extra-boolean-cast": "error",
34+
"no-fallthrough": "error",
35+
"no-func-assign": "error",
36+
"no-global-assign": "error",
37+
"no-import-assign": "error",
38+
"no-invalid-regexp": "error",
39+
"no-irregular-whitespace": "error",
40+
"no-loss-of-precision": "error",
41+
"no-misleading-character-class": "error",
42+
"no-new-native-nonconstructor": "error",
43+
"no-nonoctal-decimal-escape": "error",
44+
"no-obj-calls": "error",
45+
"no-prototype-builtins": "error",
46+
"no-redeclare": "error",
47+
"no-regex-spaces": "error",
48+
"no-self-assign": "error",
49+
"no-setter-return": "error",
50+
"no-shadow-restricted-names": "error",
51+
"no-sparse-arrays": "error",
52+
"no-this-before-super": "error",
53+
"no-unexpected-multiline": "error",
54+
"no-unsafe-finally": "error",
55+
"no-unsafe-negation": "error",
56+
"no-unsafe-optional-chaining": "error",
57+
"no-unused-labels": "error",
58+
"no-unused-private-class-members": "error",
59+
"no-useless-backreference": "error",
60+
"no-useless-catch": "error",
61+
"no-useless-escape": "error",
62+
"no-with": "error",
63+
"require-yield": "error",
64+
"use-isnan": "error",
65+
"valid-typeof": "error",
66+
"no-array-constructor": "error",
67+
"no-unused-expressions": "error",
68+
"typescript/no-unused-vars": [
69+
"warn",
70+
{
71+
"vars": "all",
72+
"varsIgnorePattern": "^_",
73+
"args": "after-used",
74+
"argsIgnorePattern": "^_",
75+
"ignoreRestSiblings": true
76+
}
77+
],
78+
"no-console": "warn",
79+
"typescript/ban-ts-comment": "error",
80+
"typescript/no-duplicate-enum-values": "error",
81+
"typescript/no-empty-object-type": "error",
82+
"typescript/no-explicit-any": "warn",
83+
"typescript/no-extra-non-null-assertion": "error",
84+
"typescript/no-misused-new": "error",
85+
"typescript/no-namespace": "error",
86+
"typescript/no-non-null-asserted-optional-chain": "error",
87+
"typescript/no-require-imports": "error",
88+
"typescript/no-this-alias": "error",
89+
"typescript/no-unnecessary-type-constraint": "error",
90+
"typescript/no-unsafe-declaration-merging": "error",
91+
"typescript/no-unsafe-function-type": "error",
92+
"typescript/no-wrapper-object-types": "error",
93+
"typescript/prefer-as-const": "error",
94+
"typescript/prefer-namespace-keyword": "error",
95+
"typescript/triple-slash-reference": "error"
96+
},
97+
"overrides": [
98+
{
99+
"files": ["**/*.ts", "**/*.js"],
100+
"env": {
101+
"node": true
102+
}
103+
},
104+
{
105+
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
106+
"rules": {
107+
"constructor-super": "off",
108+
"no-class-assign": "off",
109+
"no-const-assign": "off",
110+
"no-dupe-class-members": "off",
111+
"no-dupe-keys": "off",
112+
"no-func-assign": "off",
113+
"no-import-assign": "off",
114+
"no-new-native-nonconstructor": "off",
115+
"no-obj-calls": "off",
116+
"no-redeclare": "off",
117+
"no-setter-return": "off",
118+
"no-this-before-super": "off",
119+
"no-unsafe-negation": "off",
120+
"no-var": "error",
121+
"no-with": "off",
122+
"prefer-const": "error",
123+
"prefer-rest-params": "error",
124+
"prefer-spread": "error"
125+
}
126+
}
127+
]
128+
}

.prettierignore

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

.prettierrc

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

CLAUDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ pnpm test:unit # Unit tests only
1717
pnpm test:e2e # E2E tests only
1818
pnpm test -- --testPathPattern=tests/unit/project # Run a single test file
1919
pnpm test:coverage # Run with coverage report
20-
pnpm check:lint # Lint check (ESLint)
20+
pnpm check:lint # Lint check (oxlint)
2121
pnpm fix:lint # Auto-fix lint issues
22-
pnpm check:format # Format check (Prettier, 120 char width)
22+
pnpm check:format # Format check (oxfmt, 120 char width)
2323
pnpm fix:format # Auto-format
2424
```
2525

@@ -34,6 +34,7 @@ Tests live in `tests/unit/` and `tests/e2e/`. Tests require a `.env.test` file (
3434
**BaseResource pattern** (`src/api/BaseResource.ts`): Abstract base class providing HTTP methods (get, post, patch, put, httpDelete) via axios. All API resource classes extend it. Handles both `apiKey` (X-Api-Key header) and `accessToken` (Bearer token) auth. Includes optional request/response logging with sensitive data sanitization.
3535

3636
**API resources** (`src/api/`): Each resource class extends BaseResource. Some have sub-resources as separate classes composed by the parent:
37+
3738
- `WorkItems/` → Comments, Attachments, Activities, Relations, WorkLogs
3839
- `Customers/` → Properties, Requests
3940
- `Teamspaces/` → Members, Projects

eslint.config.mjs

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

examples/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ This directory contains examples demonstrating how to use the Plane Node SDK.
55
## Setup
66

77
1. Install dependencies:
8+
89
```bash
910
npm install
1011
```
1112

1213
2. Set up environment variables:
14+
1315
```bash
1416
export PLANE_API_KEY="your-api-key"
1517
```
@@ -32,6 +34,7 @@ const client = new PlaneClient({
3234
```
3335

3436
When enabled, you'll see detailed logs for:
37+
3538
- 🚀 Request details (method, URL, headers, data)
3639
- ✅ Response details (status, data, headers)
3740
- ❌ Error details (status, error message, response data)
@@ -52,9 +55,9 @@ When adding new examples:
5255
4. Add documentation comments
5356
5. Update this README with a description
5457

55-
5658
## Environment Variables
5759

5860
Required environment variables:
61+
5962
- `PLANE_API_KEY` - Your Plane API key
6063
- `PLANE_BASE_URL` - (Optional) Custom Plane instance URL

jest.config.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
roots: ['<rootDir>/tests'],
5-
testMatch: [
6-
'**/__tests__/**/*.ts',
7-
'**/?(*.)+(spec|test).ts'
8-
],
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
roots: ["<rootDir>/tests"],
5+
testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"],
96
transform: {
10-
'^.+\\.ts$': ['ts-jest', {
11-
tsconfig: 'tsconfig.jest.json'
12-
}],
7+
"^.+\\.ts$": [
8+
"ts-jest",
9+
{
10+
tsconfig: "tsconfig.jest.json",
11+
},
12+
],
1313
},
14-
collectCoverageFrom: [
15-
'src/**/*.ts',
16-
'!src/**/*.d.ts',
17-
'!src/**/*.spec.ts'
18-
],
19-
coverageDirectory: 'coverage',
20-
coverageReporters: ['text', 'lcov', 'html'],
14+
collectCoverageFrom: ["src/**/*.ts", "!src/**/*.d.ts", "!src/**/*.spec.ts"],
15+
coverageDirectory: "coverage",
16+
coverageReporters: ["text", "lcov", "html"],
2117
testTimeout: 60000, // 60 seconds timeout for API tests
2218
verbose: true,
2319
// Allow tests to run in parallel but with some control
2420
maxWorkers: 1, // Run tests sequentially to avoid API rate limits
25-
};
21+
};

0 commit comments

Comments
 (0)