-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
46 lines (46 loc) · 1.5 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'filenames',
'no-loops',
'promise',
],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
],
rules: {
'react/jsx-filename-extension': [0],
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': ['error'],
'filenames/match-regex': [2, '^[a-z-.]+$', true],
'max-len': 'off',
'no-underscore-dangle': [2, { allow: ['_id', '_parsedOriginalUrl', '_parsedUrl'] }],
'no-unexpected-multiline': 'error',
'no-duplicate-imports': 'error',
'require-await': 'error',
'newline-after-var': 'error',
'newline-before-return': 'error',
'linebreak-style': 0,
'no-loops/no-loops': 2,
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
}],
'@typescript-eslint/no-unused-vars': 'error',
'semi': ['error', 'never'],
'@typescript-eslint/semi': 'off',
},
parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: __dirname,
},
}