forked from MichaelHilton/NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
65 lines (61 loc) · 1.19 KB
/
eslint.config.mjs
File metadata and controls
65 lines (61 loc) · 1.19 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
'use strict';
import serverConfig from 'eslint-config-nodebb';
import publicConfig from 'eslint-config-nodebb/public';
import commonRules from 'eslint-config-nodebb/common';
import { defineConfig } from 'eslint/config';
import stylisticJs from '@stylistic/eslint-plugin-js'
import js from '@eslint/js';
import globals from 'globals';
export default defineConfig([
{
ignores: [
'node_modules/',
'.project',
'.vagrant',
'.DS_Store',
'.tx',
'logs/',
'public/uploads/',
'public/vendor/',
'.idea/',
'.vscode/',
'*.ipr',
'*.iws',
'coverage/',
'build/',
'test/files/',
'*.min.js',
'install/docker/',
],
},
// tests
{
plugins: {
js,
'@stylistic/js': stylisticJs,
},
extends: ['js/recommended'],
files: ['test/**/*.js'],
languageOptions: {
ecmaVersion: 2020,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.browser,
it: 'readonly',
describe: 'readonly',
before: 'readonly',
beforeEach: 'readonly',
after: 'readonly',
afterEach: 'readonly',
},
},
rules: {
...commonRules,
'no-unused-vars': 'off',
'no-prototype-builtins': 'off',
}
},
...publicConfig,
...serverConfig
]);