Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,29 @@ module.exports = {
"@graphql-eslint/variables-in-allowed-position": "error",
},
},
{
files: ["**/*.{ts,tsx}"],
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
args: "after-used",
ignoreRestSiblings: true,
},
],
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/no-duplicates": ["error", { "prefer-inline": true }],
},
},
],
parserOptions: {
ecmaVersion: 2018,
Expand Down Expand Up @@ -111,15 +134,6 @@ module.exports = {
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
args: "after-used",
ignoreRestSiblings: true,
},
],
"no-unused-expressions": [
"error",
{
Expand Down
2 changes: 1 addition & 1 deletion @app/__tests__/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Pool, PoolClient } from "pg";
import { Pool, type PoolClient } from "pg";

const pools: { [key: string]: Pool } = {};

Expand Down
2 changes: 1 addition & 1 deletion @app/client/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "antd/dist/reset.css";
import "nprogress/nprogress.css";
import "../styles.css";

import { ApolloClient, ApolloProvider } from "@apollo/client";
import { type ApolloClient, ApolloProvider } from "@apollo/client";
import { setGraphileApp, withApollo } from "@app/lib";
import { ConfigProvider, notification } from "antd";
import App from "next/app";
Expand Down
2 changes: 1 addition & 1 deletion @app/client/src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Document, {
DocumentContext,
type DocumentContext,
Head,
Html,
Main,
Expand Down
2 changes: 1 addition & 1 deletion @app/client/src/pages/_error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@app/components";
import { useSharedQuery } from "@app/graphql";
import { Alert, Col, Row } from "antd";
import { NextPage } from "next";
import { type NextPage } from "next";
import Link from "next/link";
import * as React from "react";

Expand Down
8 changes: 4 additions & 4 deletions @app/client/src/pages/create-organization/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PageHeader } from "@ant-design/pro-layout";
import { ApolloError } from "@apollo/client";
import { type ApolloError } from "@apollo/client";
import { AuthRestrict, Redirect, SharedLayout } from "@app/components";
import {
CreatedOrganizationFragment,
type CreatedOrganizationFragment,
useCreateOrganizationMutation,
useOrganizationBySlugLazyQuery,
useSharedQuery,
Expand All @@ -15,8 +15,8 @@ import {
} from "@app/lib";
import { Alert, Button, Col, Form, Input, Row, Spin, Typography } from "antd";
import { debounce } from "lodash";
import { NextPage } from "next";
import { Store } from "rc-field-form/lib/interface";
import { type NextPage } from "next";
import { type Store } from "rc-field-form/lib/interface";
import React, { useCallback, useEffect, useMemo, useState } from "react";
import slugify from "slugify";

Expand Down
9 changes: 4 additions & 5 deletions @app/client/src/pages/forgot.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { UserOutlined } from "@ant-design/icons";
import { ApolloError } from "@apollo/client";
import { type ApolloError } from "@apollo/client";
import { AuthRestrict, SharedLayout } from "@app/components";
import { useForgotPasswordMutation, useSharedQuery } from "@app/graphql";
import { extractError, getCodeFromError } from "@app/lib";
import type { InputRef } from "antd";
import { Alert, Button, Form, Input } from "antd";
import { NextPage } from "next";
import { Alert, Button, Form, Input, type InputRef } from "antd";
import { type NextPage } from "next";
import Link from "next/link";
import { Store } from "rc-field-form/lib/interface";
import { type Store } from "rc-field-form/lib/interface";
import React, { useCallback, useEffect, useRef, useState } from "react";

const { useForm } = Form;
Expand Down
2 changes: 1 addition & 1 deletion @app/client/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from "react";
const { Text, Title, Paragraph } = Typography;
import { SharedLayout } from "@app/components";
import { useSharedQuery } from "@app/graphql";
import { NextPage } from "next";
import { type NextPage } from "next";

// Convenience helper
const Li = ({ children, ...props }: any) => (
Expand Down
14 changes: 7 additions & 7 deletions @app/client/src/pages/invitations/accept.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryResult } from "@apollo/client";
import { type QueryResult } from "@apollo/client";
import {
AuthRestrict,
ButtonLink,
Expand All @@ -8,18 +8,18 @@ import {
SpinPadded,
} from "@app/components";
import {
InvitationDetailQuery,
InvitationDetailQueryVariables,
SharedLayout_UserFragment,
type InvitationDetailQuery,
type InvitationDetailQueryVariables,
type SharedLayout_UserFragment,
useAcceptOrganizationInviteMutation,
useInvitationDetailQuery,
} from "@app/graphql";
import { getCodeFromError } from "@app/lib";
import { Button, Col, Result, Row, Skeleton } from "antd";
import { NextPage } from "next";
import Router, { NextRouter, useRouter } from "next/router";
import { type NextPage } from "next";
import Router, { type NextRouter, useRouter } from "next/router";
import * as qs from "querystring";
import React, { FC } from "react";
import React, { type FC } from "react";

interface IProps {
id: string | null;
Expand Down
11 changes: 5 additions & 6 deletions @app/client/src/pages/login.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { LockOutlined, UserAddOutlined, UserOutlined } from "@ant-design/icons";
import { ApolloError, useApolloClient } from "@apollo/client";
import { type ApolloError, useApolloClient } from "@apollo/client";
import {
AuthRestrict,
ButtonLink,
Col,
Redirect,
Row,
SharedLayout,
SharedLayoutChildProps,
type SharedLayoutChildProps,
SocialLoginOptions,
} from "@app/components";
import { useLoginMutation, useSharedQuery } from "@app/graphql";
Expand All @@ -16,12 +16,11 @@ import {
getCodeFromError,
resetWebsocketConnection,
} from "@app/lib";
import type { InputRef } from "antd";
import { Alert, Button, Form, Input } from "antd";
import { NextPage } from "next";
import { Alert, Button, Form, Input, type InputRef } from "antd";
import { type NextPage } from "next";
import Link from "next/link";
import Router from "next/router";
import { Store } from "rc-field-form/lib/interface";
import { type Store } from "rc-field-form/lib/interface";
import React, { useCallback, useEffect, useRef, useState } from "react";

interface LoginProps {
Expand Down
6 changes: 3 additions & 3 deletions @app/client/src/pages/o/[slug]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
useOrganizationSlug,
} from "@app/components";
import {
OrganizationPage_OrganizationFragment,
type OrganizationPage_OrganizationFragment,
useOrganizationPageQuery,
} from "@app/graphql";
import { Col, Empty, Row } from "antd";
import { NextPage } from "next";
import React, { FC } from "react";
import { type NextPage } from "next";
import React, { type FC } from "react";

const OrganizationPage: NextPage = () => {
const slug = useOrganizationSlug();
Expand Down
10 changes: 5 additions & 5 deletions @app/client/src/pages/o/[slug]/settings/delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PageHeader } from "@ant-design/pro-layout";
import { ApolloError } from "@apollo/client";
import { type ApolloError } from "@apollo/client";
import {
AuthRestrict,
ErrorAlert,
Expand All @@ -10,15 +10,15 @@ import {
useOrganizationSlug,
} from "@app/components";
import {
OrganizationPage_OrganizationFragment,
SharedLayout_UserFragment,
type OrganizationPage_OrganizationFragment,
type SharedLayout_UserFragment,
useDeleteOrganizationMutation,
useOrganizationPageQuery,
} from "@app/graphql";
import { Alert, Button, message, Popconfirm } from "antd";
import { NextPage } from "next";
import { type NextPage } from "next";
import { useRouter } from "next/router";
import React, { FC, useCallback, useState } from "react";
import React, { type FC, useCallback, useState } from "react";

const OrganizationSettingsPage: NextPage = () => {
const slug = useOrganizationSlug();
Expand Down
8 changes: 4 additions & 4 deletions @app/client/src/pages/o/[slug]/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import {
useOrganizationSlug,
} from "@app/components";
import {
OrganizationPage_OrganizationFragment,
type OrganizationPage_OrganizationFragment,
useOrganizationPageQuery,
useUpdateOrganizationMutation,
} from "@app/graphql";
import { extractError, formItemLayout, tailFormItemLayout } from "@app/lib";
import { Alert, Button, Form, Input, message } from "antd";
import { NextPage } from "next";
import { type NextPage } from "next";
import Router, { useRouter } from "next/router";
import { Store } from "rc-field-form/lib/interface";
import React, { FC, useCallback, useState } from "react";
import { type Store } from "rc-field-form/lib/interface";
import React, { type FC, useCallback, useState } from "react";

const { useForm } = Form;

Expand Down
12 changes: 6 additions & 6 deletions @app/client/src/pages/o/[slug]/settings/members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
useOrganizationSlug,
} from "@app/components";
import {
OrganizationMembers_MembershipFragment,
OrganizationMembers_OrganizationFragment,
SharedLayout_UserFragment,
type OrganizationMembers_MembershipFragment,
type OrganizationMembers_OrganizationFragment,
type SharedLayout_UserFragment,
useInviteToOrganizationMutation,
useOrganizationMembersQuery,
useRemoveFromOrganizationMutation,
Expand All @@ -29,10 +29,10 @@ import {
Typography,
} from "antd";
import Text from "antd/lib/typography/Text";
import { NextPage } from "next";
import { type NextPage } from "next";
import { useRouter } from "next/router";
import { Store } from "rc-field-form/lib/interface";
import React, { FC, useCallback, useState } from "react";
import { type Store } from "rc-field-form/lib/interface";
import React, { type FC, useCallback, useState } from "react";

const { useForm } = Form;

Expand Down
2 changes: 1 addition & 1 deletion @app/client/src/pages/o/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NextPage } from "next";
import { type NextPage } from "next";
import Router from "next/router";
import React, { useEffect } from "react";

Expand Down
10 changes: 5 additions & 5 deletions @app/client/src/pages/register.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { QuestionCircleOutlined } from "@ant-design/icons";
import { ApolloError, useApolloClient } from "@apollo/client";
import { type ApolloError, useApolloClient } from "@apollo/client";
import {
AuthRestrict,
PasswordStrength,
Expand All @@ -16,12 +16,12 @@ import {
setPasswordInfo,
tailFormItemLayout,
} from "@app/lib";
import { Alert, Button, Form, Input, InputRef, Tooltip } from "antd";
import { NextPage } from "next";
import { Alert, Button, Form, Input, type InputRef, Tooltip } from "antd";
import { type NextPage } from "next";
import Router from "next/router";
import { Store } from "rc-field-form/lib/interface";
import { type Store } from "rc-field-form/lib/interface";
import React, {
FocusEvent,
type FocusEvent,
useCallback,
useEffect,
useRef,
Expand Down
6 changes: 3 additions & 3 deletions @app/client/src/pages/reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { useResetPasswordMutation, useSharedQuery } from "@app/graphql";
import { formItemLayout, setPasswordInfo, tailFormItemLayout } from "@app/lib";
import { Alert, Button, Form, Input } from "antd";
import get from "lodash/get";
import { NextPage } from "next";
import { Store } from "rc-field-form/lib/interface";
import React, { FocusEvent, useCallback, useState } from "react";
import { type NextPage } from "next";
import { type Store } from "rc-field-form/lib/interface";
import React, { type FocusEvent, useCallback, useState } from "react";

const { useForm } = Form;

Expand Down
4 changes: 2 additions & 2 deletions @app/client/src/pages/settings/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
} from "@app/components";
import {
useCurrentUserAuthenticationsQuery,
UserAuthentication,
type UserAuthentication,
useSharedQuery,
useUnlinkUserAuthenticationMutation,
} from "@app/graphql";
import { Avatar, Card, List, Modal, Spin } from "antd";
import { NextPage } from "next";
import { type NextPage } from "next";
import React, { useCallback, useState } from "react";

const AUTH_NAME_LOOKUP: Record<string, string | undefined> = {
Expand Down
4 changes: 2 additions & 2 deletions @app/client/src/pages/settings/delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PageHeader } from "@ant-design/pro-layout";
import { ApolloError } from "@apollo/client";
import { type ApolloError } from "@apollo/client";
import { ErrorAlert, P, SettingsLayout } from "@app/components";
import {
useConfirmAccountDeletionMutation,
Expand All @@ -8,7 +8,7 @@ import {
} from "@app/graphql";
import { getCodeFromError } from "@app/lib";
import { Alert, Button, Modal, Typography } from "antd";
import { NextPage } from "next";
import { type NextPage } from "next";
import { useRouter } from "next/router";
import React, { useCallback, useState } from "react";

Expand Down
8 changes: 4 additions & 4 deletions @app/client/src/pages/settings/emails.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PageHeader } from "@ant-design/pro-layout";
import { ApolloError } from "@apollo/client";
import { type ApolloError } from "@apollo/client";
import {
ErrorAlert,
P,
Expand All @@ -8,7 +8,7 @@ import {
Strong,
} from "@app/components";
import {
EmailsForm_UserEmailFragment,
type EmailsForm_UserEmailFragment,
useAddEmailMutation,
useDeleteEmailMutation,
useMakeEmailPrimaryMutation,
Expand All @@ -22,8 +22,8 @@ import {
tailFormItemLayout,
} from "@app/lib";
import { Alert, Avatar, Button, Form, Input, List } from "antd";
import { NextPage } from "next";
import { Store } from "rc-field-form/lib/interface";
import { type NextPage } from "next";
import { type Store } from "rc-field-form/lib/interface";
import React, { useCallback, useState } from "react";

const { useForm } = Form;
Expand Down
Loading
Loading