-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
65 lines (64 loc) · 2.12 KB
/
eslint.config.js
File metadata and controls
65 lines (64 loc) · 2.12 KB
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
const js = require('@eslint/js');
module.exports = [
js.configs.recommended,
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'commonjs',
globals: {
console: 'readonly',
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'readonly',
global: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly'
}
},
rules: {
'no-unused-vars': ['error', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_'
}],
'no-console': 'off', // Allow console for Discord bot logging
'semi': ['error', 'always'],
'quotes': ['error', 'single'],
'indent': ['error', 4],
'comma-dangle': ['error', 'never'],
'no-trailing-spaces': 'error',
'eol-last': 'error',
'no-multiple-empty-lines': ['error', { max: 2 }],
'brace-style': ['error', '1tbs'],
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'no-var': 'error',
'prefer-const': 'error'
}
},
{
files: ['**/*.test.js', '**/*.spec.js', 'tests/**/*.js'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
jest: 'readonly'
}
}
}
];