fix: add new-for-builtins rule (#5116)

This commit is contained in:
LongYinan
2023-11-29 04:44:02 +00:00
parent 19c61e051d
commit 68caf5027d
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -214,6 +214,7 @@ const config = {
'unicorn/prefer-date-now': 'error',
'unicorn/no-typeof-undefined': 'error',
'unicorn/no-useless-promise-resolve-reject': 'error',
'unicorn/new-for-builtins': 'error',
'sonarjs/no-all-duplicated-branches': 'error',
'sonarjs/no-element-overwrite': 'error',
'sonarjs/no-empty-collection': 'error',
@@ -17,7 +17,7 @@ class FakePrisma {
get workspace() {
return {
async findUnique() {
throw Error('exception from graphql');
throw new Error('exception from graphql');
},
};
}
+1 -1
View File
@@ -3,7 +3,7 @@ export const TRACE_ID_BYTES = 16;
export const TRACE_VERSION = '00';
export const TRACE_FLAG = '01';
const BytesBuffer = Array(32);
const BytesBuffer = new Array(32);
type TraceSpan = {
name: string;