Use the typescript version of semicolon eslint rule
This commit is contained in:
parent
79da440af2
commit
7fb83b8657
7 changed files with 14 additions and 16 deletions
|
@ -76,10 +76,8 @@ module.exports = {
|
||||||
"error",
|
"error",
|
||||||
"unix",
|
"unix",
|
||||||
],
|
],
|
||||||
"semi": [
|
"semi": "off",
|
||||||
"error",
|
"@typescript-eslint/semi": ["error", "always"],
|
||||||
"always",
|
|
||||||
],
|
|
||||||
"no-trailing-spaces": ["error"],
|
"no-trailing-spaces": ["error"],
|
||||||
"indent": ["error", "tab", { "SwitchCase": 1 }], // we use tabs for accessibility
|
"indent": ["error", "tab", { "SwitchCase": 1 }], // we use tabs for accessibility
|
||||||
"comma-dangle": "off",
|
"comma-dangle": "off",
|
||||||
|
|
|
@ -5,7 +5,7 @@ import pluralRules from './pluralRules';
|
||||||
|
|
||||||
import type {Polyfilled} from './types';
|
import type {Polyfilled} from './types';
|
||||||
|
|
||||||
type PolyfilledNumberFormat = Polyfilled<typeof Intl.NumberFormat>
|
type PolyfilledNumberFormat = Polyfilled<typeof Intl.NumberFormat>;
|
||||||
|
|
||||||
export default async function numberFormat(locales:string[]) :Promise<void> {
|
export default async function numberFormat(locales:string[]) :Promise<void> {
|
||||||
await pluralRules(locales);
|
await pluralRules(locales);
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type {Polyfilled} from './types';
|
||||||
|
|
||||||
import getCanonicalLocales from './getCanonicalLocales';
|
import getCanonicalLocales from './getCanonicalLocales';
|
||||||
|
|
||||||
type PolyfilledPluralRules = Polyfilled<typeof Intl.PluralRules>
|
type PolyfilledPluralRules = Polyfilled<typeof Intl.PluralRules>;
|
||||||
|
|
||||||
export default async function pluralRules(locales:string[]):Promise<void> {
|
export default async function pluralRules(locales:string[]):Promise<void> {
|
||||||
await getCanonicalLocales();
|
await getCanonicalLocales();
|
||||||
|
|
|
@ -17,7 +17,7 @@ const assertOperand = function (operand: unknown) {
|
||||||
throw new TypeError('Operand must be a number');
|
throw new TypeError('Operand must be a number');
|
||||||
};
|
};
|
||||||
|
|
||||||
type MoneyAsJson = { amount: number, currency: string }
|
type MoneyAsJson = { amount: number, currency: string };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a monetary amount. For safety, all Money objects are immutable. All of the functions in this class create a new Money object.
|
* Represents a monetary amount. For safety, all Money objects are immutable. All of the functions in this class create a new Money object.
|
||||||
|
@ -33,9 +33,9 @@ export class Money {
|
||||||
* @static
|
* @static
|
||||||
* @memberof Money
|
* @memberof Money
|
||||||
*/
|
*/
|
||||||
static fromSMU = Money.fromCents
|
static fromSMU = Money.fromCents;
|
||||||
|
|
||||||
readonly currency: string
|
readonly currency: string;
|
||||||
|
|
||||||
protected constructor(readonly amount: number, currency: string) {
|
protected constructor(readonly amount: number, currency: string) {
|
||||||
this.currency = currency.toLowerCase();
|
this.currency = currency.toLowerCase();
|
||||||
|
|
|
@ -134,9 +134,9 @@ interface MutableStepsObject extends InputStepsMethods {
|
||||||
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[] };
|
||||||
|
|
||||||
type StepTypes = 'goto' | 'first' | 'last' | 'back' | 'next' | 'complete' | 'uncomplete' | 'disable' | 'enable' | 'stepsChanged'
|
type StepTypes = 'goto' | 'first' | 'last' | 'back' | 'next' | 'complete' | 'uncomplete' | 'disable' | 'enable' | 'stepsChanged';
|
||||||
|
|
||||||
interface StepAction {
|
interface StepAction {
|
||||||
payload?: number | string | readonly KeyedStep[];
|
payload?: number | string | readonly KeyedStep[];
|
||||||
|
|
|
@ -96,12 +96,12 @@ type RequiredValueProps = {path:string};
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
type TestOptionsMessageFn<Extra extends Record<string, any> = Record<string, any>, R = any> =
|
type TestOptionsMessageFn<Extra extends Record<string, any> = Record<string, any>, R = any> =
|
||||||
| ((params: Extra & Partial<yup.TestMessageParams> & RequiredValueProps) => R)
|
| ((params: Extra & Partial<yup.TestMessageParams> & RequiredValueProps) => R);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
type ToPropResult<Extra extends Record<string, any> = Record<string, any>> = TestOptionsMessageFn<Extra>
|
type ToPropResult<Extra extends Record<string, any> = Record<string, any>> = TestOptionsMessageFn<Extra>;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
6
types/storybook-addon-intl/index.d.ts
vendored
6
types/storybook-addon-intl/index.d.ts
vendored
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
export declare function setIntlConfig(...unknown)
|
export declare function setIntlConfig(...unknown);
|
||||||
export declare function withIntl(...unknown)
|
export declare function withIntl(...unknown);
|
||||||
export declare function register(...unknown)
|
export declare function register(...unknown);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue