You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
],// Enforce return type definitions for functions
29
+
'@typescript-eslint/explicit-member-accessibility': 'error',// Enforce explicit accessibility modifiers on class properties and methods (public, private, protected)
'@typescript-eslint/no-explicit-any': 'error',// Disallow usage of the any type
50
+
'@typescript-eslint/no-unused-vars': ['error',{argsIgnorePattern: '^_'}],// Disallow unused variables, except for variables starting with an underscore
51
+
'@typescript-eslint/no-use-before-define': ['off'],// Check if this rule is needed
52
+
'no-unused-vars': 'off',// Disable eslint core rule, since it's replaced by @typescript-eslint/no-unused-vars
53
+
// Rules from eslint core https://eslint.org/docs/latest/rules/
54
+
'array-bracket-spacing': ['error','never'],// Disallow spaces inside of array brackets
55
+
'computed-property-spacing': ['error','never'],// Disallow spaces inside of computed properties
56
+
'func-style': ['warn','expression'],// Enforce function expressions instead of function declarations
57
+
'keyword-spacing': 'error',// Enforce spaces after keywords and before parenthesis, e.g. if (condition) instead of if(condition)
58
+
'padding-line-between-statements': [
59
+
// Require an empty line before return statements
60
+
'error',
61
+
{blankLine: 'always',prev: '*',next: 'return'},
62
+
],
63
+
'no-console': 0,// Allow console.log statements
64
+
'no-multi-spaces': ['error',{ignoreEOLComments: false}],// Disallow multiple spaces except for comments
65
+
'no-multiple-empty-lines': ['error',{max: 1,maxBOF: 0,maxEOF: 0}],// Enforce no empty line at the beginning & end of files and max 1 empty line between consecutive statements
66
+
'no-throw-literal': 'error',// Disallow throwing literals as exceptions, e.g. throw 'error' instead of throw new Error('error')
67
+
'object-curly-spacing': ['error','always'],// Enforce spaces inside of curly braces in objects
68
+
'prefer-arrow-callback': 'error',// Enforce arrow functions instead of anonymous functions for callbacks
69
+
quotes: ['error','single',{allowTemplateLiterals: true}],// Enforce single quotes except for template strings
70
+
semi: ['error','always'],// Require semicolons instead of ASI (automatic semicolon insertion) at the end of statements
// Use the middleware by passing the Tracer instance as a parameter
98
-
.use(captureLambdaHandler(tracer,{captureResponse: false}));// by default the tracer would add the response as metadata on the segment, but there is a chance to hit the 64kb segment size limit. Therefore set captureResponse: false
109
+
.use(captureLambdaHandler(tracer,{captureResponse: false}));// by default the tracer would add the response as metadata on the segment, but there is a chance to hit the 64kb segment size limit. Therefore set captureResponse: false
@@ -22,7 +26,6 @@ import { default as request } from 'phin';
22
26
*/
23
27
24
28
classLambdaimplementsLambdaInterface{
25
-
26
29
@tracer.captureMethod()
27
30
publicasyncgetUuid(): Promise<string>{
28
31
// Request a sample random uuid from a webservice
@@ -37,11 +40,18 @@ class Lambda implements LambdaInterface {
37
40
38
41
@tracer.captureLambdaHandler({captureResponse: false})// by default the tracer would add the response as metadata on the segment, but there is a chance to hit the 64kb segment size limit. Therefore set captureResponse: false
0 commit comments