mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-24 04:27:27 +08:00
fix: add new-for-builtins rule (#5116)
This commit is contained in:
@@ -214,6 +214,7 @@ const config = {
|
|||||||
'unicorn/prefer-date-now': 'error',
|
'unicorn/prefer-date-now': 'error',
|
||||||
'unicorn/no-typeof-undefined': 'error',
|
'unicorn/no-typeof-undefined': 'error',
|
||||||
'unicorn/no-useless-promise-resolve-reject': 'error',
|
'unicorn/no-useless-promise-resolve-reject': 'error',
|
||||||
|
'unicorn/new-for-builtins': 'error',
|
||||||
'sonarjs/no-all-duplicated-branches': 'error',
|
'sonarjs/no-all-duplicated-branches': 'error',
|
||||||
'sonarjs/no-element-overwrite': 'error',
|
'sonarjs/no-element-overwrite': 'error',
|
||||||
'sonarjs/no-empty-collection': 'error',
|
'sonarjs/no-empty-collection': 'error',
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class FakePrisma {
|
|||||||
get workspace() {
|
get workspace() {
|
||||||
return {
|
return {
|
||||||
async findUnique() {
|
async findUnique() {
|
||||||
throw Error('exception from graphql');
|
throw new Error('exception from graphql');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export const TRACE_ID_BYTES = 16;
|
|||||||
export const TRACE_VERSION = '00';
|
export const TRACE_VERSION = '00';
|
||||||
export const TRACE_FLAG = '01';
|
export const TRACE_FLAG = '01';
|
||||||
|
|
||||||
const BytesBuffer = Array(32);
|
const BytesBuffer = new Array(32);
|
||||||
|
|
||||||
type TraceSpan = {
|
type TraceSpan = {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user