-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.node.js
More file actions
66 lines (66 loc) · 1.81 KB
/
.eslintrc.node.js
File metadata and controls
66 lines (66 loc) · 1.81 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json'
},
ignorePatterns: ["**/*.config.js",".eslintrc.js", "lib", "**/__mocks__/*.js"],
plugins: [
'@typescript-eslint',
'import',
'jest',
'sort-keys-fix',
'sort-class-members',
'unused-imports',
'promise',
// 'security'
],
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb-base',
'airbnb-typescript/base',
'plugin:jest/recommended',
'plugin:promise/recommended',
'prettier'
// 'plugin:security/recommended'
],
env: {
browser: false,
node: true,
es6: true,
jest: true,
},
settings: {
'import/resolver': {
typescript: {}
}
},
rules: {
'no-underscore-dangle': 'off',
'import/prefer-default-export': 'off',
'class-methods-use-this': 'warn',
'sort-keys-fix/sort-keys-fix': 'error',
'sort-class-members/sort-class-members': [ 'error', {
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'[conventional-private-properties]',
'constructor',
'[conventional-private-methods]',
'[methods]'
],
accessorPairPositioning: 'getThenSet',
// sort: 'alphabetical'
}],
'@typescript-eslint/no-unused-vars': 'off',
'no-restricted-syntax': ['error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'unused-imports/no-unused-imports': 2,
'unused-imports/no-unused-vars': 2
}
}