-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patheslint.config.mjs
73 lines (63 loc) · 1.73 KB
/
eslint.config.mjs
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
import angular from '@angular-eslint/eslint-plugin';
import ngParser from '@angular-eslint/template-parser';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import unusedImports from 'eslint-plugin-unused-imports';
export default [
{
files: ['./**/*.ts'],
ignores: ['./**/*.spec.ts'],
plugins: {
'@typescript-eslint': typescriptEslint,
'simple-import-sort': simpleImportSort,
'@angular-eslint': angular,
'unused-imports': unusedImports,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tsParser,
parserOptions: {
project: ['./tsconfig.json'],
createDefaultProgram: true,
},
},
rules: {
'unused-imports/no-unused-imports': 'error',
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
style: 'kebab-case',
},
],
'@angular-eslint/component-class-suffix': [
'error',
{
suffixes: ['Component', 'Page', 'Modal', 'Form'],
},
],
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-console': 'off',
'simple-import-sort/imports': [
'error',
{
groups: [
['^@|angular', '^@?\\w'],
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
'@typescript-eslint/no-invalid-void-type': ['off'],
},
},
{
files: ['**/*.html'],
languageOptions: {
parser: ngParser,
},
},
];