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"/></>;
|
<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;
|
const {value, ...innerFormikProps} = props;
|
||||||
return <HoudiniIntlProvider locale="en">
|
return <HoudiniIntlProvider locale="en">
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {useI18nCurrencyInput, Types} from '@houdiniproject/react-i18n-currency-i
|
||||||
import '../../common/intl-polyfills/numberFormat';
|
import '../../common/intl-polyfills/numberFormat';
|
||||||
|
|
||||||
export interface UseSerializeMoneyProps extends Omit<Types.UseI18nCurrencyInputProps, 'currency' | 'locale'|'value'> {
|
export interface UseSerializeMoneyProps extends Omit<Types.UseI18nCurrencyInputProps, 'currency' | 'locale'|'value'> {
|
||||||
value:Money
|
value:Money;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -345,18 +345,18 @@ describe('.enable', () => {
|
||||||
describe('modify steps', () => {
|
describe('modify steps', () => {
|
||||||
function createTableEntry(props: {
|
function createTableEntry(props: {
|
||||||
expectation: {
|
expectation: {
|
||||||
activeStep?: number,
|
activeStep?: number;
|
||||||
completed?: KeyedStepMap<boolean>,
|
completed?: KeyedStepMap<boolean>;
|
||||||
disabled?: KeyedStepMap<boolean>,
|
disabled?: KeyedStepMap<boolean>;
|
||||||
},
|
};
|
||||||
initial: {
|
initial: {
|
||||||
activeStep?: number,
|
activeStep?: number;
|
||||||
completed?:
|
completed?:
|
||||||
KeyedStepMap<boolean>
|
KeyedStepMap<boolean>;
|
||||||
disabled?: KeyedStepMap<boolean>,
|
disabled?: KeyedStepMap<boolean>;
|
||||||
steps: KeyedStep[],
|
steps: KeyedStep[];
|
||||||
},
|
};
|
||||||
stepChange: KeyedStep[],
|
stepChange: KeyedStep[];
|
||||||
}
|
}
|
||||||
): [
|
): [
|
||||||
KeyedStep[], number | undefined, KeyedStepMap<boolean> | undefined, KeyedStepMap<boolean> | undefined, // initial
|
KeyedStep[], number | undefined, KeyedStepMap<boolean> | undefined, KeyedStepMap<boolean> | undefined, // initial
|
||||||
|
|
|
@ -13,7 +13,7 @@ export interface KeyedStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KeyedStepMap<T = unknown> {
|
export interface KeyedStepMap<T = unknown> {
|
||||||
[stepKey: string]: T
|
[stepKey: string]: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ReadonlyStepsState {
|
interface ReadonlyStepsState {
|
||||||
|
@ -24,7 +24,7 @@ interface ReadonlyStepsState {
|
||||||
/**
|
/**
|
||||||
* An internal copy of steps which only includes the key
|
* 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> {
|
interface InputStepsState extends Readonly<InputStepsMethods> {
|
||||||
readonly steps: readonly KeyedStep[]
|
readonly steps: readonly KeyedStep[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface InputStepsMethods {
|
interface InputStepsMethods {
|
||||||
addStep: (step: KeyedStep, before?: number) => void
|
addStep: (step: KeyedStep, before?: number) => void;
|
||||||
removeStep: (step: KeyedStep) => void
|
removeStep: (step: KeyedStep) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface MutableStepsObject extends InputStepsMethods {
|
interface MutableStepsObject extends InputStepsMethods {
|
||||||
back: () => void
|
back: () => void;
|
||||||
complete: (step: number) => void
|
complete: (step: number) => void;
|
||||||
disable: (step: number) => void
|
disable: (step: number) => void;
|
||||||
enable: (step: number) => void
|
enable: (step: number) => void;
|
||||||
first: () => void
|
first: () => void;
|
||||||
goto: (step: number) => void
|
goto: (step: number) => void;
|
||||||
last: () => void
|
last: () => void;
|
||||||
next: () => void
|
next: () => void;
|
||||||
uncomplete: (step: number) => void
|
uncomplete: (step: number) => void;
|
||||||
}
|
}
|
||||||
type StepsObject = Readonly<MutableStepsObject> & Readonly<InputStepsState> & StepsInitOptions & { readonly steps: readonly KeyedStep[] }
|
type StepsObject = Readonly<MutableStepsObject> & Readonly<InputStepsState> & StepsInitOptions & { readonly steps: readonly KeyedStep[] }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue