-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
33 lines (32 loc) · 1.25 KB
/
Copy patheslint.config.js
File metadata and controls
33 lines (32 loc) · 1.25 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
// @ts-check
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import angular from 'angular-eslint'
export default tseslint.config(
{
ignores: ['dist/', '.angular/'],
},
{
files: ['**/*.ts'],
extends: [eslint.configs.recommended, ...tseslint.configs.strictTypeChecked, ...angular.configs.tsRecommended],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
processor: angular.processInlineTemplates,
rules: {
'@angular-eslint/directive-selector': ['error', { type: 'attribute', prefix: 'lib', style: 'camelCase' }],
'@angular-eslint/component-selector': ['error', { type: 'element', prefix: ['lib', 'ziflux'], style: 'kebab-case' }],
// void is used as generic default for no-arg mutations (CachedMutationOptions<A = void>)
'@typescript-eslint/no-invalid-void-type': ['error', { allowInGenericTypeArguments: true }],
// Template literals with numbers are idiomatic TypeScript
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
},
},
{
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
},
)