forked from aicore/cocodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
80 lines (80 loc) · 2.56 KB
/
eslint.config.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
// eslint.config.js
export default {
files: ['src/**', 'test/**'],
ignores: [
'**/node_modules/**',
'src/thirdparty/**',
'src/**/*-min.js',
'src/**/*.min.js'
],
languageOptions: {
ecmaVersion: 2022, // Automatically sets up appropriate ECMAScript features
sourceType: 'module',
globals: {
process: true, // Assume process is a global variable (specific to Node.js)
setTimeout: true, // Assume setTimeout is a global variable
console: true
}
},
rules: {
'no-caller': 'error',
'no-control-regex': 'error',
'no-empty': 'warn',
'no-invalid-regexp': 'error',
'no-regex-spaces': 'error',
'no-unsafe-negation': 'warn',
'valid-jsdoc': 'off',
'valid-typeof': 'error',
'curly': 'error',
'eqeqeq': ['error', 'smart'],
'guard-for-in': 'off',
'no-else-return': 'warn',
'no-fallthrough': 'error',
'no-invalid-this': 'warn',
'no-iterator': 'error',
'no-loop-func': 'error',
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-new': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-script-url': 'error',
'wrap-iife': ['error', 'outside'],
'strict': 'error',
'no-shadow-restricted-names': 'error',
'no-shadow': 'warn',
'no-undef': 'error',
'no-unused-vars': ['warn', {'vars': 'all', 'args': 'none'}],
'no-use-before-define': 'off',
'no-new-require': 'error',
'block-spacing': 'warn',
'brace-style': ['warn', '1tbs', { 'allowSingleLine': true }],
'camelcase': 'warn',
'comma-dangle': 'error',
'comma-spacing': 'warn',
'comma-style': ['warn', 'last'],
'computed-property-spacing': 'warn',
'eol-last': 'warn',
'func-call-spacing': 'warn',
'indent': ['warn', 4],
'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true }],
'max-len': ['warn', 120],
'new-cap': ['off', {
'capIsNewExceptions': [
'$.Deferred',
'$.Event',
'CodeMirror.Pos',
'Immutable.Map',
'Immutable.List',
'JSLINT'
]
}],
'new-parens': 'error',
'no-bitwise': 'error',
'no-new-object': 'error',
'no-trailing-spaces': 'warn',
'semi-spacing': 'warn',
'semi': 'error'
}
};