forked from JustOptimize/ShowHiddenChannels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
73 lines (73 loc) · 2.35 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
module.exports = {
globals: {
BdApi: true,
__VERSION__: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
env: {
browser: true,
commonjs: true,
es2021: true,
},
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
ignorePatterns: ['*.plugin.js'],
rules: {
'react/display-name': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'arrow-spacing': ['warn', { before: true, after: true }],
'brace-style': ['warn', '1tbs', { allowSingleLine: true }],
'comma-dangle': [
'warn',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'never',
exports: 'never',
functions: 'never',
},
],
'comma-spacing': 'warn',
'comma-style': 'warn',
curly: ['warn', 'multi-line', 'consistent'],
'dot-location': ['warn', 'property'],
'handle-callback-err': 'warn',
// "indent": ["error", "tab"],
// "indent": ["off", "tab"],
'keyword-spacing': 'warn',
'max-nested-callbacks': ['warn', { max: 4 }],
'max-statements-per-line': ['warn', { max: 2 }],
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
'no-empty-function': 'off',
'no-floating-decimal': 'warn',
'no-inline-comments': 'warn',
'no-lonely-if': 'warn',
'no-multi-spaces': 'warn',
'no-multiple-empty-lines': ['warn', { max: 2, maxEOF: 1, maxBOF: 0 }],
'no-shadow': ['warn', { allow: ['err', 'resolve', 'reject'] }],
'no-trailing-spaces': ['off'],
'no-var': 'warn',
'object-curly-spacing': ['warn', 'always'],
'prefer-const': 'warn',
// "quotes": ["error", "single"],
quotes: ['off', 'single'],
semi: ['warn', 'always'],
'space-before-blocks': 'warn',
'space-before-function-paren': [
'warn',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'space-in-parens': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'spaced-comment': 'warn',
yoda: 'warn',
},
};