-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
50 lines (49 loc) · 1.21 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
const js = require('@eslint/js');
const ts = require('typescript-eslint');
const ng = require('angular-eslint');
module.exports = ts.config(
{
files: ['**/*.ts'],
extends: [
// Apply the recommended core rules
js.configs.recommended,
// Apply the recommended TypeScript rules
...ts.configs.recommended,
// Optionally apply stylistic rules from typescript-eslint that improve code consistency
...ts.configs.stylistic,
// Apply the recommended Angular rules
...ng.configs.tsRecommended,
],
processor: ng.processInlineTemplates,
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'cmaj',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'cmaj',
style: 'kebab-case',
},
],
'no-restricted-imports': [
'error',
{
patterns: ['.*'],
},
],
'@typescript-eslint/no-explicit-any': ['off'],
},
},
{
files: ['**/*.html'],
extends: [...ng.configs.templateRecommended],
rules: {},
},
);