mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 09:51:35 +03:00
fix: add prefer-date-now rule (#5113)
This commit is contained in:
parent
4dddbbdaee
commit
bd488262fa
@ -211,6 +211,7 @@ const config = {
|
||||
'unicorn/prefer-dom-node-append': 'error',
|
||||
'unicorn/prefer-dom-node-remove': 'error',
|
||||
'unicorn/prefer-array-some': 'error',
|
||||
'unicorn/prefer-date-now': 'error',
|
||||
'unicorn/no-useless-promise-resolve-reject': 'error',
|
||||
'sonarjs/no-all-duplicated-branches': 'error',
|
||||
'sonarjs/no-element-overwrite': 'error',
|
||||
|
@ -23,7 +23,7 @@ export type UserClaim = Pick<
|
||||
hasPassword?: boolean;
|
||||
};
|
||||
|
||||
export const getUtcTimestamp = () => Math.floor(new Date().getTime() / 1000);
|
||||
export const getUtcTimestamp = () => Math.floor(Date.now() / 1000);
|
||||
|
||||
@Injectable()
|
||||
export class AuthService {
|
||||
|
@ -85,7 +85,7 @@ export function useBlockSuiteMetaHelper(
|
||||
|
||||
setPageMeta(pageId, {
|
||||
trash: true,
|
||||
trashDate: +new Date(),
|
||||
trashDate: Date.now(),
|
||||
trashRelate: isRoot ? parentMeta?.id : undefined,
|
||||
});
|
||||
setPageReadonly(pageId, true);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { EventBasedChannel } from 'async-call-rpc';
|
||||
|
||||
export function getTime() {
|
||||
return new Date().getTime();
|
||||
return Date.now();
|
||||
}
|
||||
|
||||
export const isMacOS = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user