-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
Fix in prettier config itself
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
#!/usr/bin/env tsx | ||
// This import line gets frequently moved by vscode organize imports | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tonyxiao
Author
Contributor
|
||
// and thus causing runtime failure... Therefore we moved it to the ledgerSync bin | ||
import '@ledger-sync/app-config/register.node' | ||
|
||
import {nodeHTTPRequestHandler} from '@trpc/server/adapters/node-http' | ||
import http from 'http' | ||
import {json} from 'micro' | ||
import ngrok from 'ngrok' | ||
|
||
import type {LedgerSyncRouter} from '@ledger-sync/app-config' | ||
import { | ||
ledgerSyncMetaStore as metaStore, | ||
ledgerSyncRouter as router, | ||
} from '@ledger-sync/app-config' | ||
import '@ledger-sync/app-config/register.node' | ||
import {cliFromRouter} from './cli-utils' | ||
import type {inferProcedureInput} from '@ledger-sync/engine' | ||
import {parseWebhookRequest} from '@ledger-sync/engine' | ||
import type {NonEmptyArray} from '@ledger-sync/util' | ||
|
@@ -17,10 +24,8 @@ import { | |
zFunction, | ||
zodInsecureDebug, | ||
} from '@ledger-sync/util' | ||
import {nodeHTTPRequestHandler} from '@trpc/server/adapters/node-http' | ||
import http from 'http' | ||
import {json} from 'micro' | ||
import ngrok from 'ngrok' | ||
|
||
import {cliFromRouter} from './cli-utils' | ||
|
||
if (!process.env['DEBUG']) { | ||
console.debug = () => {} // Disabling debug logs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ module.exports = { | |
arrowParens: 'always', | ||
bracketSameLine: true, | ||
bracketSpacing: false, | ||
importOrder: ['<THIRD_PARTY_MODULES>', '^@ledger-sync/(.*)$', '^[./]'], | ||
importOrderCaseInsensitive: true, | ||
importOrderSortSpecifiers: true, | ||
importOrderGroupNamespaceSpecifiers: true, | ||
importOrderSeparation: true, // Very important to make sure register files are imported first... | ||
This comment has been minimized.
Sorry, something went wrong.
yenbekbay
Contributor
|
||
jsxSingleQuote: false, | ||
plugins: [ | ||
require.resolve('@ianvs/prettier-plugin-sort-imports'), | ||
|
Just don't use "organize imports". Prettier plugin is aware of side-effect imports and will not move stuff around