-
Notifications
You must be signed in to change notification settings - Fork 148
Expand file tree
/
Copy patheslint.config.cjs
More file actions
42 lines (41 loc) · 1.17 KB
/
eslint.config.cjs
File metadata and controls
42 lines (41 loc) · 1.17 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
const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
const globals = require('globals');
module.exports = tseslint.config(
{
files: ['**/*.ts'],
extends: [tseslint.configs.recommended, js.configs.recommended],
languageOptions: {
globals: {
...globals.node,
},
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
},
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-floating-promises': 'off',
},
},
{
files: ['**/*.js'],
ignores: ['bundle.js'],
extends: [js.configs.recommended],
languageOptions: {
globals: {
...globals.node,
},
sourceType: 'commonjs',
},
rules: {
'no-unused-vars': 'off',
},
}
);