-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
86 lines (86 loc) · 2.5 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
80
81
82
83
84
85
86
module.exports = {
env: {
es6: true,
browser: true,
node: true,
es2020: true,
},
extends: [
'standard',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended'
],
settings: {
react: {
version: "detect"
}
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'@typescript-eslint',
'react',
'import'
],
rules: {
'camelcase': 'off',
'comma-dangle': [2, {
'objects': 'always-multiline',
'arrays': 'always-multiline',
'functions': 'never',
'imports': 'always-multiline',
'exports': 'always-multiline',
}],
'no-undef': 'off',
'no-use-before-define': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off',
'semi': [ 2, 'never'],
'space-before-function-paren': [2, {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always',
}],
'@typescript-eslint/naming-convention': [2,
{ selector: 'default', format: ['camelCase'], leadingUnderscore: 'allow', trailingUnderscore: 'allow' },
{ selector: 'variable', format: ['camelCase', 'PascalCase', 'UPPER_CASE', 'snake_case'], leadingUnderscore: 'allow', trailingUnderscore: 'allow' },
{ selector: 'typeLike', format: ['PascalCase'] },
{ selector: 'typeAlias', format: ['PascalCase', 'camelCase'] },
{ selector: 'property', format: ['camelCase', 'snake_case'] },
{ selector: 'function', format: ['camelCase', 'PascalCase'] },
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/member-delimiter-style': [2, {
'multiline': {
delimiter: 'semi',
}
}],
'@typescript-eslint/no-empty-function': [1],
'@typescript-eslint/no-explicit-any': [0],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [2, {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
}],
'@typescript-eslint/no-unused-expressions': [2],
'@typescript-eslint/no-use-before-define': [2],
'import/first': [2],
'import/order': [2, {
'groups': ['builtin', 'external', 'parent', 'sibling'],
'newlines-between': 'always-and-inside-groups',
'alphabetize': { 'order': 'asc', 'caseInsensitive': true },
}],
'react/prop-types': [0],
},
}