-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
86 lines (86 loc) · 2.37 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: {
node: true,
'jest/globals': true,
},
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
},
plugins: ['@typescript-eslint', 'prettier', 'jest'],
ignorePatterns: [
'**/dist/**',
'**/vercel/examples/**',
'**/react-native/example/**',
'**/react-universal/example/**',
'**/fromExternal/**',
],
rules: {
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', varsIgnorePattern: '^__' },
],
'prettier/prettier': ['error'],
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/jest*.ts',
'**/*.test.ts',
'**/rollup.config.ts',
'**/*{.,_}{test,spec}.{ts,tsx}',
],
},
],
'import/default': 'error',
'import/export': 'error',
'import/extensions': ['error', 'never', { json: 'always' }],
'import/no-self-import': 'error',
'import/no-cycle': 'error',
'import/no-useless-path-segments': 'error',
'import/no-duplicates': 'error',
'import/prefer-default-export': 'off',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'@typescript-eslint/naming-convention': [
'error',
{
selector: ['method'],
format: ['camelCase'],
leadingUnderscore: 'forbid',
},
{
selector: ['method'],
format: ['camelCase'],
modifiers: ['private'],
leadingUnderscore: 'require',
},
{
selector: ['classProperty', 'parameterProperty'],
format: ['camelCase'],
leadingUnderscore: 'forbid',
},
{
selector: ['classProperty', 'parameterProperty'],
modifiers: ['static'],
format: ['PascalCase'],
leadingUnderscore: 'forbid',
},
{
selector: ['classProperty', 'parameterProperty'],
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
],
},
globals: {
BigInt: 'readonly',
},
};