-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
58 lines (58 loc) · 2.03 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
module.exports = {
root: true,
ignorePatterns: ['dist/**/*'],
parserOptions: {
project: 'tsconfig.dev.json',
},
env: {
node: true,
jest: true,
},
extends: [
'@mobile-reality/eslint-config/node-typescript', // base config
'prettier',
'plugin:prettier/recommended', // to include prettier rules in eslint
'plugin:security/recommended',
],
plugins: ['unused-imports'],
// if jest is used jest config should be added to overrides section
overrides: [
{
files: ['test/**/*.ts'], // glob pattern has to match test files
extends: ['@mobile-reality/eslint-config/configs/jest'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'unicorn/no-empty-file': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'func-style': 'off',
'@typescript-eslint/require-await': 'off',
},
},
{
files: ['test/**/*.config.js'],
rules: {
'unicorn/no-empty-file': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'unused-imports/no-unused-imports': 'error',
'unicorn/prefer-node-protocol': 'off',
'unicorn/no-static-only-class': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/prefer-module': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'spaced-comment': 'off',
'no-inline-comments': 'off',
'line-comment-position': 'off',
'prefer-destructuring': 'off',
'no-negated-condition': 'off',
'security/detect-object-injection': 'off',
},
};