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
32
'@typescript-eslint/explicit-member-accessibility': 'error',// Enforce explicit accessibility modifiers on class properties and methods (public, private, protected)
30
33
// '@typescript-eslint/indent': [ 'error', 2, { SwitchCase: 1 } ], // Rule is already defined in eslint core, also not recommended by typescript-eslint - prettier could be used instead
31
34
// '@typescript-eslint/interface-name-prefix': ['off'], // Probably not needed
32
35
// '@typescript-eslint/member-delimiter-style': [ 'error', { multiline: { delimiter: 'none' }} ], // Propose to disable this rule in favor of prettier as recommended here https://typescript-eslint.io/rules/member-delimiter-style/
33
-
'@typescript-eslint/member-ordering': [// Standardize the order of class members
36
+
'@typescript-eslint/member-ordering': [
37
+
// Standardize the order of class members
34
38
'error',
35
39
{
36
40
default: {
@@ -50,29 +54,30 @@ module.exports = {
50
54
],
51
55
'@typescript-eslint/no-explicit-any': 'error',// Disallow usage of the any type
52
56
// '@typescript-eslint/no-inferrable-types': ['off'], // Propose to disable this rule - read here why https://typescript-eslint.io/rules/no-inferrable-types/
53
-
'@typescript-eslint/no-unused-vars': ['error',{argsIgnorePattern: '^_'}],// Disallow unused variables, except for variables starting with an underscore
57
+
'@typescript-eslint/no-unused-vars': ['error',{argsIgnorePattern: '^_'}],// Disallow unused variables, except for variables starting with an underscore
54
58
'@typescript-eslint/no-use-before-define': ['off'],// Check if this rule is needed
55
59
// '@typescript-eslint/semi': [ 'error', 'always' ], Rule is already defined in eslint core, and also not recommended by typescript-eslint - prettier could be used instead
56
60
'no-unused-vars': 'off',// Disable eslint core rule, since it's replaced by @typescript-eslint/no-unused-vars
57
61
// Rules from eslint core https://eslint.org/docs/latest/rules/
58
-
'array-bracket-spacing': ['error','never'],// Disallow spaces inside of array brackets
62
+
'array-bracket-spacing': ['error','never'],// Disallow spaces inside of array brackets
59
63
// 'arrow-body-style': [ 'error', 'as-needed' ], Default is already 'as-needed'
60
-
'computed-property-spacing': ['error','never'],// Disallow spaces inside of computed properties
61
-
'func-style': ['warn','expression'],// Enforce function expressions instead of function declarations
62
-
indent: ['error',2,{SwitchCase: 1}],
64
+
'computed-property-spacing': ['error','never'],// Disallow spaces inside of computed properties
65
+
'func-style': ['warn','expression'],// Enforce function expressions instead of function declarations
66
+
// indent: ['error', 2, { SwitchCase: 1 }],
63
67
'keyword-spacing': 'error',// Enforce spaces after keywords and before parenthesis, e.g. if (condition) instead of if(condition)
64
-
'padding-line-between-statements': [// Require an empty line before return statements
68
+
'padding-line-between-statements': [
69
+
// Require an empty line before return statements
65
70
'error',
66
71
{blankLine: 'always',prev: '*',next: 'return'},
67
72
],
68
73
// 'newline-before-return': 2, // Deprecated in favor of padding-line-between-statements
69
74
'no-console': 0,// Allow console.log statements
70
-
'no-multi-spaces': ['error',{ignoreEOLComments: false}],// Disallow multiple spaces except for comments
71
-
'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
75
+
'no-multi-spaces': ['error',{ignoreEOLComments: false}],// Disallow multiple spaces except for comments
76
+
'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
72
77
'no-throw-literal': 'error',// Disallow throwing literals as exceptions, e.g. throw 'error' instead of throw new Error('error')
73
-
'object-curly-spacing': ['error','always'],// Enforce spaces inside of curly braces in objects
78
+
'object-curly-spacing': ['error','always'],// Enforce spaces inside of curly braces in objects
74
79
'prefer-arrow-callback': 'error',// Enforce arrow functions instead of anonymous functions for callbacks
75
-
quotes: ['error','single',{allowTemplateLiterals: true}],// Enforce single quotes except for template strings
76
-
semi: ['error','always'],// Require semicolons instead of ASI (automatic semicolon insertion) at the end of statements
77
-
}
80
+
quotes: ['error','single',{allowTemplateLiterals: true}],// Enforce single quotes except for template strings
81
+
semi: ['error','always'],// Require semicolons instead of ASI (automatic semicolon insertion) at the end of statements
0 commit comments