Skip to content

Commit 41676a8

Browse files
author
roman
committed
ESLint class-methods-use-this
1 parent dfcbd8e commit 41676a8

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
"no-undef": 0,
3838
"no-unused-vars": 0,
3939
"no-empty-function": 0,
40-
"class-methods-use-this": 0,
40+
"class-methods-use-this": 1,
4141
"import/no-webpack-loader-syntax": 1,
4242
"import/newline-after-import": 1,
4343
"import/no-duplicates": 1,

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ npm i
2828
npm run start
2929
```
3030

31+
HUSKY
32+
---
33+
* Install: `npm i husky`
34+
* Uninstall: `npm r husky`
35+
3136
TASKS
3237
---
3338
| Task | Description |

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"tests:w": "npm run karma",
2222
"server": "webpack-dev-server --hot --progress --colors",
2323
"server:dashboard": "npm run server -- --env.dashboard",
24-
"build": "webpack --progress --colors",
25-
"build:prod": "npm run build -- --env.prod --display-modules",
24+
"build": "webpack --progress --colors --display-modules",
25+
"build:prod": "npm run build -- --env.prod",
2626
"dashboard": "webpack-dashboard -- npm run server:dashboard",
2727
"up": "node node_modules/updtr/bin/updtr --test-stdout --save-exact -R simple --test \"npm run test\"",
2828
"build:vendor-libs": "npm run build -- --env.vendorLibs --display-modules",
@@ -43,7 +43,8 @@
4343
"dev2b": "npm run p -q -- \"npm run tests:w\" \"npm run server\"",
4444
"stryker:run": "stryker run stryker.conf.js",
4545
"stryker:source": "npm run gulp -- stryker:source",
46-
"stryker": "npm run stryker:source && npm run stryker:run"
46+
"stryker": "npm run stryker:source && npm run stryker:run",
47+
"prepush": "npm run t"
4748
},
4849
"engines": {
4950
"npm": ">=3"

src/app/app.errorhandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class AppErrorHandler extends ErrorHandler {
66
super(true);
77
}
88

9-
handleError(err: any) { // eslint-disable-line
10-
console.error(err); // eslint-disable-line
9+
handleError(err: any) { // eslint-disable-line class-methods-use-this
10+
console.error(err); // eslint-disable-line no-console
1111
}
1212
}

src/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
if (process.env.NODE_ENV === 'production') {
2-
require('core-js/es6');
3-
}
1+
require('core-js/es6');
42
require('core-js/es7/reflect');
53
require('core-js/es7/array');
64
require('zone.js/dist/zone');
@@ -29,7 +27,7 @@ if (process.env.NODE_ENV === 'production') {
2927
private readonly appRef: ApplicationRef
3028
) { }
3129

32-
hmrOnInit(store: any) {
30+
hmrOnInit(store: any) { // eslint-disable-line class-methods-use-this
3331
// https://github.com/angularclass/angular2-hmr
3432
}
3533

@@ -39,7 +37,7 @@ if (process.env.NODE_ENV === 'production') {
3937
removeNgStyles();
4038
}
4139

42-
hmrAfterDestroy(store: any) {
40+
hmrAfterDestroy(store: any) { // eslint-disable-line class-methods-use-this
4341
store.disposeOldHosts();
4442
delete store.disposeOldHosts;
4543
}

webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export = (options: Options = {}) => {
180180
]
181181
},
182182
{
183-
test: /app\.scss$/,
183+
test: /[\/\\]app\.scss$/,
184184
use: (() => {
185185
let result = [
186186
{ loader: 'css-loader' },

0 commit comments

Comments
 (0)