(frontend) add @typescript-eslint/parser

In order to work correctly
@typescript-eslint/eslint-plugin requires
@typescript-eslint/parser to be installed as well.
We fixed the linting issues related to the
upgrade.
This commit is contained in:
Anthony LC
2024-08-30 09:36:00 +02:00
committed by Anthony LC
parent e8cc6a6f23
commit bd36983e3c
6 changed files with 301 additions and 283 deletions

View File

@@ -15,7 +15,6 @@ export interface TextProps extends BoxProps {
>;
$weight?: CSSProperties['fontWeight'];
$textAlign?: CSSProperties['textAlign'];
// eslint-disable-next-line @typescript-eslint/ban-types
$size?: TextSizes | (string & {});
$theme?:
| 'primary'

View File

@@ -48,7 +48,11 @@ export const ModalDelete = ({ access, onClose, team }: ModalDeleteProps) => {
// If we remove ourselves, we redirect to the home page
// because we are no longer part of the team
isMyself ? router.push('/') : onClose();
if (isMyself) {
router.push('/');
} else {
onClose();
}
},
});

View File

@@ -9,9 +9,7 @@ const Page: NextPageWithLayout = () => {
const router = useNavigate();
useEffect(() => {
config?.FEATURES.TEAMS
? router.push('/teams/')
: router.push('/mail-domains/');
router.push(config?.FEATURES.TEAMS ? '/teams/' : '/mail-domains/');
}, [config?.FEATURES.TEAMS, router]);
return null;

View File

@@ -24,7 +24,6 @@ const spacings = {
};
type SpacingsKey = keyof typeof spacings;
// eslint-disable-next-line @typescript-eslint/ban-types
export type Spacings = SpacingsKey | (string & {});
export const spacingValue = (value?: Spacings) =>

View File

@@ -9,6 +9,7 @@
"@next/eslint-plugin-next": "14.2.7",
"@tanstack/eslint-plugin-query": "5.52.3",
"@typescript-eslint/eslint-plugin": "8.3.0",
"@typescript-eslint/parser": "8.3.0",
"eslint": "8.57.0",
"eslint-config-next": "14.2.7",
"eslint-config-prettier": "9.1.0",

File diff suppressed because it is too large Load Diff