diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..8eef4e1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: Trunk Check +on: [push] +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: read-all + +jobs: + trunk-check: + runs-on: ubuntu-latest + permissions: + checks: write # For trunk to post annotations + contents: read # For repo checkout + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - uses: trunk-io/trunk-action@v1 + with: + check-mode: all diff --git a/eslint.config.mjs b/eslint.config.mjs index 28f6d83..b68f7ed 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,7 +6,10 @@ export default tseslint.config( ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked, { - ignores: ["commitlint.config.mjs", "eslint.config.mjs"], + files: ["**/*.mjs"], + extends: [tseslint.configs.disableTypeChecked], + }, + { languageOptions: { parserOptions: { project: true, diff --git a/package-lock.json b/package-lock.json index 093e02c..e53b5d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,11 +17,12 @@ "viem": "^2.17.0" }, "devDependencies": { - "@eslint/js": "^9.6.0", + "@eslint/js": "^9.7.0", "@trunkio/launcher": "^1.3.1", - "eslint": "9.x", + "@types/eslint__js": "^8.42.3", + "eslint": "^9.7.0", "typescript": "^5.5.3", - "typescript-eslint": "^8.0.0-alpha.39" + "typescript-eslint": "^8.0.0-alpha.51" } }, "node_modules/@adraffy/ens-normalize": { @@ -400,9 +401,9 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.6.0.tgz", - "integrity": "sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.7.0.tgz", + "integrity": "sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -747,6 +748,31 @@ "@types/node": "*" } }, + "node_modules/@types/eslint": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", + "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "dependencies": { + "@types/eslint": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "node_modules/@types/express": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", @@ -774,6 +800,12 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -851,16 +883,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.0-alpha.39.tgz", - "integrity": "sha512-ILv1vDA8M9ah1vzYpnOs4UOLRdB63Ki/rsxedVikjMLq68hFfpsDR25bdMZ4RyUkzLJwOhcg3Jujm/C1nupXKA==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.0-alpha.51.tgz", + "integrity": "sha512-989dk3/IA2HNdfl8T1Tj0+AEAtqHN5Cdac7Ff1N367Lh5e5xKi3nXWMkptbZaAEo/wi5+CZD8jngQ70wnCRweA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.0.0-alpha.39", - "@typescript-eslint/type-utils": "8.0.0-alpha.39", - "@typescript-eslint/utils": "8.0.0-alpha.39", - "@typescript-eslint/visitor-keys": "8.0.0-alpha.39", + "@typescript-eslint/scope-manager": "8.0.0-alpha.51", + "@typescript-eslint/type-utils": "8.0.0-alpha.51", + "@typescript-eslint/utils": "8.0.0-alpha.51", + "@typescript-eslint/visitor-keys": "8.0.0-alpha.51", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -884,15 +916,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.0.0-alpha.39.tgz", - "integrity": "sha512-5k+pwV91plJojHgZkWlq4/TQdOrnEaeSvt48V0m8iEwdMJqX/63BXYxy8BUOSghWcjp05s73vy9HJjovAKmHkQ==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.0.0-alpha.51.tgz", + "integrity": "sha512-UPMhWLqkP/wBGB3/eI9fRG8UFFmT8tTLlBUQFN01xtsRNhYlMYS5FQHDMkfPynnKp62AqLRrwkrI49cZN3aDUA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.0.0-alpha.39", - "@typescript-eslint/types": "8.0.0-alpha.39", - "@typescript-eslint/typescript-estree": "8.0.0-alpha.39", - "@typescript-eslint/visitor-keys": "8.0.0-alpha.39", + "@typescript-eslint/scope-manager": "8.0.0-alpha.51", + "@typescript-eslint/types": "8.0.0-alpha.51", + "@typescript-eslint/typescript-estree": "8.0.0-alpha.51", + "@typescript-eslint/visitor-keys": "8.0.0-alpha.51", "debug": "^4.3.4" }, "engines": { @@ -935,13 +967,13 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.0-alpha.39.tgz", - "integrity": "sha512-HCBlKQROY+JIgWolucdFMj1W3VUnnIQTdxAhxJTAj3ix2nASmvKIFgrdo5KQMrXxQj6tC4l3zva10L+s0dUIIw==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.0-alpha.51.tgz", + "integrity": "sha512-zT8Ib31deJCqRVJepZOMFoHiFAsSHOh5TmedcFeqyiMuzrqBMtF95iv6mPJqFDIXNgxmTkahpRan1z043ckBnA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.0.0-alpha.39", - "@typescript-eslint/visitor-keys": "8.0.0-alpha.39" + "@typescript-eslint/types": "8.0.0-alpha.51", + "@typescript-eslint/visitor-keys": "8.0.0-alpha.51" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -952,13 +984,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.0.0-alpha.39.tgz", - "integrity": "sha512-alO13fRU6yVeJbwl9ESI3AYhq5dQdz3Dpd0I5B4uezs2lvgYp44dZsj5hWyPz/kL7JFEsjbn+4b/CZA0OQJzjA==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.0.0-alpha.51.tgz", + "integrity": "sha512-KqU2e3KITMGlRfG4ehfO2zS0GutDWc+zV2nwbRDQdUfh1izgFDAh5UqiJ8YafXVzY1v0dnRggnmvjOMotjQa1w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.0.0-alpha.39", - "@typescript-eslint/utils": "8.0.0-alpha.39", + "@typescript-eslint/typescript-estree": "8.0.0-alpha.51", + "@typescript-eslint/utils": "8.0.0-alpha.51", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -999,9 +1031,9 @@ "dev": true }, "node_modules/@typescript-eslint/types": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.0-alpha.39.tgz", - "integrity": "sha512-yINN7j0/+S1VGSp0IgH52oQvUx49vkOug6xbrDA/9o+U55yCAQKSvYWvzYjNa+SZE3hXI0zwvYtMVsIAAMmKIQ==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.0-alpha.51.tgz", + "integrity": "sha512-joqeu3jITe9BbgXAggKKg9mBIGDL6mAf2JVlo00zWP50u4qnsa3NWKMwWp77pjtI9E2DPU0vlTEdL+v/3aTPJA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1012,13 +1044,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.0-alpha.39.tgz", - "integrity": "sha512-S8gREuP8r8PCxGegeojeXntx0P50ul9YH7c7JYpbLIIsEPNr5f7UHlm+I1NUbL04CBin4kvZ60TG4eWr/KKN9A==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.0-alpha.51.tgz", + "integrity": "sha512-p3kD3rVdqmr4Iga86xzUR5wTsIKof/GsqnUMWZbmFpD3fmMXs1VLoXJegTqVMtWncu14dZUohRV2xPSScBAnxg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.0.0-alpha.39", - "@typescript-eslint/visitor-keys": "8.0.0-alpha.39", + "@typescript-eslint/types": "8.0.0-alpha.51", + "@typescript-eslint/visitor-keys": "8.0.0-alpha.51", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1087,15 +1119,15 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.0.0-alpha.39.tgz", - "integrity": "sha512-Nr2PrlfNhrNQTlFHlD7XJdTGw/Vt8qY44irk6bfjn9LxGdSG5e4c1R2UN6kvGMhhx20DBPbM7q3Z3r+huzmL1w==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.0.0-alpha.51.tgz", + "integrity": "sha512-OJac7/t6M/jQlgAQSM2yffKXZL8d/6vTbQPChC5v4oGHFuKHF2dEFeevNJlIS9iR6EtquRsHup2GDwqw6bWyrw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.0.0-alpha.39", - "@typescript-eslint/types": "8.0.0-alpha.39", - "@typescript-eslint/typescript-estree": "8.0.0-alpha.39" + "@typescript-eslint/scope-manager": "8.0.0-alpha.51", + "@typescript-eslint/types": "8.0.0-alpha.51", + "@typescript-eslint/typescript-estree": "8.0.0-alpha.51" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1109,12 +1141,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.0-alpha.39.tgz", - "integrity": "sha512-DVJ0UdhucZy+/1GlIy7FX2+CFhCeNAi4VwaEAe7u2UDenQr9/kGqvzx00UlpWibmEVDw4KsPOI7Aqa1+2Vqfmw==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.0-alpha.51.tgz", + "integrity": "sha512-bOLfR14nLfhO9BBD1YpmnQSTNTapAIegKsb4Ms1RAQXkJRKIeuLS42AEYRM8uvLiNLk0hDIBjCnMPTAyDAWLbw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.0.0-alpha.39", + "@typescript-eslint/types": "8.0.0-alpha.51", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1809,16 +1841,16 @@ } }, "node_modules/eslint": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.6.0.tgz", - "integrity": "sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.7.0.tgz", + "integrity": "sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", + "@eslint-community/regexpp": "^4.11.0", "@eslint/config-array": "^0.17.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.6.0", + "@eslint/js": "9.7.0", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", @@ -1827,7 +1859,7 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.1", + "eslint-scope": "^8.0.2", "eslint-visitor-keys": "^4.0.0", "espree": "^10.1.0", "esquery": "^1.5.0", @@ -1860,9 +1892,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.1.tgz", - "integrity": "sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -4094,14 +4126,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.0.0-alpha.39.tgz", - "integrity": "sha512-bsuR1BVJfHr7sBh7Cca962VPIcP+5UWaIa/+6PpnFZ+qtASjGTxKWIF5dG2o73BX9NsyqQfvRWujb3M9CIoRXA==", + "version": "8.0.0-alpha.51", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.0.0-alpha.51.tgz", + "integrity": "sha512-Hs60EyclUz1wBZMkmJ/xiiWGW91UZWcumWqOCQeWBp+xlPJJAufr5/OTrWhW+58yPv/72moEVhrA0VeUAlNoDQ==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.0.0-alpha.39", - "@typescript-eslint/parser": "8.0.0-alpha.39", - "@typescript-eslint/utils": "8.0.0-alpha.39" + "@typescript-eslint/eslint-plugin": "8.0.0-alpha.51", + "@typescript-eslint/parser": "8.0.0-alpha.51", + "@typescript-eslint/utils": "8.0.0-alpha.51" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index e53688a..0a5eb7c 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,11 @@ "viem": "^2.17.0" }, "devDependencies": { - "@eslint/js": "^9.6.0", + "@eslint/js": "^9.7.0", "@trunkio/launcher": "^1.3.1", - "eslint": "9.x", + "@types/eslint__js": "^8.42.3", + "eslint": "^9.7.0", "typescript": "^5.5.3", - "typescript-eslint": "^8.0.0-alpha.39" + "typescript-eslint": "^8.0.0-alpha.51" } } diff --git a/tsconfig.json b/tsconfig.json index 9baeb1e..54fdea8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["src/**/*"], + "include": ["src/**/*", "eslint.config.mjs", "commitlint.config.mjs"], "exclude": ["node_modules"], "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ @@ -46,7 +46,7 @@ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */, // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */