-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
executable file
·79 lines (79 loc) · 1.86 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['prettier', 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint'],
plugins: ['prettier', '@typescript-eslint'],
env: {
es6: true,
jest: true,
node: true,
},
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
pragma: 'React',
version: 'detect',
},
},
globals: {
on: true, // for the Socket file
},
rules: {
'array-bracket-spacing': [
'error',
'never',
{
objectsInArrays: false,
arraysInArrays: false,
},
],
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'comma-dangle': ['error', 'always-multiline'],
curly: 'error',
'eol-last': 'error',
'func-names': 'off',
'id-length': [
'error',
{
min: 1,
max: 50,
properties: 'never',
exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$'],
},
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'no-alert': 'error',
'no-console': 'off',
'no-const-assign': 'error',
'no-else-return': 'error',
'no-empty': 'off',
'no-shadow': 'error',
'no-undef': 'error',
'no-unused-vars': 'error',
'no-use-before-define': 'error',
'no-useless-constructor': 'error',
'object-curly-newline': 'off',
'object-shorthand': 'off',
'prefer-const': 'error',
'prefer-destructuring': ['error', { object: true, array: false }],
quotes: [
'error',
'single',
{
allowTemplateLiterals: true,
avoidEscape: true,
},
],
semi: ['error', 'always'],
'spaced-comment': 'error',
strict: ['error', 'global'],
},
};