From a3da67c90c51754b401479270550269927e333a6 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 1 Oct 2022 17:15:00 +0200 Subject: [PATCH] fix: linting errors --- packages/astro-reactive-form/components/Field.astro | 2 +- packages/astro-reactive-form/core/form-control.ts | 8 ++++---- packages/astro-reactive-form/package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/astro-reactive-form/components/Field.astro b/packages/astro-reactive-form/components/Field.astro index 583b7cc..8a8644e 100644 --- a/packages/astro-reactive-form/components/Field.astro +++ b/packages/astro-reactive-form/components/Field.astro @@ -1,5 +1,5 @@ --- -import { FormControl } from '../core/form-control'; +import type { FormControl } from '../core/form-control'; export interface Props { control: FormControl; diff --git a/packages/astro-reactive-form/core/form-control.ts b/packages/astro-reactive-form/core/form-control.ts index 8a858f0..6d3edf6 100644 --- a/packages/astro-reactive-form/core/form-control.ts +++ b/packages/astro-reactive-form/core/form-control.ts @@ -26,7 +26,7 @@ type FormControlType = | 'week'; export class FormControl { - name: string; + name: string = ''; type?: FormControlType = 'text'; value?: string | number | null | string[]; label?: string; @@ -37,17 +37,17 @@ export class FormControl { * TODO: Create classes for each control type */ -export class Checkbox extends FormControl { +export interface Checkbox extends FormControl { type: 'checkbox'; checked: boolean; } -export class Radio extends FormControl { +export interface Radio extends FormControl { type: 'checkbox'; checked: boolean; } -export class Submit extends FormControl { +export interface Submit extends FormControl { type: 'submit'; callBack: () => void; } diff --git a/packages/astro-reactive-form/package.json b/packages/astro-reactive-form/package.json index f972576..fe87c8e 100644 --- a/packages/astro-reactive-form/package.json +++ b/packages/astro-reactive-form/package.json @@ -1,7 +1,7 @@ { "name": "astro-reactive-form", "description": "The Reactive Form component for Astro 🔥", - "version": "0.1.3", + "version": "0.1.4", "repository": "https://github.com/ayoayco/astro-reactive-library", "homepage": "https://github.com/ayoayco/astro-reactive-library#readme", "author": {