|
| 1 | +~~ {"module.importGroups":[{"match":[{"pattern":"[a-z]*"},{"pattern":"[a-z]*/**"}]},{"match":{"pattern":"@payhawk/**"}},{"match":[{"pattern":"@config"},{"pattern":"@contracts/**"},{"pattern":"@domain-logic"},{"pattern":"@service-contracts"},{"pattern":"@store"},{"pattern":"@utils"}]},{"match":["parent","sibling","index"]}],"module.typeImports":"interleave","module.sortImportDeclarations":"maintain","importDeclaration.sortNamedImports":"maintain"} ~~ |
| 2 | +== payhawk-style import block keeps four sections == |
| 3 | +import stringify from 'fast-json-stable-stringify'; |
| 4 | +import { find } from 'geo-tz'; |
| 5 | + |
| 6 | +import { |
| 7 | + createErrorResult, |
| 8 | + createSuccessResult, |
| 9 | + DATE_PART_FORMAT, |
| 10 | + groupBy, |
| 11 | + type IDateProviderFactory, |
| 12 | + type ILogger, |
| 13 | + type IResult, |
| 14 | +} from '@payhawk/api-service-utils'; |
| 15 | +import { |
| 16 | + type CurrencyCode, |
| 17 | + type PlainDate, |
| 18 | +} from '@payhawk/domain-common-types'; |
| 19 | +import { type Optional } from '@payhawk/typescript-common-types'; |
| 20 | + |
| 21 | +import { |
| 22 | + type IContext, |
| 23 | + SearchIndex, |
| 24 | +} from '@config'; |
| 25 | +import { Duffel } from '@contracts/external-api'; |
| 26 | +import type { CurrencyConverter } from '@domain-logic'; |
| 27 | +import { |
| 28 | + type IGetStayWithRatesBody, |
| 29 | + type IQuote, |
| 30 | + type IRate, |
| 31 | + type ISearchStaysBody, |
| 32 | + type ISearchStaysResult, |
| 33 | + type IStayPolicyCriteria, |
| 34 | +} from '@service-contracts'; |
| 35 | +import { type Duffel as DuffelApi } from '@store'; |
| 36 | +import { |
| 37 | + determineRefundType, |
| 38 | + evaluateQuotePolicyCompliance, |
| 39 | + evaluateRatePolicyCompliance, |
| 40 | + evaluateStayPolicyCompliance, |
| 41 | + Mappers, |
| 42 | +} from '@utils'; |
| 43 | + |
| 44 | +import { |
| 45 | + ErrorCodes, |
| 46 | + type ICreateQuoteParams, |
| 47 | + type IManager, |
| 48 | +} from './contracts'; |
| 49 | +import type * as Policies from '../policies'; |
| 50 | + |
| 51 | +[expect] |
| 52 | +import stringify from "fast-json-stable-stringify"; |
| 53 | +import { find } from "geo-tz"; |
| 54 | + |
| 55 | +import { |
| 56 | + createErrorResult, |
| 57 | + createSuccessResult, |
| 58 | + DATE_PART_FORMAT, |
| 59 | + groupBy, |
| 60 | + type IDateProviderFactory, |
| 61 | + type ILogger, |
| 62 | + type IResult, |
| 63 | +} from "@payhawk/api-service-utils"; |
| 64 | +import { type CurrencyCode, type PlainDate } from "@payhawk/domain-common-types"; |
| 65 | +import { type Optional } from "@payhawk/typescript-common-types"; |
| 66 | + |
| 67 | +import { type IContext, SearchIndex } from "@config"; |
| 68 | +import { Duffel } from "@contracts/external-api"; |
| 69 | +import type { CurrencyConverter } from "@domain-logic"; |
| 70 | +import { |
| 71 | + type IGetStayWithRatesBody, |
| 72 | + type IQuote, |
| 73 | + type IRate, |
| 74 | + type ISearchStaysBody, |
| 75 | + type ISearchStaysResult, |
| 76 | + type IStayPolicyCriteria, |
| 77 | +} from "@service-contracts"; |
| 78 | +import { type Duffel as DuffelApi } from "@store"; |
| 79 | +import { |
| 80 | + determineRefundType, |
| 81 | + evaluateQuotePolicyCompliance, |
| 82 | + evaluateRatePolicyCompliance, |
| 83 | + evaluateStayPolicyCompliance, |
| 84 | + Mappers, |
| 85 | +} from "@utils"; |
| 86 | + |
| 87 | +import { ErrorCodes, type ICreateQuoteParams, type IManager } from "./contracts"; |
| 88 | +import type * as Policies from "../policies"; |
0 commit comments