Fix lint
This commit is contained in:
+14
-3
@@ -5,7 +5,9 @@
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
@@ -47,7 +49,7 @@
|
||||
"no-extra-boolean-cast": "warn",
|
||||
"no-param-reassign": "error",
|
||||
"no-shadow": "warn",
|
||||
"no-unused-vars": "warn",
|
||||
"no-unused-vars": "off",
|
||||
"no-useless-constructor": "warn",
|
||||
"object-curly-newline": "error",
|
||||
"prefer-destructuring": "warn",
|
||||
@@ -70,6 +72,7 @@
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/label-has-for": "off",
|
||||
"react/display-name": "off",
|
||||
"react/destructuring-assignment": "off",
|
||||
"react/jsx-closing-bracket-location": "off",
|
||||
"react/jsx-closing-tag-location": "off",
|
||||
@@ -82,6 +85,14 @@
|
||||
"react/no-access-state-in-setstate": "warn",
|
||||
"react/prop-types": "off",
|
||||
"react/prefer-stateless-function": "off",
|
||||
"react/self-closing-comp": "off"
|
||||
"react/self-closing-comp": "off",
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/interface-name-prefix": "off",
|
||||
"@typescript-eslint/no-empty-interface": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": "warn"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import "./CommitteeContainer.scss";
|
||||
import { Occupation } from "../../models/Contacts";
|
||||
import ContactCard from '../ContactCard/ContactCard';
|
||||
import ContactCard from "../ContactCard/ContactCard";
|
||||
|
||||
export interface CommitteeContainerProps {
|
||||
name_fi: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Role } from "../../models/Contacts";
|
||||
export interface ContactCardProps {
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
phone: Number;
|
||||
phone: number;
|
||||
email: string;
|
||||
image: string;
|
||||
role: Role;
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface NavbarChildLinkProps {
|
||||
to: string;
|
||||
}
|
||||
export interface NavbarChildLinkState {
|
||||
open: Boolean;
|
||||
open: boolean;
|
||||
}
|
||||
|
||||
class NavbarChildLink extends React.Component<NavbarChildLinkProps, NavbarChildLinkState> {
|
||||
|
||||
@@ -9,8 +9,8 @@ export interface NavbarDropdownLinkProps {
|
||||
exploded?: boolean; // if exploded, show items directly underneath without a dropdown menu
|
||||
}
|
||||
export interface NavbarDropdownLinkState {
|
||||
mouseOverLink: Boolean;
|
||||
mouseOverBox: Boolean;
|
||||
mouseOverLink: boolean;
|
||||
mouseOverBox: boolean;
|
||||
}
|
||||
|
||||
class NavbarDropdownLink extends React.Component<NavbarDropdownLinkProps, NavbarDropdownLinkState> {
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface SignupForm {
|
||||
export async function getForms(): Promise<SignupForm[]> {
|
||||
try {
|
||||
const resp = await axios.get(url);
|
||||
const results = resp.data["results"];
|
||||
const { results } = resp.data;
|
||||
return results;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -38,7 +38,7 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
|
||||
this.fetchTags();
|
||||
|
||||
const id = props.match.params.id;
|
||||
const { id } = props.match.params;
|
||||
if (id !== undefined) {
|
||||
this.fetchInitialFormData(id);
|
||||
}
|
||||
@@ -217,17 +217,17 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
<link rel="canonical" href="https://sik.ayy.fi/admin/events/create" />
|
||||
</Helmet>
|
||||
<h1>{title}</h1>
|
||||
{ statusMessage && <div className="success">{ statusMessage }</div>}
|
||||
{statusMessage && <div className="success">{statusMessage}</div>}
|
||||
<Form schema={schema}
|
||||
uiSchema={uiSchema}
|
||||
formData={formData}
|
||||
idPrefix="rjsf"
|
||||
widgets={widgets}
|
||||
onChange={this.onChange}
|
||||
onSubmit={this.onSubmit}
|
||||
onError={this.onError}
|
||||
onFocus={this.onFocus} />
|
||||
{ error && <div className="error">{error}</div> }
|
||||
uiSchema={uiSchema}
|
||||
formData={formData}
|
||||
idPrefix="rjsf"
|
||||
widgets={widgets}
|
||||
onChange={this.onChange}
|
||||
onSubmit={this.onSubmit}
|
||||
onError={this.onError}
|
||||
onFocus={this.onFocus} />
|
||||
{error && <div className="error">{error}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface SignUpPageProps {
|
||||
match: {
|
||||
params: {
|
||||
id: number;
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ class SignUpPage extends React.Component<SignUpPageProps, SignUpPageState> {
|
||||
return <input type="text" name={question.id} />;
|
||||
}
|
||||
if (question.type === "radiobutton") {
|
||||
const options = question.options;
|
||||
return options.map((opt) => (
|
||||
<span>
|
||||
const { options } = question;
|
||||
return options.map((opt, index) => (
|
||||
<span key={index}>
|
||||
<input type="radio" name={`${question.id}`} />
|
||||
{opt}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user