-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
70 lines (70 loc) · 2.07 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// @ts-check
const prettierPlugin = require('eslint-plugin-prettier');
const typescriptParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const angularPlugin = require('@angular-eslint/eslint-plugin');
const angularTemplateParser = require('@angular-eslint/template-parser');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
module.exports = [
{
ignores: ['.cache/', '.git/', '.github/', 'node_modules/'],
},
{
files: ['**/*.ts'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: ['./tsconfig.json', './tsconfig.app.json', './tsconfig.spec.json'],
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'@angular-eslint': angularPlugin,
prettier: prettierPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
...angularPlugin.configs.recommended.rules,
...prettierPlugin.configs?.rules,
'@angular-eslint/directive-selector': [
'warn',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'warn',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
'import/order': 'off',
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/member-ordering': 0,
'@typescript-eslint/naming-convention': 0,
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-output-on-prefix': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
},
},
{
files: ['**/*.html'],
languageOptions: {
parser: angularTemplateParser,
},
plugins: {
'@angular-eslint': angularPlugin,
'@angular-eslint/template': angularPlugin,
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': ['error', { parser: 'angular' }],
},
},
eslintPluginPrettierRecommended,
];