-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
55 lines (55 loc) · 1.37 KB
/
Copy patheslint.config.mjs
File metadata and controls
55 lines (55 loc) · 1.37 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
// Minimal ESLint config for NodeBB plugin (style guide: https://docs.nodebb.org/development/style-guide/)
// Run: npm run lint
export default [
{ ignores: ['eslint.config.mjs'] },
// Node/CommonJS (library, lib/*.js) — default
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'script',
globals: {
require: 'readonly',
module: 'readonly',
exports: 'writable',
__dirname: 'readonly',
__filename: 'readonly',
process: 'readonly',
Buffer: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
Promise: 'readonly',
Array: 'readonly',
Object: 'readonly',
parseInt: 'readonly',
parseFloat: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
},
},
// ES modules (config, public scripts) — override for these files
{
files: ['**/*.mjs', 'public/lib/**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
$: 'readonly',
alerts: 'readonly',
app: 'readonly',
bootbox: 'readonly',
config: 'readonly',
socket: 'readonly',
t: 'readonly',
translator: 'readonly',
Promise: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
},
},
];