-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patheslint.config.js
56 lines (55 loc) · 1.28 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
const config = require('@rubensworks/eslint-config');
module.exports = config([
{
files: [ '**/*.ts' ],
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname,
project: [ './tsconfig.eslint.json' ],
},
},
},
{
files: [ '**/*.ts' ],
rules: {
'import/no-nodejs-modules': 'off',
'ts/naming-convention': [
'error',
{
selector: 'interface',
format: [ 'PascalCase' ],
custom: {
regex: '^[A-Z]',
match: true,
},
},
],
// TODO: check if we can enable the following
'ts/no-require-imports': 'off',
'ts/no-unsafe-assignment': 'off',
'ts/no-unsafe-argument': 'off',
'ts/no-unsafe-return': 'off',
},
},
{
// Specific rules for NodeJS-specific files
files: [
'**/test/**/*.ts',
],
rules: {
'import/no-nodejs-modules': 'off',
'unused-imports/no-unused-vars': 'off',
'ts/no-require-imports': 'off',
'ts/no-var-requires': 'off',
'ts/no-extraneous-class': 'off',
// TODO: check if we can enable the following
'node/no-path-concat': 'off',
},
},
{
// Files that do not require linting
ignores: [
'**/file-invalid.d.ts',
],
},
]);