Use the typescript version of semicolon eslint rule

This commit is contained in:
Eric Schultz 2021-01-11 12:28:16 -06:00 committed by Eric Schultz
parent 79da440af2
commit 7fb83b8657
7 changed files with 14 additions and 16 deletions

View file

@ -76,10 +76,8 @@ module.exports = {
"error",
"unix",
],
"semi": [
"error",
"always",
],
"semi": "off",
"@typescript-eslint/semi": ["error", "always"],
"no-trailing-spaces": ["error"],
"indent": ["error", "tab", { "SwitchCase": 1 }], // we use tabs for accessibility
"comma-dangle": "off",

View file

@ -5,7 +5,7 @@ import pluralRules from './pluralRules';
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> {
await pluralRules(locales);

View file

@ -5,7 +5,7 @@ import type {Polyfilled} from './types';
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> {
await getCanonicalLocales();

View file

@ -17,7 +17,7 @@ const assertOperand = function (operand: unknown) {
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.
@ -33,9 +33,9 @@ export class Money {
* @static
* @memberof Money
*/
static fromSMU = Money.fromCents
static fromSMU = Money.fromCents;
readonly currency: string
readonly currency: string;
protected constructor(readonly amount: number, currency: string) {
this.currency = currency.toLowerCase();

View file

@ -134,9 +134,9 @@ interface MutableStepsObject extends InputStepsMethods {
next: () => 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 {
payload?: number | string | readonly KeyedStep[];

View file

@ -96,12 +96,12 @@ type RequiredValueProps = {path:string};
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-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
type ToPropResult<Extra extends Record<string, any> = Record<string, any>> = TestOptionsMessageFn<Extra>
type ToPropResult<Extra extends Record<string, any> = Record<string, any>> = TestOptionsMessageFn<Extra>;
/**

View file

@ -1,5 +1,5 @@
export declare function setIntlConfig(...unknown)
export declare function withIntl(...unknown)
export declare function register(...unknown)
export declare function setIntlConfig(...unknown);
export declare function withIntl(...unknown);
export declare function register(...unknown);