diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bd5535a --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +pnpm-lock.yaml diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..544138b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 699ed73..f172f18 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["biomejs.biome"] + "recommendations": ["rstack.rslint", "esbenp.prettier-vscode"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 58f2f56..fc06d17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,18 +1,3 @@ { "search.useIgnoreFiles": true, - "[json]": { - "editor.defaultFormatter": "biomejs.biome" - }, - "[typescript]": { - "editor.defaultFormatter": "biomejs.biome" - }, - "[javascript]": { - "editor.defaultFormatter": "biomejs.biome" - }, - "[javascriptreact]": { - "editor.defaultFormatter": "biomejs.biome" - }, - "[css]": { - "editor.defaultFormatter": "biomejs.biome" - } } diff --git a/biome.json b/biome.json deleted file mode 100644 index a87e9c5..0000000 --- a/biome.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", - "assist": { - "actions": { - "source": { - "organizeImports": "on" - } - } - }, - "vcs": { - "enabled": true, - "defaultBranch": "main", - "clientKind": "git", - "useIgnoreFile": true - }, - "formatter": { - "indentStyle": "space" - }, - "javascript": { - "formatter": { - "quoteStyle": "single" - } - }, - "css": { - "formatter": { - "enabled": true - } - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true - } - } -} diff --git a/package.json b/package.json index ee14005..836b6b8 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "scripts": { "build": "rslib", "dev": "rslib --watch", - "lint": "biome check .", - "lint:write": "biome check . --write", + "lint": "rslint", "prepare": "simple-git-hooks && rslib", "test": "rstest", "bump": "npx bumpp" @@ -36,14 +35,14 @@ }, "nano-staged": { "*.{js,jsx,ts,tsx,mjs,cjs}": [ - "biome check --write --no-errors-on-unmatched" + "rslint && prettier --write" ] }, "devDependencies": { - "@biomejs/biome": "2.4.9", "@clack/prompts": "^1.1.0", "@microsoft/api-extractor": "^7.57.7", "@rslib/core": "0.20.1", + "@rslint/core": "^0.3.3", "@rstest/core": "0.9.5", "@types/cross-spawn": "^6.0.6", "@types/fs-extra": "^11.0.4", @@ -54,6 +53,7 @@ "deepmerge": "^4.3.1", "fs-extra": "^11.3.4", "minimist": "^1.2.8", + "prettier": "^3.8.1", "rimraf": "^6.1.3", "rslog": "^2.1.0", "simple-git-hooks": "^2.13.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de5e8fe..189f6a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: devDependencies: - '@biomejs/biome': - specifier: 2.4.9 - version: 2.4.9 '@clack/prompts': specifier: ^1.1.0 version: 1.1.0 @@ -20,6 +17,9 @@ importers: '@rslib/core': specifier: 0.20.1 version: 0.20.1(@microsoft/api-extractor@7.57.7(@types/node@24.12.0))(core-js@3.47.0)(typescript@6.0.2) + '@rslint/core': + specifier: ^0.3.3 + version: 0.3.3 '@rstest/core': specifier: 0.9.5 version: 0.9.5(core-js@3.47.0) @@ -50,6 +50,9 @@ importers: minimist: specifier: ^1.2.8 version: 1.2.8 + prettier: + specifier: ^3.8.1 + version: 3.8.1 rimraf: specifier: ^6.1.3 version: 6.1.3 @@ -127,63 +130,6 @@ packages: resolution: {integrity: sha512-Hb4o6h1Pf6yRUAX07DR4JVY7dmQw+RVQMW5/m55GoiAT/VRoKCWBtIUPPOnqDVhbx1Cjfil9b6EDrgJsUAujEQ==} engines: {node: '>= 10'} - '@biomejs/biome@2.4.9': - resolution: {integrity: sha512-wvZW92FrwitTcacvCBT8xdAbfbxWfDLwjYMmU3djjqQTh7Ni4ZdiWIT/x5VcZ+RQuxiKzIOzi5D+dcyJDFZMsA==} - engines: {node: '>=14.21.3'} - hasBin: true - - '@biomejs/cli-darwin-arm64@2.4.9': - resolution: {integrity: sha512-d5G8Gf2RpH5pYwiHLPA+UpG3G9TLQu4WM+VK6sfL7K68AmhcEQ9r+nkj/DvR/GYhYox6twsHUtmWWWIKfcfQQA==} - engines: {node: '>=14.21.3'} - cpu: [arm64] - os: [darwin] - - '@biomejs/cli-darwin-x64@2.4.9': - resolution: {integrity: sha512-LNCLNgqDMG7BLdc3a8aY/dwKPK7+R8/JXJoXjCvZh2gx8KseqBdFDKbhrr7HCWF8SzNhbTaALhTBoh/I6rf9lA==} - engines: {node: '>=14.21.3'} - cpu: [x64] - os: [darwin] - - '@biomejs/cli-linux-arm64-musl@2.4.9': - resolution: {integrity: sha512-8RCww5xnPn2wpK4L/QDGDOW0dq80uVWfppPxHIUg6mOs9B6gRmqPp32h1Ls3T8GnW8Wo5A8u7vpTwz4fExN+sw==} - engines: {node: '>=14.21.3'} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@biomejs/cli-linux-arm64@2.4.9': - resolution: {integrity: sha512-4adnkAUi6K4C/emPRgYznMOcLlUqZdXWM6aIui4VP4LraE764g6Q4YguygnAUoxKjKIXIWPteKMgRbN0wsgwcg==} - engines: {node: '>=14.21.3'} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@biomejs/cli-linux-x64-musl@2.4.9': - resolution: {integrity: sha512-5TD+WS9v5vzXKzjetF0hgoaNFHMcpQeBUwKKVi3JbG1e9UCrFuUK3Gt185fyTzvRdwYkJJEMqglRPjmesmVv4A==} - engines: {node: '>=14.21.3'} - cpu: [x64] - os: [linux] - libc: [musl] - - '@biomejs/cli-linux-x64@2.4.9': - resolution: {integrity: sha512-L10na7POF0Ks/cgLFNF1ZvIe+X4onLkTi5oP9hY+Rh60Q+7fWzKDDCeGyiHUFf1nGIa9dQOOUPGe2MyYg8nMSQ==} - engines: {node: '>=14.21.3'} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@biomejs/cli-win32-arm64@2.4.9': - resolution: {integrity: sha512-aDZr0RBC3sMGJOU10BvG7eZIlWLK/i51HRIfScE2lVhfts2dQTreowLiJJd+UYg/tHKxS470IbzpuKmd0MiD6g==} - engines: {node: '>=14.21.3'} - cpu: [arm64] - os: [win32] - - '@biomejs/cli-win32-x64@2.4.9': - resolution: {integrity: sha512-NS4g/2G9SoQ4ktKtz31pvyc/rmgzlcIDCGU/zWbmHJAqx6gcRj2gj5Q/guXhoWTzCUaQZDIqiCQXHS7BcGYc0w==} - engines: {node: '>=14.21.3'} - cpu: [x64] - os: [win32] - '@clack/core@1.1.0': resolution: {integrity: sha512-SVcm4Dqm2ukn64/8Gub2wnlA5nS2iWJyCkdNHcvNHPIeBTGojpdJ+9cZKwLfmqy7irD4N5qLteSilJlE0WLAtA==} @@ -238,6 +184,45 @@ packages: typescript: optional: true + '@rslint/core@0.3.3': + resolution: {integrity: sha512-QtXXmAEAmMr4okkmQ3pHpTSifdkhzZHnLHiSVb/LnvCw8bOgooG9nfUihhGFgB0ezwRQ+vFr5vaHTEgx7tj5dw==} + hasBin: true + peerDependencies: + jiti: ^2.0.0 + peerDependenciesMeta: + jiti: + optional: true + + '@rslint/darwin-arm64@0.3.3': + resolution: {integrity: sha512-uEyVAg1lJhiZIvVtF++UScNL2jkN8OcjJEERVTbRSMjQX0Kro3BQki5A9qm4pkcPb9db6GDC8xCfMY0HHmziSw==} + cpu: [arm64] + os: [darwin] + + '@rslint/darwin-x64@0.3.3': + resolution: {integrity: sha512-9K+6NQSnesba/fqtTu5dqVuIsUWNj2rivZVi8eIUyA/kqA2Q+yT3yyxV+8+0RVHWVWBWNcpqDbZs0zHEWbJ1pA==} + cpu: [x64] + os: [darwin] + + '@rslint/linux-arm64@0.3.3': + resolution: {integrity: sha512-w2xtaWG39w9YIaHuLExjBDmvr445b74eHUv4TqwtL+SvDVA74rQAKzRJdiAsM+bN8KCYIcx5vinVqKw89QzfoQ==} + cpu: [arm64] + os: [linux] + + '@rslint/linux-x64@0.3.3': + resolution: {integrity: sha512-zb98H2hpSeyhQdVXBm4YEfvcL1jhicHv/nSLxQbCWg0+vMkKcvCNmy8kq9KzvR00if1jmoxnVYxSH0ZWfSzlVg==} + cpu: [x64] + os: [linux] + + '@rslint/win32-arm64@0.3.3': + resolution: {integrity: sha512-z3Q/llH2X2UEGCD4RT2ogeDMQezTqKoxXND0lEvn3PuCr7egXSc9mwsTCXlmmuegusdlojE436XSijx95TWvfw==} + cpu: [arm64] + os: [win32] + + '@rslint/win32-x64@0.3.3': + resolution: {integrity: sha512-NZnrLKaWqZPSoObkg4FcLMf5uyhFBGegXDuCDafPYZtV8l9ZkRzj5bHWLfkII7UtNLROV7EeS7PuHq5JI/nbgw==} + cpu: [x64] + os: [win32] + '@rspack/binding-darwin-arm64@2.0.0-beta.8': resolution: {integrity: sha512-h3x2GreEh8J36A3cWFeHZGTuz4vjUArk9dBDq8fZSyaUQQQox/lp8bUOGa/2YuYUOXk0gei2GN+/BVi2R5p39A==} cpu: [arm64] @@ -520,6 +505,11 @@ packages: resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} engines: {node: 18 || 20 || >=22} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} + engines: {node: '>=14'} + hasBin: true + require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -669,41 +659,6 @@ snapshots: '@ast-grep/napi-win32-ia32-msvc': 0.37.0 '@ast-grep/napi-win32-x64-msvc': 0.37.0 - '@biomejs/biome@2.4.9': - optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.4.9 - '@biomejs/cli-darwin-x64': 2.4.9 - '@biomejs/cli-linux-arm64': 2.4.9 - '@biomejs/cli-linux-arm64-musl': 2.4.9 - '@biomejs/cli-linux-x64': 2.4.9 - '@biomejs/cli-linux-x64-musl': 2.4.9 - '@biomejs/cli-win32-arm64': 2.4.9 - '@biomejs/cli-win32-x64': 2.4.9 - - '@biomejs/cli-darwin-arm64@2.4.9': - optional: true - - '@biomejs/cli-darwin-x64@2.4.9': - optional: true - - '@biomejs/cli-linux-arm64-musl@2.4.9': - optional: true - - '@biomejs/cli-linux-arm64@2.4.9': - optional: true - - '@biomejs/cli-linux-x64-musl@2.4.9': - optional: true - - '@biomejs/cli-linux-x64@2.4.9': - optional: true - - '@biomejs/cli-win32-arm64@2.4.9': - optional: true - - '@biomejs/cli-win32-x64@2.4.9': - optional: true - '@clack/core@1.1.0': dependencies: sisteransi: 1.0.5 @@ -793,6 +748,33 @@ snapshots: - '@typescript/native-preview' - core-js + '@rslint/core@0.3.3': + optionalDependencies: + '@rslint/darwin-arm64': 0.3.3 + '@rslint/darwin-x64': 0.3.3 + '@rslint/linux-arm64': 0.3.3 + '@rslint/linux-x64': 0.3.3 + '@rslint/win32-arm64': 0.3.3 + '@rslint/win32-x64': 0.3.3 + + '@rslint/darwin-arm64@0.3.3': + optional: true + + '@rslint/darwin-x64@0.3.3': + optional: true + + '@rslint/linux-arm64@0.3.3': + optional: true + + '@rslint/linux-x64@0.3.3': + optional: true + + '@rslint/win32-arm64@0.3.3': + optional: true + + '@rslint/win32-x64@0.3.3': + optional: true + '@rspack/binding-darwin-arm64@2.0.0-beta.8': optional: true @@ -1046,6 +1028,8 @@ snapshots: lru-cache: 11.2.4 minipass: 7.1.3 + prettier@3.8.1: {} + require-from-string@2.0.2: {} resolve@1.22.8: diff --git a/rslint.config.ts b/rslint.config.ts new file mode 100644 index 0000000..3bcc313 --- /dev/null +++ b/rslint.config.ts @@ -0,0 +1,6 @@ +import { defineConfig, ts } from '@rslint/core'; + +export default defineConfig([ + { ignores: ['**/dist/**'] }, + ts.configs.recommended, +]);