-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.19 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
/**
* How to install and use
* @link {https://www.arden.nl/setting-up-a-gatsby-js-starter-with-type-script-es-lint-prettier-and-pre-commit-hooks}
* @link {https://github.com/goparrot/eslint-config}
* One rule documentation
* @link {https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-var-requires.md}
*/
module.exports = {
root: true,
env: {
node: true,
es2020: true,
jest: true,
},
extends: ['@goparrot/eslint-config/recommended', '@goparrot/eslint-config/less-strict'],
parserOptions: {
project: './tsconfig.eslint.json',
},
rules: {
camelcase: 'off',
'spaced-comment': ['error', 'always'],
'array-callback-return': ['error', { checkForEach: true }],
'use-isnan': ['error', { enforceForSwitchCase: true, enforceForIndexOf: true }],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
},
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'class',
prefix: ['Clover'],
format: ['PascalCase'],
},
{
selector: 'interface',
prefix: ['IClover'],
format: ['PascalCase'],
},
{
selector: 'enum',
prefix: ['Clover'],
suffix: ['Enum'],
format: ['PascalCase'],
},
{
selector: 'enumMember',
format: ['camelCase', 'UPPER_CASE'],
},
],
},
};