diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100755 index 77ade18563..0000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "printWidth": 120, - "singleQuote": true, - "overrides": [ - { - "files": ["*.yaml", "*.yml", "*.toml", "*.json", "*.ini"], - "options": { - "tabWidth": 2, - "singleQuote": false, - "experimentalTernaries": true, - "useTabs": false - } - } - ] -} diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000000..27a0fcfbbf --- /dev/null +++ b/.prettierrc.yaml @@ -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 diff --git a/packages/api-react/README.md b/packages/api-react/README.md index fa7587c322..46205327d5 100644 --- a/packages/api-react/README.md +++ b/packages/api-react/README.md @@ -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(); @@ -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,