-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
59 lines (53 loc) · 1.18 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
/*
* Copyright (c) Maximilian Antoni <[email protected]>
*
* @license MIT
*/
import js from '@eslint/js';
import globals from 'globals';
import plugin_n from 'eslint-plugin-n';
import plugin_jsdoc from 'eslint-plugin-jsdoc';
import plugin_mocha from 'eslint-plugin-mocha';
import rules from './lib/rules.js';
export default [
js.configs.recommended,
plugin_n.configs['flat/recommended'],
plugin_jsdoc.configs['flat/recommended'],
{
settings: {
jsdoc: {
mode: 'typescript',
preferredTypes: {
object: 'Object'
}
}
},
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.es5,
...globals.node
}
},
rules
},
{
files: ['**/*.test.js', '**/*-test.js', '**/*.integration.js'],
plugins: {
mocha: plugin_mocha
},
languageOptions: {
globals: {
...globals.mocha
}
},
rules: {
// https://github.com/lo1tuma/eslint-plugin-mocha
'mocha/no-async-describe': 2,
'mocha/no-exclusive-tests': 2,
'mocha/no-identical-title': 2,
'mocha/no-return-and-callback': 2,
'mocha/prefer-arrow-callback': 2
}
}
];