Skip to content

Commit e523053

Browse files
committed
feat(): migrate to flat eslint config
1 parent 765a1c0 commit e523053

File tree

188 files changed

+3205
-3134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+3205
-3134
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

apps/angular/1-projection/.eslintrc.json

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import nx from '@nx/eslint-plugin';
2+
import baseConfig from '../../../eslint.config.mjs';
3+
4+
export default [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
...nx.configs['flat/angular-template'],
8+
{
9+
files: ['**/*.ts'],
10+
rules: {
11+
'@angular-eslint/directive-selector': [
12+
'error',
13+
{
14+
type: 'attribute',
15+
prefix: 'app',
16+
style: 'camelCase',
17+
},
18+
],
19+
'@angular-eslint/component-selector': [
20+
'error',
21+
{
22+
type: 'element',
23+
prefix: 'app',
24+
style: 'kebab-case',
25+
},
26+
],
27+
},
28+
},
29+
{
30+
files: ['**/*.html'],
31+
// Override or add rules here
32+
rules: {},
33+
},
34+
];

apps/angular/1-projection/src/app/ui/card/card.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import { ListItemComponent } from '../list-item/list-item.component';
1313
class="flex w-fit flex-col gap-3 rounded-md border-2 border-black p-4"
1414
[class]="customClass()">
1515
@if (type() === CardType.TEACHER) {
16-
<img ngSrc="assets/img/teacher.png" width="200" height="200" />
16+
<img ngSrc="assets/img/teacher.png" width="200" height="200" alt="" />
1717
}
1818
@if (type() === CardType.STUDENT) {
19-
<img ngSrc="assets/img/student.webp" width="200" height="200" />
19+
<img ngSrc="assets/img/student.webp" width="200" height="200" alt="" />
2020
}
2121
2222
<section>

apps/angular/1-projection/src/app/ui/list-item/list-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { CardType } from '../../model/card.model';
1414
<div class="border-grey-300 flex justify-between border px-2 py-1">
1515
{{ name() }}
1616
<button (click)="delete(id())">
17-
<img class="h-5" src="assets/svg/trash.svg" />
17+
<img class="h-5" src="assets/svg/trash.svg" alt="trash" />
1818
</button>
1919
</div>
2020
`,

apps/angular/10-utility-wrapper-pipe/.eslintrc.json

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import nx from '@nx/eslint-plugin';
2+
import baseConfig from '../../../eslint.config.mjs';
3+
4+
export default [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
...nx.configs['flat/angular-template'],
8+
{
9+
files: ['**/*.ts'],
10+
rules: {
11+
'@angular-eslint/directive-selector': [
12+
'error',
13+
{
14+
type: 'attribute',
15+
prefix: 'app',
16+
style: 'camelCase',
17+
},
18+
],
19+
'@angular-eslint/component-selector': [
20+
'error',
21+
{
22+
type: 'element',
23+
prefix: 'app',
24+
style: 'kebab-case',
25+
},
26+
],
27+
},
28+
},
29+
{
30+
files: ['**/*.html'],
31+
// Override or add rules here
32+
rules: {},
33+
},
34+
];

apps/angular/13-highly-customizable-css/.eslintrc.json

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import nx from '@nx/eslint-plugin';
2+
import baseConfig from '../../../eslint.config.mjs';
3+
4+
export default [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
...nx.configs['flat/angular-template'],
8+
{
9+
files: ['**/*.ts'],
10+
rules: {
11+
'@angular-eslint/directive-selector': [
12+
'error',
13+
{
14+
type: 'attribute',
15+
prefix: 'app',
16+
style: 'camelCase',
17+
},
18+
],
19+
'@angular-eslint/component-selector': [
20+
'error',
21+
{
22+
type: 'element',
23+
prefix: 'app',
24+
style: 'kebab-case',
25+
},
26+
],
27+
},
28+
},
29+
{
30+
files: ['**/*.html'],
31+
// Override or add rules here
32+
rules: {},
33+
},
34+
];

0 commit comments

Comments
 (0)