Add @typescript-eslint/member-delimiter-style to eslint
This commit is contained in:
parent
c43eb07638
commit
edcb2613f1
5 changed files with 38 additions and 26 deletions
12
.eslintrc.js
12
.eslintrc.js
|
@ -116,6 +116,18 @@ const tsBase = {
|
|||
},
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/member-delimiter-style': ['error',
|
||||
{
|
||||
"multiline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": true,
|
||||
},
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ function FormikInner(props: { onChange:(args:{value:Money})=> void}) {
|
|||
<Field component={MoneyTextField} name="value" aria-label="field"/></>;
|
||||
}
|
||||
|
||||
function FormikHandler(props: { onChange:(args:{value:Money})=> void, value: Money,}) {
|
||||
function FormikHandler(props: { onChange:(args:{value:Money})=> void, value: Money}) {
|
||||
|
||||
const {value, ...innerFormikProps} = props;
|
||||
return <HoudiniIntlProvider locale="en">
|
||||
|
|
|
@ -12,7 +12,7 @@ import {useI18nCurrencyInput, Types} from '@houdiniproject/react-i18n-currency-i
|
|||
import '../../common/intl-polyfills/numberFormat';
|
||||
|
||||
export interface UseSerializeMoneyProps extends Omit<Types.UseI18nCurrencyInputProps, 'currency' | 'locale'|'value'> {
|
||||
value:Money
|
||||
value:Money;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -345,18 +345,18 @@ describe('.enable', () => {
|
|||
describe('modify steps', () => {
|
||||
function createTableEntry(props: {
|
||||
expectation: {
|
||||
activeStep?: number,
|
||||
completed?: KeyedStepMap<boolean>,
|
||||
disabled?: KeyedStepMap<boolean>,
|
||||
},
|
||||
activeStep?: number;
|
||||
completed?: KeyedStepMap<boolean>;
|
||||
disabled?: KeyedStepMap<boolean>;
|
||||
};
|
||||
initial: {
|
||||
activeStep?: number,
|
||||
activeStep?: number;
|
||||
completed?:
|
||||
KeyedStepMap<boolean>
|
||||
disabled?: KeyedStepMap<boolean>,
|
||||
steps: KeyedStep[],
|
||||
},
|
||||
stepChange: KeyedStep[],
|
||||
KeyedStepMap<boolean>;
|
||||
disabled?: KeyedStepMap<boolean>;
|
||||
steps: KeyedStep[];
|
||||
};
|
||||
stepChange: KeyedStep[];
|
||||
}
|
||||
): [
|
||||
KeyedStep[], number | undefined, KeyedStepMap<boolean> | undefined, KeyedStepMap<boolean> | undefined, // initial
|
||||
|
|
|
@ -13,7 +13,7 @@ export interface KeyedStep {
|
|||
}
|
||||
|
||||
export interface KeyedStepMap<T = unknown> {
|
||||
[stepKey: string]: T
|
||||
[stepKey: string]: T;
|
||||
}
|
||||
|
||||
interface ReadonlyStepsState {
|
||||
|
@ -24,7 +24,7 @@ interface ReadonlyStepsState {
|
|||
/**
|
||||
* An internal copy of steps which only includes the key
|
||||
*/
|
||||
readonly stepKeys: readonly string[]
|
||||
readonly stepKeys: readonly string[];
|
||||
|
||||
}
|
||||
|
||||
|
@ -114,25 +114,25 @@ interface StepsInitOptions {
|
|||
|
||||
|
||||
interface InputStepsState extends Readonly<InputStepsMethods> {
|
||||
readonly steps: readonly KeyedStep[]
|
||||
readonly steps: readonly KeyedStep[];
|
||||
}
|
||||
|
||||
interface InputStepsMethods {
|
||||
addStep: (step: KeyedStep, before?: number) => void
|
||||
removeStep: (step: KeyedStep) => void
|
||||
addStep: (step: KeyedStep, before?: number) => void;
|
||||
removeStep: (step: KeyedStep) => void;
|
||||
}
|
||||
|
||||
|
||||
interface MutableStepsObject extends InputStepsMethods {
|
||||
back: () => void
|
||||
complete: (step: number) => void
|
||||
disable: (step: number) => void
|
||||
enable: (step: number) => void
|
||||
first: () => void
|
||||
goto: (step: number) => void
|
||||
last: () => void
|
||||
next: () => void
|
||||
uncomplete: (step: number) => void
|
||||
back: () => void;
|
||||
complete: (step: number) => void;
|
||||
disable: (step: number) => void;
|
||||
enable: (step: number) => void;
|
||||
first: () => void;
|
||||
goto: (step: number) => void;
|
||||
last: () => void;
|
||||
next: () => void;
|
||||
uncomplete: (step: number) => void;
|
||||
}
|
||||
type StepsObject = Readonly<MutableStepsObject> & Readonly<InputStepsState> & StepsInitOptions & { readonly steps: readonly KeyedStep[] }
|
||||
|
||||
|
|
Loading…
Reference in a new issue