-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
69 lines (69 loc) · 1.86 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
globals: { BigInt: true },
rules: {
'@typescript-eslint/no-use-before-define': 'off',
// cant handle Category$Name at the moment, although
// pascal case should be enforced.
'@typescript-eslint/class-name-casing': 'off',
// neeeded during development in many cases and db migrations
'@typescript-eslint/no-empty-function': 'off',
'class-methods-use-this': 'off',
'comma-dangle': ['error', 'always-multiline'],
'consistent-return': 'off',
curly: ['error', 'all'],
camelcase: 'off',
'no-restricted-syntax': 'off',
'func-names': ['error', 'as-needed'],
'no-multi-assign': 'off',
'no-use-before-define': 'off',
'no-console': 'error',
'no-underscore-dangle': 'off',
'no-useless-constructor': 'off',
'import/export': 'off',
'import/no-cycle': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['dev/**', 'tests/**/*'] },
],
'prettier/prettier': 'error',
quotes: ['error', 'single', { avoidEscape: true }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
plugins: ['import', 'promise', 'prettier', '@typescript-eslint'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
directory: [
'./tsconfig.json',
],
},
},
},
};