-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
67 lines (62 loc) · 1.7 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
'use strict'
module.exports = {
extends: [
'@strv/eslint-config-typescript',
'@strv/eslint-config-typescript/optional',
'@strv/eslint-config-typescript/style',
'@strv/eslint-config-react',
'@strv/eslint-config-react/optional',
'@strv/eslint-config-react/style',
'prettier',
],
plugins: ['@typescript-eslint', 'import', 'jest'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
env: {
'jest/globals': true,
},
rules: {
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
/**
* To also support format for React components which are using `PascalCase`
*/
{
selector: 'variable',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
'@typescript-eslint/restrict-template-expressions': [
'warn',
{
allowNumber: true,
},
],
'react/prop-types': 'off',
'react/require-default-props': 'off',
'no-shadow': 'off',
'import/exports-last': 'off',
'import/group-exports': 'off',
'padding-line-between-statements': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
// conflicts with prettier
'@typescript-eslint/no-extra-parens': 'off',
},
}