-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
90 lines (89 loc) · 2.28 KB
/
Copy patheslint.config.js
File metadata and controls
90 lines (89 loc) · 2.28 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
84
85
86
87
88
89
90
const config = require('@rubensworks/eslint-config');
module.exports = config([
{
files: [ '**/*.ts' ],
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname,
project: [ './tsconfig.eslint.json' ],
},
},
},
{
files: [ '**/*.ts' ],
rules: {
// Requires strictNullChecks which is not enabled in this project
'ts/prefer-nullish-coalescing': 'off',
// Util is a valid utility class with only static members
'ts/no-extraneous-class': 'off',
// Node.js built-in imports are acceptable
'import/no-nodejs-modules': 'off',
// Default object parameter is used intentionally
'unicorn/no-object-as-default-parameter': 'off',
// _transform and _flush are required by the Node.js Transform stream API
'ts/naming-convention': [
'error',
{
selector: 'default',
format: [ 'camelCase' ],
leadingUnderscore: 'allow',
trailingUnderscore: 'forbid',
},
{
selector: 'import',
format: null,
},
{
selector: 'variable',
format: [ 'camelCase', 'UPPER_CASE' ],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
},
{
selector: 'classProperty',
format: [ 'camelCase', 'UPPER_CASE' ],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
},
{
selector: 'typeLike',
format: [ 'PascalCase' ],
},
{
selector: [ 'typeParameter' ],
format: [ 'PascalCase' ],
prefix: [ 'T' ],
},
{
selector: 'interface',
format: [ 'PascalCase' ],
custom: {
regex: '^I[A-Z]',
match: true,
},
},
{
// Allow JSON-LD keyword properties (@id, @type, etc.) and URI properties (http://...)
selector: 'objectLiteralProperty',
format: null,
filter: {
regex: '[/:@]',
match: true,
},
},
],
},
},
{
ignores: [
'node_modules',
'coverage',
'**/*.js',
'**/*.d.ts',
'**/*.js.map',
'**/*.yml',
'**/*.yaml',
'**/*.md',
],
},
]);