-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy patheslint.config.mjs
More file actions
83 lines (82 loc) · 1.88 KB
/
eslint.config.mjs
File metadata and controls
83 lines (82 loc) · 1.88 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import globals from 'globals';
import eslint from '@eslint/js';
import jsdoc from 'eslint-plugin-jsdoc';
import prettier from 'eslint-plugin-prettier/recommended';
export default [
{
ignores: ['**/artifacts/', '**/node_modules/', '**/out/', '**/dist/']
},
eslint.configs.recommended,
prettier,
jsdoc.configs['flat/recommended'],
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.es6,
...globals.node
}
},
plugins: {
jsdoc
},
rules: {
'comma-dangle': 'off',
'eqeqeq': 'error',
'indent': 'off',
'jsdoc/no-undefined-types': [
'warn',
{
definedTypes: ['NodeJS']
}
],
'jsdoc/require-description': 'warn',
'jsdoc/require-description-complete-sentence': 'warn',
'jsdoc/require-jsdoc': [
'warn',
{
contexts: [
'TSInterfaceDeclaration',
'TSMethodSignature',
'TSPropertySignature'
],
enableFixer: true,
publicOnly: {
ancestorsOnly: true,
cjs: true,
esm: true
},
require: {
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
MethodDefinition: true
}
}
],
'max-len': 'off',
'no-empty-function': 'off',
'no-invalid-this': 'off',
'no-unused-vars': 'off',
'object-curly-spacing': ['error', 'always'],
'prettier/prettier': [
'error',
{
printWidth: 80,
quoteProps: 'consistent',
semi: true,
singleQuote: true,
trailingComma: 'none'
}
],
'semi': 'error',
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'never'
}
]
}
}
];