Skip to content

Commit e516391

Browse files
Merge pull request #400 from topcoder-platform/TCA-561_eval-rules
TCA-561 Update eslint rules to match our project -> TCA-499_eslint
2 parents cc8b277 + acdfc58 commit e516391

File tree

1 file changed

+55
-5
lines changed

1 file changed

+55
-5
lines changed

src-ts/.eslintrc.js

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,28 @@ module.exports = {
3333
}
3434
},
3535
rules: {
36+
"@typescript-eslint/ban-types": [
37+
"error",
38+
{
39+
"extendDefaults": true,
40+
"types": {
41+
"{}": false
42+
}
43+
}
44+
],
3645
'@typescript-eslint/explicit-function-return-type': 'off',
46+
'@typescript-eslint/no-explicit-any': 'error',
3747
'@typescript-eslint/no-inferrable-types': 'off',
3848
'@typescript-eslint/no-shadow': 'error',
49+
'@typescript-eslint/strict-boolean-expressions': [
50+
'error',
51+
{
52+
allowNullableBoolean: true,
53+
allowNullableObject: true,
54+
allowNullableNumber: true,
55+
allowNullableString: true
56+
}
57+
],
3958
'import/extensions': 'off',
4059
'import/prefer-default-export': 'off',
4160
'indent': [
@@ -45,17 +64,46 @@ module.exports = {
4564
SwitchCase: 1,
4665
},
4766
],
67+
'jsx-a11y/tabindex-no-positive': [
68+
'warn'
69+
],
70+
'no-extra-boolean-cast': "off",
71+
'no-plusplus': [
72+
'error',
73+
{
74+
allowForLoopAfterthoughts: true
75+
}
76+
],
77+
'no-restricted-syntax': [
78+
'error',
79+
'ForIfStatement',
80+
'LabeledStatement',
81+
'WithStatement'
82+
],
4883
'no-shadow': 'off',
4984
'no-use-before-define': [
5085
'error',
51-
{ functions: false }
86+
{
87+
functions: false,
88+
}
5289
],
53-
'padded-blocks': [
90+
"padding-line-between-statements": [
5491
'error',
55-
{ }
92+
{ blankLine: 'always', prev: 'directive', next: '*' },
93+
{ blankLine: 'any', prev: 'directive', next: 'directive' },
94+
{ blankLine: 'always', prev: 'cjs-import', next: '*' },
95+
{ blankLine: 'any', prev: 'cjs-import', next: 'cjs-import' },
96+
{ blankLine: 'always', prev: 'cjs-export', next: '*' },
97+
{ blankLine: 'always', prev: 'multiline-block-like', next: '*' },
98+
{ blankLine: 'always', prev: 'class', next: '*' }
5699
],
100+
'prefer-destructuring': 'off',
57101
'react-hooks/exhaustive-deps': 'warn',
58102
'react-hooks/rules-of-hooks': 'error',
103+
'react/destructuring-assignment': [
104+
2,
105+
'never'
106+
],
59107
'react/function-component-definition': [
60108
2,
61109
{
@@ -79,9 +127,11 @@ module.exports = {
79127
2,
80128
4,
81129
],
130+
'react/jsx-no-useless-fragment': [
131+
0
132+
],
82133
'react/jsx-props-no-spreading': [
83-
2,
84-
{ html: 'ignore' },
134+
0
85135
],
86136
'react/react-in-jsx-scope': 'off',
87137
'react/require-default-props': 'off',

0 commit comments

Comments
 (0)