Skip to content

Commit 8a9bb9d

Browse files
committed
lint(ng-pixijs,example-ng-pixijs): fix lint
1 parent ec530ae commit 8a9bb9d

File tree

19 files changed

+61
-50
lines changed

19 files changed

+61
-50
lines changed

apps/example-ng-pixijs/eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ module.exports = [
1212
'error',
1313
{
1414
type: 'attribute',
15-
prefix: 'app',
15+
// prefix: 'app',
1616
style: 'camelCase',
1717
},
1818
],
1919
'@angular-eslint/component-selector': [
2020
'error',
2121
{
2222
type: 'element',
23-
prefix: 'app',
23+
// prefix: 'app',
2424
style: 'kebab-case',
2525
},
2626
],

apps/example-ng-pixijs/src/app/empty/empty.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Component, Input } from '@angular/core';
2-
import { CommonModule } from '@angular/common';
1+
import { Component } from '@angular/core';
32
import { NgDocButtonComponent, NgDocColor, NgDocNotifyService } from '@ng-doc/ui-kit';
43

54
@Component({

apps/example-ng-pixijs/src/app/example/example.component.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,16 @@ export class ExampleComponent {
9595
}
9696

9797
resetGame() {
98-
this.config.update((r) => {
99-
return {
100-
isRunning: false,
101-
prevDirection: 'right',
102-
direction: 'right',
103-
isStarted: false,
104-
count: 0,
105-
speed: 0.5,
106-
positionX: 0,
107-
positionY: 0,
108-
isWin: undefined,
109-
};
98+
this.config.set({
99+
isRunning: false,
100+
prevDirection: 'right',
101+
direction: 'right',
102+
isStarted: false,
103+
count: 0,
104+
speed: 0.5,
105+
positionX: 0,
106+
positionY: 0,
107+
isWin: undefined,
110108
});
111109
}
112110

apps/example-ng-pixijs/src/app/main/main.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ <h1 ng-doc-text>
1616
</div>
1717
<div class="greeting-shields">
1818
<a href="https://www.npmjs.com/package/@klerick/ng-pixijs" target="_blank">
19-
<img src="https://img.shields.io/npm/v/@klerick/ng-pixijs.svg?style=for-the-badge" />
19+
<img alt="NPM" src="https://img.shields.io/npm/v/@klerick/ng-pixijs.svg?style=for-the-badge" />
2020
</a>
2121

2222
<a href="https://github.com/klerick/ng-pixijs/stargazers" target="_blank">
23-
<img src="https://img.shields.io/github/stars/klerick/ng-pixijs?style=for-the-badge" />
23+
<img alt="STARS" src="https://img.shields.io/github/stars/klerick/ng-pixijs?style=for-the-badge" />
2424
</a>
2525

2626
<a href="https://github.com/klerick/ng-pixijs/blob/main/LICENSE" target="_blank">
2727
<img
28+
alt="LICENSE"
2829
src="https://img.shields.io/github/license/klerick/ng-pixijs.svg?style=for-the-badge" />
2930
</a>
3031
</div>

apps/example-ng-pixijs/src/app/main/main.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeDetectionStrategy, Component, inject, input, PLATFORM_ID } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, inject, PLATFORM_ID } from '@angular/core';
22
import { CommonModule, isPlatformBrowser } from '@angular/common';
33
import { NgDocButtonComponent, NgDocTextComponent } from '@ng-doc/ui-kit';
44
import { RouterLink } from '@angular/router';

apps/example-ng-pixijs/src/app/pixijs-elements/bg-stage/bg-stage.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, inject } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { PixiComponent, PixiContainer } from '@klerick/ng-pixijs';
44
import { Container } from 'pixi.js';

apps/example-ng-pixijs/src/app/pixijs-elements/main-bg/main-bg.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Directive, inject } from '@angular/core';
22
import { injectAutoEffect, OnPixiInit, PixiComponent, PixiElement } from '@klerick/ng-pixijs';
3-
import { Application, TilingSprite } from 'pixi.js';
3+
import { TilingSprite } from 'pixi.js';
44
import { TEXTURE_BG } from '../../utils/providers';
55

66
@PixiElement(TilingSprite)

apps/example-ng-pixijs/src/app/utils/providers/draw-rect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Application, Graphics, GraphicsContext } from 'pixi.js';
2-
import { inject, InjectionToken } from '@angular/core';
1+
import { Graphics, GraphicsContext } from 'pixi.js';
2+
import { InjectionToken } from '@angular/core';
33

44

55
function rectContextFactory(

eslint.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@ module.exports = [
2828
{
2929
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
3030
// Override or add rules here
31-
rules: {},
31+
rules: {
32+
'@typescript-eslint/no-unused-expressions': [
33+
'warn',
34+
{ "allowShortCircuit": true, "allowTernary": true }
35+
],
36+
'@typescript-eslint/no-empty-function': [
37+
'warn',
38+
{
39+
"allow": ["arrowFunctions"]
40+
}
41+
]
42+
},
3243
},
3344
{
3445
files: ['**/*.json'],

libs/ng-pixijs/eslint.config.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ module.exports = [
2626
'error',
2727
{
2828
type: 'attribute',
29-
prefix: 'lib',
29+
// prefix: 'lib',
3030
style: 'camelCase',
3131
},
3232
],
3333
'@angular-eslint/component-selector': [
3434
'error',
3535
{
3636
type: 'element',
37-
prefix: 'lib',
37+
// prefix: 'lib',
3838
style: 'kebab-case',
3939
},
4040
],
@@ -43,6 +43,17 @@ module.exports = [
4343
{
4444
files: ['**/*.html'],
4545
// Override or add rules here
46-
rules: {},
46+
rules: {
47+
'@typescript-eslint/no-unused-expressions': [
48+
'warn',
49+
{ "allowShortCircuit": true, "allowTernary": true }
50+
],
51+
'@typescript-eslint/no-empty-function': [
52+
'warn',
53+
{
54+
"allow": ["arrowFunctions"]
55+
}
56+
]
57+
},
4758
},
4859
];

0 commit comments

Comments
 (0)