🚨(eslint) add missing rules
We recently upgraded to Eslint v9, it seems that it is missing some rules that we had previously. We add them back: - @typescript-eslint/no-inferrable-types - @typescript-eslint/no-floating-promises
This commit is contained in:
@@ -18,5 +18,5 @@ export const backendUrl = () =>
|
||||
* @param apiVersion - The version of the API (defaults to '1.0').
|
||||
* @returns The full versioned API base URL as a string.
|
||||
*/
|
||||
export const baseApiUrl = (apiVersion: string = '1.0') =>
|
||||
export const baseApiUrl = (apiVersion = '1.0') =>
|
||||
`${backendUrl()}/api/v${apiVersion}/`;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { baseApiUrl } from '@/api';
|
||||
|
||||
export const HOME_URL: string = '/home';
|
||||
export const HOME_URL = '/home';
|
||||
export const LOGIN_URL = `${baseApiUrl()}authenticate/`;
|
||||
export const LOGOUT_URL = `${baseApiUrl()}logout/`;
|
||||
export const PATH_AUTH_LOCAL_STORAGE = 'docs-path-auth';
|
||||
|
||||
@@ -22,7 +22,7 @@ function isBlock(block: Block): block is Block {
|
||||
);
|
||||
}
|
||||
|
||||
const recursiveContent = (content: Block[], base: string = '') => {
|
||||
const recursiveContent = (content: Block[], base = '') => {
|
||||
let fullContent = base;
|
||||
for (const innerContent of content) {
|
||||
if (innerContent.type === 'text') {
|
||||
|
||||
@@ -56,7 +56,7 @@ const LinkSelected = ({ url, title }: LinkSelectedProps) => {
|
||||
|
||||
const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.preventDefault();
|
||||
router.push(url);
|
||||
void router.push(url);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -64,8 +64,8 @@ describe('DocsGridItemDate', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it(`should render rendered the updated_at field in the correct language`, () => {
|
||||
i18next.changeLanguage('fr');
|
||||
it(`should render rendered the updated_at field in the correct language`, async () => {
|
||||
await i18next.changeLanguage('fr');
|
||||
|
||||
render(
|
||||
<DocsGridItemDate
|
||||
@@ -83,7 +83,7 @@ describe('DocsGridItemDate', () => {
|
||||
expect(screen.getByRole('link')).toBeInTheDocument();
|
||||
expect(screen.getByText('il y a 5 jours')).toBeInTheDocument();
|
||||
|
||||
i18next.changeLanguage('en');
|
||||
await i18next.changeLanguage('en');
|
||||
});
|
||||
|
||||
[
|
||||
|
||||
@@ -115,7 +115,9 @@ const DocPage = ({ id }: DocProps) => {
|
||||
// Invalidate when provider store reports a lost connection
|
||||
useEffect(() => {
|
||||
if (hasLostConnection && doc?.id) {
|
||||
queryClient.invalidateQueries({ queryKey: [KEY_DOC, { id: doc.id }] });
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: [KEY_DOC, { id: doc.id }],
|
||||
});
|
||||
resetLostConnection();
|
||||
}
|
||||
}, [hasLostConnection, doc?.id, queryClient, resetLostConnection]);
|
||||
|
||||
Reference in New Issue
Block a user