forked from Joystream/orion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (47 loc) · 1.29 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
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', 'prettier'],
env: {
node: true,
es6: true,
jest: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jest'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
},
{
selector: 'property',
format: [], // Don't force format of object properties, so they can be ie.: { "Some thing": 123 }, { some_thing: 123 } etc.
},
{
selector: 'accessor',
format: ['camelCase', 'snake_case'],
},
{
selector: 'enumMember',
format: null,
},
{
selector: 'typeLike',
format: [],
custom: { regex: '^([A-Z][a-z0-9]*_?)+', match: true }, // combined PascalCase and snake_case to allow ie. OpeningType_Worker
},
{
selector: 'classMethod',
modifiers: ['static'],
format: ['PascalCase'],
},
],
},
}