|
1 | 1 | {
|
2 | 2 | "root": true,
|
3 |
| - "ignorePatterns": ["dist", "coverage"], |
| 3 | + "ignorePatterns": ["**/*"], |
| 4 | + "plugins": ["@nrwl/nx", "etc", "rxjs", "rxjs-angular", "sonarjs"], |
| 5 | + "parser": "@typescript-eslint/parser", |
4 | 6 | "parserOptions": {
|
5 |
| - "ecmaVersion": 2020 |
| 7 | + "project": ["{e2e,packages}/**/tsconfig.*?.json", "e2e/**/*-e2e/tsconfig.json"] |
6 | 8 | },
|
7 | 9 | "overrides": [
|
8 | 10 | {
|
9 |
| - "files": ["*.ts"], |
10 |
| - "parserOptions": { |
11 |
| - "project": ["tsconfig.json"], |
12 |
| - "createDefaultProgram": true |
13 |
| - }, |
14 |
| - "extends": [ |
15 |
| - "plugin:@angular-eslint/recommended", |
16 |
| - "eslint:recommended", |
17 |
| - "plugin:@typescript-eslint/recommended", |
18 |
| - "plugin:ordered-imports/recommended", |
19 |
| - "plugin:import/errors", |
20 |
| - "plugin:import/warnings" |
21 |
| - ], |
22 |
| - "plugins": ["no-null", "ordered-imports"], |
| 11 | + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], |
| 12 | + "excludedFiles": ["*.spec.ts"], |
23 | 13 | "rules": {
|
24 |
| - "@angular-eslint/component-selector": [ |
25 |
| - "error", |
26 |
| - { |
27 |
| - "type": "element", |
28 |
| - "prefix": "ngworker", |
29 |
| - "style": "kebab-case" |
30 |
| - } |
31 |
| - ], |
32 |
| - "@angular-eslint/directive-selector": [ |
33 |
| - "error", |
34 |
| - { |
35 |
| - "type": "attribute", |
36 |
| - "prefix": "ngworker", |
37 |
| - "style": "camelCase" |
38 |
| - } |
39 |
| - ], |
40 |
| - "@angular-eslint/no-forward-ref": "error", |
41 |
| - "@typescript-eslint/array-type": [ |
42 |
| - "error", |
43 |
| - { |
44 |
| - "default": "array" |
45 |
| - } |
46 |
| - ], |
47 |
| - "@typescript-eslint/consistent-type-definitions": "error", |
48 |
| - "@typescript-eslint/dot-notation": "off", |
49 |
| - "@typescript-eslint/explicit-member-accessibility": [ |
| 14 | + "@nrwl/nx/enforce-module-boundaries": [ |
50 | 15 | "error",
|
51 | 16 | {
|
52 |
| - "accessibility": "no-public" |
53 |
| - } |
54 |
| - ], |
55 |
| - "@typescript-eslint/member-delimiter-style": [ |
56 |
| - "off", |
57 |
| - { |
58 |
| - "multiline": { |
59 |
| - "delimiter": "none", |
60 |
| - "requireLast": true |
61 |
| - }, |
62 |
| - "singleline": { |
63 |
| - "delimiter": "semi", |
64 |
| - "requireLast": false |
65 |
| - } |
66 |
| - } |
67 |
| - ], |
68 |
| - "@typescript-eslint/no-explicit-any": "error", |
69 |
| - "@typescript-eslint/no-floating-promises": "error", |
70 |
| - "@typescript-eslint/no-require-imports": "error", |
71 |
| - "@typescript-eslint/prefer-readonly": "error", |
72 |
| - "@typescript-eslint/quotes": [ |
73 |
| - "off", |
74 |
| - "single", |
75 |
| - { |
76 |
| - "allowTemplateLiterals": true |
77 |
| - } |
78 |
| - ], |
79 |
| - "@typescript-eslint/semi": ["off", null], |
80 |
| - "@typescript-eslint/type-annotation-spacing": "off", |
81 |
| - "arrow-parens": ["off", "always"], |
82 |
| - "brace-style": ["off", "off"], |
83 |
| - "eol-last": "off", |
84 |
| - "import/no-internal-modules": [ |
85 |
| - "error", |
86 |
| - { |
87 |
| - "allow": [ |
88 |
| - "rxjs/operators", |
89 |
| - "rxjs/operators/*", |
90 |
| - "@angular/common/*", |
91 |
| - "@angular/common/http/*", |
92 |
| - "@angular/core", |
93 |
| - "@angular/core/*", |
94 |
| - "@angular/platform-browser/*", |
95 |
| - "@angular/platform-browser-dynamic/*", |
96 |
| - "@angular/core/testing/*", |
97 |
| - "@angular/fire/database/*", |
98 |
| - "@angular/material/*", |
99 |
| - "@angular-devkit/schematics/*", |
100 |
| - "@internal/*", |
101 |
| - "@ngworker/*", |
102 |
| - "@schematics/angular/*", |
103 |
| - "@schematics/angular/application/*", |
104 |
| - "@schematics/angular/workspace/*", |
105 |
| - "zone.js/*", |
106 |
| - "zone.js/dist/*" |
107 |
| - ] |
108 |
| - } |
109 |
| - ], |
110 |
| - "import/order": "warn", |
111 |
| - "import/named": "warn", |
112 |
| - "import/no-unresolved": ["off", { "commonjs": true, "amd": true }], |
113 |
| - "linebreak-style": "off", |
114 |
| - "max-classes-per-file": ["error", 5], |
115 |
| - "max-len": "off", |
116 |
| - "new-parens": "off", |
117 |
| - "newline-per-chained-call": "off", |
118 |
| - "no-extra-semi": "off", |
119 |
| - "no-irregular-whitespace": "off", |
120 |
| - "no-null/no-null": "error", |
121 |
| - "no-redeclare": "error", |
122 |
| - "no-trailing-spaces": "off", |
123 |
| - "ordered-imports/ordered-imports": [ |
124 |
| - "warn", |
125 |
| - { |
126 |
| - "symbols-first": true, |
127 |
| - "declaration-ordering": [ |
128 |
| - "type", |
| 17 | + "enforceBuildableLibDependency": true, |
| 18 | + "allow": [], |
| 19 | + "depConstraints": [ |
129 | 20 | {
|
130 |
| - "ordering": ["side-effect", "default", "namespace", "destructured"], |
131 |
| - "secondaryOrdering": ["name", "case-insensitive"] |
132 |
| - } |
133 |
| - ], |
134 |
| - "specifier-ordering": "case-insensitive", |
135 |
| - "group-ordering": [ |
| 21 | + "sourceTag": "scope:public", |
| 22 | + "onlyDependOnLibsWithTags": ["scope:public"] |
| 23 | + }, |
136 | 24 | {
|
137 |
| - "name": "project root", |
138 |
| - "match": "^@(?!(ngworker|internal)).*|^[a-zA-Z].*", |
139 |
| - "order": 20 |
| 25 | + "sourceTag": "scope:internal", |
| 26 | + "onlyDependOnLibsWithTags": ["scope:public", "scope:internal"] |
140 | 27 | },
|
141 | 28 | {
|
142 |
| - "name": "internal routes", |
143 |
| - "match": "^@(ngworker|internal).*", |
144 |
| - "order": 30 |
| 29 | + "sourceTag": "type:app", |
| 30 | + "onlyDependOnLibsWithTags": ["type:package"] |
145 | 31 | },
|
146 |
| - { "name": "parent directories", "match": "^\\.\\.", "order": 40 }, |
147 |
| - { "name": "current directory", "match": "^\\.", "order": 50 }, |
148 |
| - { "name": "third-party", "match": ".*", "order": 10 } |
| 32 | + { |
| 33 | + "sourceTag": "type:package", |
| 34 | + "onlyDependOnLibsWithTags": ["type:package", "type:test-util"] |
| 35 | + }, |
| 36 | + { |
| 37 | + "sourceTag": "type:e2e", |
| 38 | + "onlyDependOnLibsWithTags": ["type:app"] |
| 39 | + } |
149 | 40 | ]
|
150 | 41 | }
|
151 |
| - ], |
152 |
| - "quote-props": "off", |
153 |
| - "space-before-function-paren": "off", |
154 |
| - "space-in-parens": ["off", "never"], |
155 |
| - "prefer-arrow/prefer-arrow-functions": "off", |
156 |
| - "eqeqeq": "off" |
| 42 | + ] |
| 43 | + } |
| 44 | + }, |
| 45 | + { |
| 46 | + "files": ["*.ts", "*.tsx"], |
| 47 | + "extends": ["plugin:@nrwl/nx/typescript"], |
| 48 | + "rules": {} |
| 49 | + }, |
| 50 | + { |
| 51 | + "files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], |
| 52 | + "rules": { |
| 53 | + "@nrwl/nx/enforce-module-boundaries": "off" |
| 54 | + } |
| 55 | + }, |
| 56 | + { |
| 57 | + "files": ["*.js", "*.jsx"], |
| 58 | + "extends": ["plugin:@nrwl/nx/javascript"], |
| 59 | + "rules": {} |
| 60 | + }, |
| 61 | + { |
| 62 | + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], |
| 63 | + "extends": ["plugin:etc/recommended", "plugin:rxjs/recommended", "plugin:sonarjs/recommended"], |
| 64 | + "rules": { |
| 65 | + "etc/no-commented-out-code": "error", |
| 66 | + "etc/no-const-enum": "error", |
| 67 | + "sonarjs/cognitive-complexity": ["error", 8] |
157 | 68 | }
|
158 | 69 | },
|
159 | 70 | {
|
160 |
| - "files": ["*.html"], |
161 |
| - "extends": ["plugin:@angular-eslint/template/recommended"], |
| 71 | + "files": ["*.ts"], |
162 | 72 | "rules": {
|
163 |
| - "@angular-eslint/template/eqeqeq": "off", |
164 |
| - "@angular-eslint/template/no-negated-async": "off" |
| 73 | + "rxjs-angular/prefer-composition": [ |
| 74 | + "error", |
| 75 | + { "checkDecorators": ["Component", "Directive", "Injectable", "NgModule", "Pipe"] } |
| 76 | + ] |
165 | 77 | }
|
166 | 78 | }
|
167 | 79 | ]
|
|
0 commit comments