-
-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy patheslint.config.js
More file actions
121 lines (117 loc) · 3.83 KB
/
eslint.config.js
File metadata and controls
121 lines (117 loc) · 3.83 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint'); // meta pkg
module.exports = tseslint.config(
{
files: ['**/*.ts'],
ignores: ['dist/**', 'coverage/**', 'node_modules/**', 'src/**'],
extends: [
js.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
'@angular-eslint/no-input-rename': 'off',
'@angular-eslint/directive-class-suffix': 'off',
'@angular-eslint/component-class-suffix': 'off',
'@angular-eslint/no-forward-ref': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'memberLike',
'format': ['camelCase'],
'leadingUnderscore': 'allow',
},
{
'selector': 'memberLike',
'modifiers': ['private'],
'format': ['camelCase'],
'leadingUnderscore': 'require',
},
{
'selector': 'enumMember',
'format': ['UPPER_CASE'],
},
{
'selector': 'property',
'format': null,
'modifiers': ['requiresQuotes'],
},
],
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': [
'error',
{
ignoreParameters: true,
ignoreProperties: true,
},
],
'@typescript-eslint/prefer-for-of': 'off',
'padding-line-between-statements': [
'error',
{ 'blankLine': 'always', 'prev': '*', 'next': 'return' },
],
'comma-dangle': ['error', 'always-multiline'],
'id-blacklist': 'off',
'id-match': 'off',
'max-classes-per-file': ['error', 2],
'no-empty': 'off',
'no-multiple-empty-lines': 'error',
'no-underscore-dangle': 'off',
'max-len': 'off',
'no-multi-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'quote-props': 'off',
'arrow-body-style': 'off',
'no-shadow': 'off',
'object-shorthand': 'error',
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'no-restricted-imports': ['error', 'rxjs/Rx'],
'no-prototype-builtins': 'off',
},
},
{
files: ['**/*.html'],
ignores: ['dist/**', 'coverage/**', 'node_modules/**'],
extends: [angular.configs.templateRecommended, angular.configs.templateAccessibility],
rules: {},
},
{
files: [
'libs/f-flow/src/f-connection/**/*.ts',
'libs/f-flow/src/f-connection-v2/**/*.ts',
'libs/f-flow/src/f-connectors/**/*.ts',
'libs/f-flow/src/f-draggable/f-drag-blocker.directive.ts',
'libs/f-flow/src/f-draggable/f-draggable.directive.ts',
'libs/f-flow/src/f-line-alignment/**/*.ts',
'libs/f-flow/src/f-node/**/*.ts',
],
rules: {
'@angular-eslint/prefer-standalone': 'off',
},
},
);