This repository has been archived by the owner on May 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
62 lines (62 loc) · 2.25 KB
/
.eslintrc.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
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [
// TODO: warning No cached ProjectGraph is available. The rule will be skipped. @nrwl/nx/enforce-module-boundaries
// If you encounter this error as part of running standard `nx` commands then please open an issue on
// https://github.com/nrwl/nx
// './scripts/eslint/nx.js',
'@tinkoff/eslint-config-angular',
'@tinkoff/eslint-config-angular/html',
'@tinkoff/eslint-config-angular/imports',
'@tinkoff/eslint-config-angular/line-statements',
'@tinkoff/eslint-config-angular/member-ordering',
],
ignorePatterns: [
'projects/**/test.ts',
'projects/**/icons/all.ts',
'*.js',
'*.json',
'*.less',
'*.md',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: [require.resolve('./tsconfig.eslint.json')],
},
parser: '@typescript-eslint/parser',
rules: {
'dot-notation': 'off',
'@typescript-eslint/dot-notation': [
'error',
{
allowPrivateClassPropertyAccess: true,
allowProtectedClassPropertyAccess: true,
allowIndexSignaturePropertyAccess: true,
},
],
'@typescript-eslint/no-useless-constructor': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/prefer-includes': 'error',
'prefer-template': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
allowDirectConstAssertionInArrowFunctions: true,
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
},
],
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
},
};