Browse Source

:construction_worker: Reference local prettier

Gabriele Picco 1 year ago
parent
commit
3bb999b596

+ 1 - 1
.github/workflows/run-tests.yml

@@ -110,4 +110,4 @@ jobs:
           cd clients/bolt-sdk
           yarn install && yarn build
           cd ../..
-          bolt test
+

+ 1 - 1
cli/npm-package/package.json

@@ -17,7 +17,7 @@
   "scripts": {
     "typecheck": "tsc --noEmit",
     "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check ",
-    "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
+    "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{.js,.ts}\" -w",
     "build": "tsc",
     "dev": "yarn build && node lib/index.js"
   },

+ 4 - 4
cli/src/templates/workspace.rs

@@ -27,7 +27,7 @@ pub fn package_json(jest: bool) -> String {
         format!(
             r#"{{
         "scripts": {{
-            "lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
+            "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         }},
         "dependencies": {{
@@ -44,7 +44,7 @@ pub fn package_json(jest: bool) -> String {
         format!(
             r#"{{
     "scripts": {{
-        "lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
+        "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
     }},
     "dependencies": {{
@@ -69,7 +69,7 @@ pub fn ts_package_json(jest: bool) -> String {
         format!(
             r#"{{
         "scripts": {{
-            "lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
+            "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
             "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
         }},
         "dependencies": {{
@@ -93,7 +93,7 @@ pub fn ts_package_json(jest: bool) -> String {
         format!(
             r#"{{
     "scripts": {{
-        "lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
+        "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
         "lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
     }},
     "dependencies": {{

+ 1 - 1
clients/bolt-sdk/package.json

@@ -35,7 +35,7 @@
     "dev": "tsc --watch",
     "start": "tsc",
     "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check",
-    "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w"
+    "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{.js,.ts}\" -w"
   },
   "files": [
     "lib"

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
     "scripts": {
-        "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
-        "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
+        "lint:fix": "node_modules/.bin/prettier */*.js \"*/**/*{.js,.ts}\" -w",
+        "lint": "node_modules/.bin/prettier */*.js \"*/**/*{.js,.ts}\" --check"
     },
     "dependencies": {
         "@coral-xyz/anchor": "0.30.1"