mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Configure more comprehensive eslint rules for Typescript
Summary: - Update rules to be more like we've had with tslint - Switch tsserver plugin to eslint (tsserver makes for a much faster way to lint in editors) - Apply suggested auto-fixes - Fix all lint errors and warnings in core/, app/, test/ Test Plan: Some behavior may change subtly (e.g. added missing awaits), relying on existing tests to catch problems. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2785
This commit is contained in:
@@ -153,7 +153,7 @@ class BillingPaymentForm extends BillingSubForm {
|
||||
}) {
|
||||
super();
|
||||
const autofill = this._options.autofill;
|
||||
const stripeAPIKey = (G.window as any).gristConfig.stripeAPIKey;
|
||||
const stripeAPIKey = G.window.gristConfig.stripeAPIKey;
|
||||
try {
|
||||
this._stripe = G.Stripe(stripeAPIKey);
|
||||
this._elements = this._stripe.elements();
|
||||
@@ -462,7 +462,7 @@ function checkRequired(propertyName: string) {
|
||||
// if the current observable value is valid.
|
||||
function createValidated(
|
||||
owner: IDisposableOwnerT<any>,
|
||||
checkValidity: (value: string) => void
|
||||
checkValidity: (value: string) => void|Promise<void>,
|
||||
): IValidated<string> {
|
||||
const value = Observable.create(owner, '');
|
||||
const isInvalid = Observable.create<boolean>(owner, false);
|
||||
|
||||
@@ -352,7 +352,7 @@ function getFieldNewPosition(fields: KoArray<ViewFieldRec>, item: IField,
|
||||
return tableUtil.fieldInsertPositions(fields, index, 1)[0];
|
||||
}
|
||||
|
||||
function getItemIndex<T>(collection: KoArray<ViewFieldRec>, item: ViewFieldRec|null): number {
|
||||
function getItemIndex(collection: KoArray<ViewFieldRec>, item: ViewFieldRec|null): number {
|
||||
if (item !== null) {
|
||||
return collection.peek().indexOf(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user