-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
106 lines (105 loc) · 2.91 KB
/
eslint.config.mjs
File metadata and controls
106 lines (105 loc) · 2.91 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
import nx from '@nx/eslint-plugin';
export default [
...nx.configs['flat/base'],
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
ignores: ['**/dist', 'node_modules', 'apis'],
},
{
files: ['**/*.js', '**/*.jsx'],
// Rules for JS files
rules: {},
},
{
files: ['**/*.html'],
// Rules for HTML files
rules: {
'@angular-eslint/template/click-events-have-key-events': 'off',
'@angular-eslint/template/interactive-supports-focus': 'off',
'@angular-eslint/template/elements-content': 'off',
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
languageOptions: {
parserOptions: {
ecmaVersion: 2020,
project: 'tsconfig.base.json',
sourceType: 'module',
},
},
rules: {
// '@nx/enforce-module-boundaries': [
// 'error',
// {
// enforceBuildableLibDependency: true,
// allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'],
// depConstraints: [
// {
// sourceTag: '*',
// onlyDependOnLibsWithTags: ['*'],
// },
// ],
// },
// ],
'@angular-eslint/use-component-view-encapsulation': 'error',
'@angular-eslint/directive-class-suffix': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
{
selector: 'memberLike',
modifiers: ['public'],
format: ['camelCase'],
leadingUnderscore: 'forbid',
},
{
selector: 'property',
format: null,
},
],
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'always-multiline'],
'max-classes-per-file': ['error', 2],
'no-empty': 'error',
'no-multiple-empty-lines': 'error',
'no-underscore-dangle': 'off',
'max-len': 'off',
'no-multi-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'arrow-body-style': 'off',
'object-shorthand': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'prefer-const': 'error',
'no-unused-vars': 'error',
'newline-before-return': 'off',
},
},
{
files: [
'**/*.ts',
'**/*.tsx',
'**/*.cts',
'**/*.mts',
'**/*.js',
'**/*.jsx',
'**/*.cjs',
'**/*.mjs',
],
// Override or add rules here
rules: {},
},
];