-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
67 lines (67 loc) · 1.55 KB
/
Copy path.eslintrc.js
File metadata and controls
67 lines (67 loc) · 1.55 KB
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
module.exports = {
env: {
browser: false,
node: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:@typescript-eslint/all',
'prettier',
],
parserOptions: {
ecmaVersion: 2020,
project: './tsconfig.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'enumMember',
format: ['PascalCase'],
},
],
'@typescript-eslint/no-magic-numbers': [
'error',
{ ignoreArrayIndexes: true, ignoreEnums: true },
],
'@typescript-eslint/no-type-alias': [
'error',
{
allowAliases: 'always',
allowCallbacks: 'always',
allowLiterals: 'never',
allowMappedTypes: 'never',
},
],
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'node/no-missing-import': 'off',
'node/no-unsupported-features/es-syntax': 'off',
},
ignorePatterns: [
'/coverage',
'/dist',
'/integration-tests/**/*.js',
'/integration-tests/typescript/index.ts',
'/node_modules',
],
};