Răsfoiți Sursa

cli: Make templates conform to default prettier rules (#1466)

Tom Linton 3 ani în urmă
părinte
comite
8aa7b2289e
1 a modificat fișierele cu 10 adăugiri și 12 ștergeri
  1. 10 12
      cli/src/template.rs

+ 10 - 12
cli/src/template.rs

@@ -141,7 +141,7 @@ module.exports = async function (provider) {
   anchor.setProvider(provider);
 
   // Add your deploy script here.
-}
+};
 "#
 }
 
@@ -157,7 +157,7 @@ module.exports = async function (provider) {
   anchor.setProvider(provider);
 
   // Add your deploy script here.
-}
+};
 "#
 }
 
@@ -191,14 +191,13 @@ pub struct Initialize {{}}
 
 pub fn mocha(name: &str) -> String {
     format!(
-        r#"const anchor = require('@project-serum/anchor');
-
-describe('{}', () => {{
+        r#"const anchor = require("@project-serum/anchor");
 
+describe("{}", () => {{
   // Configure the client to use the local cluster.
   anchor.setProvider(anchor.Provider.env());
 
-  it('Is initialized!', async () => {{
+  it("Is initialized!", async () => {{
     // Add your test here.
     const program = anchor.workspace.{};
     const tx = await program.rpc.initialize();
@@ -248,18 +247,17 @@ pub fn ts_package_json() -> String {
 
 pub fn ts_mocha(name: &str) -> String {
     format!(
-        r#"import * as anchor from '@project-serum/anchor';
-import {{ Program }} from '@project-serum/anchor';
-import {{ {} }} from '../target/types/{}';
-
-describe('{}', () => {{
+        r#"import * as anchor from "@project-serum/anchor";
+import {{ Program }} from "@project-serum/anchor";
+import {{ {} }} from "../target/types/{}";
 
+describe("{}", () => {{
   // Configure the client to use the local cluster.
   anchor.setProvider(anchor.Provider.env());
 
   const program = anchor.workspace.{} as Program<{}>;
 
-  it('Is initialized!', async () => {{
+  it("Is initialized!", async () => {{
     // Add your test here.
     const tx = await program.rpc.initialize({{}});
     console.log("Your transaction signature", tx);