-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
49 lines (49 loc) · 1.75 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
/* eslint-env node */
module.exports = {
root: true,
plugins: ['node', 'promise', 'import'],
extends: ['airbnb-base', 'airbnb-typescript/base'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
},
rules: {
'max-len': ['error', { code: 140 }],
indent: ['error', 2],
semi: ['error', 'never'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'arrow-parens': ['error', 'always'],
'linebreak-style': ['error', 'unix'],
'operator-linebreak': ['error', 'before'],
'no-underscore-dangle': ['error', { allow: ['_id', '_db', '_primaryKey', '_ctx', '_tableName', '_'] }],
radix: ['error', 'as-needed'],
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'no-debugger': 'error',
'no-console': 'error',
'no-new': 'off',
'no-continue': 'off',
'no-await-in-loop': 'off',
'no-unused-vars': 'warn',
'no-restricted-syntax': 'warn',
'no-param-reassign': 'off',
'prefer-destructuring': 'off',
'class-methods-use-this': 'off',
'max-classes-per-file': 'off',
'ts-nocheck': 'off',
'import/order': ['error', {
alphabetize: { order: 'asc' },
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
warnOnUnassignedImports: true,
}],
'import/no-extraneous-dependencies': 'off',
'import/no-dynamic-require': 'off',
'import/no-cycle': 'error',
'import/prefer-default-export': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/type-annotation-spacing': ['error', { before: false, after: true }],
'@typescript-eslint/semi': ['error', 'never'],
},
}