style: add no-self-compare rule (#5092)

This commit is contained in:
LongYinan 2023-11-28 08:55:50 +00:00
parent 890e3e4435
commit c1cf25d2d5
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99
2 changed files with 3 additions and 2 deletions

View File

@ -126,6 +126,7 @@ const config = {
'no-cond-assign': 'off', 'no-cond-assign': 'off',
'no-constant-binary-expression': 'error', 'no-constant-binary-expression': 'error',
'no-constructor-return': 'error', 'no-constructor-return': 'error',
'no-self-compare': 'error',
'react/prop-types': 'off', 'react/prop-types': 'off',
'react/jsx-no-useless-fragment': 'error', 'react/jsx-no-useless-fragment': 'error',
'@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/consistent-type-imports': 'error',

View File

@ -24,13 +24,13 @@ export function createAffineAwarenessProvider(
const socket = getIoManager().socket('/'); const socket = getIoManager().socket('/');
const awarenessBroadcast = ({ const awarenessBroadcast = ({
workspaceId, workspaceId: wsId,
awarenessUpdate, awarenessUpdate,
}: { }: {
workspaceId: string; workspaceId: string;
awarenessUpdate: string; awarenessUpdate: string;
}) => { }) => {
if (workspaceId !== workspaceId) { if (wsId !== workspaceId) {
return; return;
} }
applyAwarenessUpdate( applyAwarenessUpdate(