-
-
Notifications
You must be signed in to change notification settings - Fork 344
/
.eslintrc.js
100 lines (100 loc) · 2.96 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
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
// eslint-disable-next-line no-undef, header/header
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'header'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
// @todo more restrictive
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-namespace-keyword': 'off',
'no-async-promise-executor': 'off',
'no-constant-condition': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-useless-catch': 'off',
'no-useless-escape': 'off',
'prefer-const': 'off',
'header/header': [
2,
'block',
[
'',
' * This file is part of WPPConnect.',
' *',
' * WPPConnect is free software: you can redistribute it and/or modify',
' * it under the terms of the GNU Lesser General Public License as published by',
' * the Free Software Foundation, either version 3 of the License, or',
' * (at your option) any later version.',
' *',
' * WPPConnect is distributed in the hope that it will be useful,',
' * but WITHOUT ANY WARRANTY; without even the implied warranty of',
' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the',
' * GNU Lesser General Public License for more details.',
' *',
' * You should have received a copy of the GNU Lesser General Public License',
' * along with WPPConnect. If not, see <https://www.gnu.org/licenses/>.',
' ',
],
1,
],
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
overrides: [
{
files: ['src/lib/**/*.js'],
parser: '@babel/eslint-parser',
plugins: ['@babel'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
},
env: {
amd: true,
commonjs: true,
es6: true,
browser: true,
node: false,
},
globals: {
axios: true,
Debug: true,
Store: true,
WAPI: true,
WPP: true,
webpackJsonp: true,
WWebJS: true,
},
rules: {
// @todo more restrictive
'@typescript-eslint/no-array-constructor': 'off',
'no-prototype-builtins': 'off',
'no-redeclare': 'off',
},
},
{
files: ['src/lib/**/webpack.*.js', 'src/lib/**/gulpfile.js'],
env: {
browser: false,
node: true,
},
},
],
};