فهرست منبع

Fix linting for JS clients (#26)

Loris Leiva 1 سال پیش
والد
کامیت
990ddcec4d

+ 5 - 0
.changeset/sweet-years-run.md

@@ -0,0 +1,5 @@
+---
+"create-solana-program": patch
+---
+
+Fix linting for JS clients

+ 11 - 1
scripts/snapshot.mjs

@@ -82,12 +82,22 @@ for (const projectName of projects) {
   // Test clients.
   for (const client of CLIENTS) {
     if (`clients:${client}:test` in pkg.scripts) {
-      await executeStep(`test ${client} clients`, async () => {
+      await executeStep(`test ${client} client`, async () => {
         await $`pnpm clients:${client}:test`;
       });
     }
   }
 
+  // Additional JavaScript client tests.
+  if (`clients:js:test` in pkg.scripts) {
+    await executeStep(`lint js client`, async () => {
+      cd(path.join(projectDirectory, 'clients', 'js'));
+      await $`pnpm lint`;
+      await $`pnpm format`;
+      cd(projectDirectory);
+    });
+  }
+
   // Add line break between projects.
   echo('');
 }

+ 1 - 1
template/base/package.json

@@ -11,7 +11,7 @@
   "devDependencies": {
     "@iarna/toml": "^2.2.5",
     "@metaplex-foundation/shank-js": "^0.1.7",
-    "typescript": "^5.3.3",
+    "typescript": "^5.4.2",
     "zx": "^7.2.3"
   },
   "packageManager": "pnpm@8.9.0"

+ 1 - 1
template/clients/base/package.json

@@ -7,6 +7,6 @@
     "validator:stop": "zx ./scripts/stop-validator.mjs"
   },
   "devDependencies": {
-    "@metaplex-foundation/kinobi": "^0.17.8"
+    "@metaplex-foundation/kinobi": "^0.17.10"
   }
 }

+ 1 - 1
template/clients/js/clients/js/_.eslintrc.js → template/clients/js/clients/js/_.eslintrc.cjs

@@ -20,5 +20,5 @@ module.exports = {
     'func-names': 'off',
     'prefer-destructuring': 'off',
   },
-  ignorePatterns: ['dist/**', '.eslintrc.js', 'tsup.config.ts', 'env-shim.ts'],
+  ignorePatterns: ['dist/**', '.eslintrc.cjs', 'tsup.config.ts', 'env-shim.ts'],
 };

+ 1 - 2
template/clients/js/clients/js/_.prettierrc.json

@@ -5,6 +5,5 @@
   "useTabs": false,
   "tabWidth": 2,
   "arrowParens": "always",
-  "printWidth": 80,
-  "parser": "typescript"
+  "printWidth": 80
 }

+ 11 - 11
template/clients/js/clients/js/package.json.njk

@@ -44,21 +44,21 @@
     "@ava/typescript": "^4.1.0",
     "@solana/web3.js": "^2.0.0-preview",
     "@solana/webcrypto-ed25519-polyfill": "^2.0.0-preview",
-    "@typescript-eslint/eslint-plugin": "^7.0.2",
-    "@typescript-eslint/parser": "^7.0.2",
-    "ava": "^6.1.1",
-    "eslint": "^8.0.1",
-    "eslint-config-airbnb-typescript": "^17.0.0",
-    "eslint-config-prettier": "^8.5.0",
-    "eslint-plugin-import": "^2.26.0",
-    "eslint-plugin-prettier": "^4.2.1",
-    "prettier": "^2.5.1",
+    "@typescript-eslint/eslint-plugin": "^7.3.1",
+    "@typescript-eslint/parser": "^7.3.1",
+    "ava": "^6.1.2",
+    "eslint": "^8.57.0",
+    "eslint-config-airbnb-typescript": "^18.0.0",
+    "eslint-config-prettier": "^9.1.0",
+    "eslint-plugin-import": "^2.29.0",
+    "eslint-plugin-prettier": "^5.1.3",
+    "prettier": "^3.2.5",
     "rimraf": "^5.0.5",
     "tsup": "^8.0.2",
-    "typedoc": "^0.25.8",
+    "typedoc": "^0.25.12",
     "typedoc-plugin-expand-object-like-types": "^0.1.2",
     "typedoc-plugin-missing-exports": "^2.2.0",
-    "typescript": "^5.3.3"
+    "typescript": "^5.4.2"
   },
   "ava": {
     "require": [

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 443 - 214
template/clients/js/clients/js/pnpm-lock.yaml


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است