This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
forked from rolling-scopes-school/websockets-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
77 lines (63 loc) · 1.44 KB
/
eslint.config.mjs
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
66
67
68
69
70
71
72
73
74
75
76
77
import pluginJs from '@eslint/js'
import pluginTs from 'typescript-eslint'
import pluginJsDoc from 'eslint-plugin-jsdoc'
import pluginPromise from 'eslint-plugin-promise'
import pluginImport from 'eslint-plugin-import'
import pluginPrettier from 'eslint-config-prettier'
export default [
pluginJs.configs.recommended,
...pluginTs.configs.recommended,
pluginJsDoc.configs['flat/recommended-typescript'],
pluginImport.flatConfigs.recommended,
pluginImport.flatConfigs.typescript,
pluginPromise.configs['flat/recommended'],
{
files: ['**/*.{js,mjs,cjs,ts}'],
settings: {
'import/resolver': {
typescript: true,
node: true
}
}
},
{
files: ['**/*.{js,mjs,cjs}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'no-unused-vars': 'off',
'import/no-dynamic-require': 'warn',
'import/no-nodejs-modules': 'warn'
}
},
{
files: ['**/*.js'],
languageOptions: {
sourceType: 'commonjs'
}
},
{
files: ['**/*.ts'],
plugins: {
jsdoc: pluginJsDoc
},
rules: {
'no-else-return': [
'error',
{
allowElseIf: false
}
],
'jsdoc/require-param-description': 0,
'jsdoc/require-property-description': 0,
'jsdoc/require-returns-description': 0,
'jsdoc/require-throws': 1
}
},
{
ignores: ['node_modules/*']
},
pluginPrettier
]