-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (54 loc) · 1.25 KB
/
eslint.config.js
File metadata and controls
55 lines (54 loc) · 1.25 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
import js from '@eslint/js';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginN from 'eslint-plugin-n';
import eslintPluginPromise from 'eslint-plugin-promise';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import globals from 'globals';
export default [
{
ignores: ['dist/**', 'node_modules/**']
},
{
...js.configs.recommended,
files: ['**/*.js'],
languageOptions: {
sourceType: 'module',
globals: {
...globals.browser,
...globals.node
}
},
plugins: {
import: eslintPluginImport,
n: eslintPluginN,
promise: eslintPluginPromise,
prettier: eslintPluginPrettier
},
rules: {
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['test/**', '**/*.config.js', '**/*.config.ts']
}
],
'n/no-unsupported-features/node-builtins': 'off',
'promise/always-return': 'off',
'prettier/prettier': 'error'
}
},
{
files: ['lib/**/*.js', 'test/**/*.js'],
rules: {
'prettier/prettier': 'off'
}
},
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.mocha
}
}
}
];