Skip to content

Commit 63887e8

Browse files
committed
chore: resolve eslint issues
1 parent a42a1ca commit 63887e8

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"root": true,
3-
"ignorePatterns": ["**/*", "dist/**/*"],
3+
"ignorePatterns": ["**/*"],
44
"plugins": ["@nx"],
55
"overrides": [
66
{

apps/nativescript-demo-ng/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../.eslintrc.json",
3-
"ignorePatterns": ["!**/*", "node_modules/**/*", "platforms/**/*", "src/tests/spans.spec.ts"],
3+
"ignorePatterns": ["!**/*", "node_modules/**/*", "platforms/**/*"],
44
"overrides": [
55
{
66
"files": ["*.ts"],

apps/nativescript-demo-ng/src/tests/spans.spec.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,49 +12,55 @@ const configureComponents = (textBaseElementName: string) => {
1212
@ViewChild('textBase', { static: true }) textBase: ElementRef<TextBase>;
1313
}
1414

15-
@Component({
16-
template: `<${textBaseElementName} #textBase>
15+
let template = '';
16+
17+
template = `<${textBaseElementName} #textBase>
1718
<Span text="0"></Span>
1819
<Span text="1"></Span>
1920
<Span text="2"></Span>
20-
</${textBaseElementName}>`,
21+
</${textBaseElementName}>`;
22+
@Component({
23+
template,
2124
})
2225
class SpansComponent extends BaseComponent {}
2326

24-
@Component({
25-
template: `<${textBaseElementName} #textBase>
27+
template = `<${textBaseElementName} #textBase>
2628
<FormattedString>
2729
<Span text="0"></Span>
2830
<Span text="1"></Span>
2931
<Span text="2"></Span>
3032
</FormattedString>
31-
</${textBaseElementName}>`,
33+
</${textBaseElementName}>`;
34+
@Component({
35+
template,
3236
})
3337
class FormattedStringComponent extends BaseComponent {}
3438

35-
@Component({
36-
template: `<${textBaseElementName} #textBase>
39+
template = `<${textBaseElementName} #textBase>
3740
<Span text="0"></Span>
3841
@if(show) {
3942
<Span text="1"></Span>
4043
}
4144
<Span text="2"></Span>
42-
</${textBaseElementName}>`,
45+
</${textBaseElementName}>`;
46+
@Component({
47+
template,
4348
})
4449
class DynamicSpansComponent extends BaseComponent {
4550
show = true;
4651
}
4752

48-
@Component({
49-
template: `<${textBaseElementName} #textBase>
53+
template = `<${textBaseElementName} #textBase>
5054
<FormattedString>
5155
<Span text="0"></Span>
5256
@if(show) {
5357
<Span text="1"></Span>
5458
}
5559
<Span text="2"></Span>
5660
</FormattedString>
57-
</${textBaseElementName}>`,
61+
</${textBaseElementName}>`;
62+
@Component({
63+
template,
5864
})
5965
class DynamicFormattedStringComponent extends BaseComponent {
6066
show = true;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"postinstall": "husky",
1010
"nx": "nx",
1111
"start": "nx serve",
12-
"build": "nx build zone-js && nx build angular",
12+
"build": "npx nx run-many --target=build --exclude=nativescript-demo-ng",
1313
"test.android": "nx test nativescript-demo-ng android",
1414
"test.ios": "nx test nativescript-demo-ng ios",
1515
"lint": "nx workspace-lint && nx lint",

packages/angular/.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../.eslintrc.json",
3-
"ignorePatterns": ["!**/*", "dist/**/*"],
3+
"ignorePatterns": ["!**/*"],
44
"overrides": [
55
{
66
"files": ["*.ts"],
@@ -25,7 +25,8 @@
2525
"@angular-eslint/directive-class-suffix": "off",
2626
"@typescript-eslint/no-explicit-any": "warn",
2727
"@typescript-eslint/no-unused-vars": "warn",
28-
"@typescript-eslint/no-unsafe-declaration-merging": "off"
28+
"@typescript-eslint/no-unsafe-declaration-merging": "off",
29+
"@angular-eslint/prefer-inject": "warn"
2930
}
3031
},
3132
{

0 commit comments

Comments
 (0)