Skip to content

Commit

Permalink
attempt to "commonize" prettier config (#2424)
Browse files Browse the repository at this point in the history
* attempt to "commonize" prettier config

* Update .prettierrc.json

* Update .prettierrc.json

* Update .prettierrc.json

* Update .prettierrc.json

* Update .prettierrc.json

* md

* yaml config

* tweak
  • Loading branch information
altendky authored Jul 12, 2024
1 parent 68427c1 commit 3a75a37
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
15 changes: 0 additions & 15 deletions .prettierrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
overrides:
- files: ["*.yaml", "*.yml", "*.toml", "*.json", "*.ini"]
options:
tabWidth: 2
singleQuote: false
experimentalTernaries: true
useTabs: false
- files: ["*.md"]
options:
singleQuote: false
- files: ["*.js", "*.jsx", "*.ts", "*.tsx", "*.cjs", "*.mjs"]
options:
printWidth: 120
singleQuote: true
18 changes: 9 additions & 9 deletions packages/api-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ It is designed to simplify common cases for loading data in a web application, e
### **`PublicKeys.tsx`**

```tsx
import React from 'react';
import { useGetPublicKeysQuery } from '@chia-network/api-react';
import { Loading } from '@chia-network/core';
import Suspender from 'react-suspender';
import React from "react";
import { useGetPublicKeysQuery } from "@chia-network/api-react";
import { Loading } from "@chia-network/core";
import Suspender from "react-suspender";

export default function PublicKeys() {
const { data: publicKeys, isLoading, error } = useGetPublicKeysQuery();
Expand All @@ -49,14 +49,14 @@ export default function PublicKeys() {
### **`Application.tsx`**

```tsx
import React, { Suspense } from 'react';
import Websocket from 'ws'; // or read this value from electron main application
import { store, api } from '@chia-network/api-react';
import PublicKeys from './PublicKeys';
import React, { Suspense } from "react";
import Websocket from "ws"; // or read this value from electron main application
import { store, api } from "@chia-network/api-react";
import PublicKeys from "./PublicKeys";

// prepare api
api.initializeConfig({
url: 'wss://127.0.0.1:54000',
url: "wss://127.0.0.1:54000",
cert: fs.readFileSync(certPath).toString(), // or read this value from electron main application
key: fs.readFileSync(keyPath).toString(), // or read this value from electron main application
webSocket: Websocket,
Expand Down

0 comments on commit 3a75a37

Please sign in to comment.