This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
forked from tabarra/txAdmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
90 lines (86 loc) · 2.66 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
module.exports = {
env: {
node: true,
commonjs: true,
es2017: true,
},
globals: {
globals: 'writable',
GlobalData: 'writable',
ExecuteCommand: 'readonly',
GetConvar: 'readonly',
GetCurrentResourceName: 'readonly',
GetPasswordHash: 'readonly',
GetResourceMetadata: 'readonly',
GetResourcePath: 'readonly',
IsDuplicityVersion: 'readonly',
VerifyPasswordHash: 'readonly',
},
extends: [
// 'airbnb',
],
parserOptions: {
ecmaVersion: 10,
},
ignorePatterns: [
'webpack.config.js',
'*.ignore.*',
],
rules: {
//Review these
'no-control-regex': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-prototype-builtins': 'off',
'no-unused-vars': ['warn', {
varsIgnorePattern: '^(_|(dir|log)\\w*)',
vars: 'all',
args: 'none', //diff
ignoreRestSiblings: true,
}],
//From Airbnb, fixed them already
'keyword-spacing': ['error', {
before: true,
after: true,
overrides: {
return: { after: true },
throw: { after: true },
case: { after: true },
},
}],
'space-before-blocks': 'error',
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'no-trailing-spaces': ['error', {
skipBlankLines: false,
ignoreComments: false,
}],
'space-infix-ops': 'error',
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
'padded-blocks': ['error', {
blocks: 'never',
classes: 'never',
switches: 'never',
}, {
allowSingleLineBlocks: true,
}],
'comma-spacing': ['error', { before: false, after: true }],
'arrow-spacing': ['error', { before: true, after: true }],
'arrow-parens': ['error', 'always'],
'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
// Custom
indent: ['error', 4],
// FIXME: re-enable it somewhen
'linebreak-style': 'off',
'spaced-comment': 'off',
'object-curly-spacing': 'off', //maybe keep this disabled?
'arrow-body-style': 'off', //maybe keep this disabled?
// Check it:
// 'object-curly-newline': ['error', 'never'],
},
};