-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
104 lines (104 loc) · 2.79 KB
/
index.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
env: {
browser: true,
jquery: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:eslint-comments/recommended',
'plugin:sonarjs/recommended',
'plugin:promise/recommended',
'plugin:prettier/recommended',
'plugin:unicorn/recommended',
'prettier',
'prettier/unicorn',
],
overrides: [
{
files: ['tsconfig.*', '.eslintrc.*'],
rules: {
'sort-keys-fix/sort-keys-fix': 'error',
},
},
],
parserOptions: {
ecmaVersion: 10,
},
plugins: ['sonarjs', 'no-secrets', 'sort-keys-fix'],
rules: {
'arrow-parens': ['error', 'always'],
'callback-return': 'error',
camelcase: 'warn',
'capitalized-comments': 'error',
'class-methods-use-this': 'off',
'eslint-comments/no-unused-disable': 'error',
'handle-callback-err': 'error',
'import/extensions': 'off',
'import/no-default-export': 'error',
'import/no-extraneous-dependencies': [
'warn',
{
devDependencies: ['**/*.test.{js,ts}', '**/*.spec.{js,ts}', '**/*.unit.{js,ts}', '**/*.it.{js,ts}', 'tests/**/*', 'test/**/*'],
},
],
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
indent: ['error', 'tab', { SwitchCase: 1 }],
'max-classes-per-file': 'off',
'max-depth': ['error', 3],
'max-len': [
'error',
{
code: 150,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
},
],
'max-nested-callbacks': ['error', 5],
'max-params': ['error', 5],
'no-console': 'error',
'no-continue': 'off',
'no-empty-function': 'off',
'no-magic-numbers': [
'error',
{
enforceConst: true,
ignore: [0, 1],
},
],
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-process-env': 'error',
'no-process-exit': 'error',
'no-restricted-syntax': 'off',
'no-secrets/no-secrets': 'error',
'no-underscore-dangle': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-use-before-define': ['error', { classes: true, functions: false, variables: true }],
'no-useless-call': 'error',
'no-useless-constructor': 'off',
'promise/always-return': 'off',
'promise/catch-or-return': 'off',
'quote-props': ['error', 'as-needed'],
quotes: ['warn', 'single'],
'sonarjs/no-duplicate-string': 'off',
strict: ['error', 'global'],
'unicorn/consistent-function-scoping': 'off',
'unicorn/filename-case': ['error', { cases: { camelCase: true, pascalCase: true } }],
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/no-null': 'off',
'unicorn/no-reduce': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-top-level-await': 'off',
'unicorn/prevent-abbreviations': 'off',
'valid-jsdoc': 'off',
},
};